Godrays through transparent material

I was trying the cool effect of godrays using this library.
Is it possible to have somehow the rays go through a transparent material (transparent=true and opacity<1)?



I’ve attached the test project

three-godray.zip (102.6 KB)

I don’t think this can be done without a modification. Depth information are used in order to mask the light (so it does not shine through objects). And transparent objects create the same depth information than opaque objects.

You might want to test what happens if you set depthWrite to false on the transparent object’s material.

Hi @Mugen87, tried with depthWrite to false but same result :disappointed:

It seems the code uses an overwrite material when creating the depth mask. That would explain why the material setting shows no effect.

There is anything I can do about it?

Sry, I don’t know. I would have to study the code like everybody else…

Ok! I’ll check the code, see if I found anything. Thanks for the help!