- Home /
How to change pixel world position in surface shader before lighting
Sorry about the possibly confusing title / question. I'm wondering if it is possible to replace the world position depth of a pixel in a surface shader so the new value is taken into account during lighting?
Say I have a box in geo and I want to carve a cylindrical whole through it using some procedural technique like raymarching. I can get the new pixel positions and normals for this cutout based on camera angle and object rotation, but how can I hand this off to the surface shader so it uses it for lighting? Any guidance would be appreciated.
Comment