Question by
burstjoe · May 20, 2020 at 05:27 AM ·
scripting problemshaders
Custom Shader can't seem to grab worldPos.z
I've been following this tutorial: https://catlikecoding.com/unity/tutorials/basics/mathematical-surfaces/
I've been stumped at using the Custom Shader.
I'm supposed to have my objects alter their colour according to their world position, and couldn't get any blue. After some troubleshooting(swapping around colours, narrowing down on IN.worldPos.x etc) I realised it's grabbing worldPos.x, worldPos.y fine, it's worldPos.z that somehow isn't translating into the Albedo numbers I want. Can anyone shed some light please?
customshader.jpg
(137.0 kB)
Comment