So in my 2D game, I am having light issues where I use sprite lit shader graph on objects that sometiems have more than one light source on them, resulting in color burn of the object's texture. I have tried to saturate it via a custom shader but it didnt work since it saturates each light separatly which is the exact problem. I have seen some other options but was way too confused to tackle them. Anyone can give a hand? 😄
#Light burn 2D game
1 messages · Page 1 of 1 (latest)
So you are wanting to clamp the brightness of all lights?
Yes! Unfortunately with shaders i cant just clamp it cuz the calculations are done per light (at least thats how i understood it)
In the 2d renderer, there is a single texture for each blending style in the renderer settings, and you can sample them with the 2d light texture node in shadergraph.
I have tried that but it didnt work for me, i took the multiply one and tried to clamp it, used screen pos default on UV on that texture and multiplied it with the maintex. If something in my workflow is wrong please let me know! I can send you want i did as well
Oh wait i am in a 3D environment technically.. maybe thats the issue?
There's no 3D or 2D
But there are components designed for one or the other
The relevant part is whether you're using 2D lights or non-2D lights
Hmm I see, I will take a pic and share the workflow with u guys maybe I did something wrong there
What renderer are you using?
URP
Send u a screenshot of the shader I have built a sprite custom lit shader
URP is the render pipeline, it has the option of both 2D and "universal" (closer to 3D) renderers
Just to not let anything get too simple
If the 2D Light Texture node actually works you're on the 2D renderer
Not sure, where can I check?