//Return position in view space //inTex: texcoords in screenspace //inDepth: linear depth * clip_far float3 CalculatePosVSQuad(float2 inTex, float inDepth) { float4 viewRay; viewRay.x = inTex.x*2-1; viewRay.y = (1-inTex.y)*2-1; viewRay.z = 1; viewRay.w = 1; viewRay.xyz = mul(viewRay, matProjInv).xyz; return (viewRay.xyz * inDepth); }
Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy
oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de