#Fake volumetric light shader inconsistency

1 messages · Page 1 of 1 (latest)

swift cairn
#

I have created a fake volumetric light shader, and it works fine in the scene view before I click play. After I click play, the shader stops working for some objects and works for others. I set the fan, volumetric cylinder and light to static and the issue still persists. When these objects are non-static, the issue keeps happening on and off as I move in the game.

toxic cape
#

What type of static do you mean, and how do you expect it to be related?

swift cairn
#

I am not sure how it would be related but its my first time I actually use shaders so I don't exactly know

toxic cape
#

The checkbox makes it every type of static, which you can see individually from the dropdown next to it
Batching Static combines the meshes into a shared object space, which may be what's affecting the shader as you use the local object space for the fade

swift cairn
toxic cape
#

I guess it's also possible the _Time variable can overflow and start glitching out
At least in Shader Graph Time keeps counting up all the time when application/editor is running so it can easily run into floating point inaccuracy and start jumping and warping whatever you're using it for

swift cairn
toxic cape
#

However it can't easily do a lot of the bit more advanced stuff that can be done with written shaders, and it can't use built-in RP specific shader methods really

#

Its advantage is that making URP and HDRP shaders without it is really tough

#

Nodes are easier to work with, but also using them won't teach you shaders very deeply if learning is your goal

swift cairn
#

But I'm guessing creating this specific shader in shader graph is kind of easy

#

So I should try to recreate it in shader graph

toxic cape
#

If you can use Shader Graph due to not needing BiRP specific features, I wonder why not use URP to start with in this day and age

swift cairn
toxic cape
swift cairn
swift cairn
toxic cape
swift cairn
toxic cape
#

URP would automate those kinds of things for you

plucky wadi
#

You could also just not use object space coords