Home Technical Talk

Ooof, having a really weird Shader Forge problem

https://imgur.com/a/iOvYF

I made a depth map shader that samples a gradient texture and maps it to the depth. This is how it should look.

Here it is plugged into the custom lighting input. Above it you can see another shader I've been working on.


The above shader is a sort of subsurface scattering/ faked translucent surface shader that allows light to bleed on the edges when there is a light directly behind the object. I was having trouble getting it to look right so I routed it through a switch so that I could turn it off and on live as I adjusted the variables to see how the settings for the Depth Map shader and the SSS shader played together.


When the switch is turned on and the SSS and Depth Map shaders are added together the contrast goes all out of whack. That's not the end of it though.


Weirdly enough when the switch is turned off and the only thing that should be routed through it is the Depth Map shader, it still looks weird and way too high contrast! As you can see comparing the last picture where the SSS switch is turned on, there is no SSS in this picture where it's turned off. And yet the contrast is all messed up??? Why?
Sign In or Register to comment.