Game Development Community

Shader help

by Richard Marrevee · in Torque 3D Professional · 05/23/2014 (2:50 pm) · 0 replies

I am on a little side-project to get a grasp on PostFX shader programming. In the pixel shader I have the prepass texture and got the normal from it. The problem now is that this normal is in screen space and changes when the camera view changes, so what I need is the world space normals. Is there an easy way to get them in the pixel-shader?

Help is very appreciated.

Thanks
Richard

About the author

Started programming in 1984 on an Oric, when time progressed switched to MSX, Amiga and finally the Windows PC with T3D. Now developing an epic fantasy game: The Master's Eye. Creator of the DoorClass pack and VolumetricFog pack @ richardsgamestudio.com