Skip to content

GodRays are shining through other objects #213

@schachmatthias

Description

@schachmatthias

The Godrays are visible thru other objects in the scene. Like as if those other objects are transparent but they are not. The weirdest thing is that this is only happening since a few days, it worked fine for months, but switching back to older commits i still have the same issue now.

The objects which seem to be transparent visually are normal TresMeshStandardMaterial with full opacity, no transparency whatsoever. The issue is gone when I use TresMeshBasicMaterial for the other Objects but ONLY without color and without texture. The issue is also gone once I remove the GodRaysPmndrs.

It works using only ThreeJS.

I made 3 simple components reproducing the bug. One working component (Three) One not working component (Tres), one sphere object for reference.

Reproduction
https://stackblitz.com/~/edit/tres-nuxt-starter-z2w6ry-ks2my9jt?file=components/GodRaysWithTresJS.vue
https://stackblitz.com/~/edit/tres-nuxt-starter-z2w6ry-ks2my9jt?file=components/GodRaysWithThreeJS.vue
https://stackblitz.com/~/edit/tres-nuxt-starter-z2w6ry-ks2my9jt?file=components/SphereObject.vue

Expected behavior
If the godray position is behind another object it should hide behind it.

Screenshots
With TresJS:

Image

With ThreeJS (works)

Image

System Info
System:
OS: Linux 6.6 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
CPU: (16) x64 AMD Ryzen 7 3800X 8-Core Processor
Memory: 12.36 GB / 15.59 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 24.11.0 - /home/matthias/.nvm/versions/node/v24.11.0/bin/node
Yarn: 1.22.22 - /home/matthias/.nvm/versions/node/v24.11.0/bin/yarn
npm: 11.6.1 - /home/matthias/.nvm/versions/node/v24.11.0/bin/npm
pnpm: 10.22.0 - /home/matthias/.nvm/versions/node/v24.11.0/bin/pnpm
bun: 1.2.7 - /home/matthias/.bun/bin/bun
npmPackages:
@tresjs/cientos: ^5.1.1 => 5.1.1
@tresjs/nuxt: ^5.1.1 => 5.1.1
@tresjs/post-processing: ^3.1.1 => 3.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending-triageTicket is pending to be prioritised

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions