Variance Shadow Maps
I can't find any documentation on these "linstep" and "linsmooth" functions. What are they and how can I implement them?
smoothstep is a built-in intrinsic function. linstep isn't for some reason but can be trivially implemented:
You can of course vectorize this if required. It can also be implemented in terms of lerp, but there's no real advantage in that. since the divide is required in either case.
float linstep(float min, float max, float v){ return clamp((v - min) / (max - min), 0, 1);}
You can of course vectorize this if required. It can also be implemented in terms of lerp, but there's no real advantage in that. since the divide is required in either case.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement