converting ShaderGraph ScreenPosition-Raw & SceneDepth node to Fragment shader code

87 Views Asked by At

I have a complex fragment shader and i realized that i need to use two nodes from the shader graph nodes function

1 - Screen Position - Raw 2 - Scene Depth

I know shader graph generates it's code into surface Shader instead of fragment shader, which made things hard for me to figure out how get the same exact results but in Fragment shader.

the cloest result I've seen was v.screenSpace.xy / v.screenSpace.w; where screenSpace = ComputeScreenPos(o.vertex);

I've tried many other things, none of them worked or worth mentioning Thanks for your help.

0

There are 0 best solutions below