Godrays through transparent material

postprocessing
#1

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)

0 Likes

#2

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.

0 Likes

#3

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

0 Likes

#4

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

0 Likes

#5

There is anything I can do about it?

0 Likes

#6

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

0 Likes

#7

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

0 Likes