I'm attempting to just establish a baseline vrayGLSL Normal map shader which maintains the geometric normals. However I'm having trouble using the vr_CameraToWorld to transform cameraspace normals into worldspace normals.
I'm sure it's something incredibly obvious but I'm not sure what the correct matrix operation is to transform screen tow orld.
Code:
vec3 wNormal() { vec3 cNormal = vr_Normal; vec4 worldvec = vr_CameraToWorld * vec4(cNormal.x,cNormal.y,cNormal.z,0.0); return vec3(worldvec.x,worldvec.y,worldvec.z); }
Comment