# world view spaces clarification

This topic is 4421 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi guys! I need some clarification on understanding some of the math. Basically, I am trying to reconstruct world space position for a pixel.
//VS
//IN.vPosition are clipspace positions for a fullscreen quad
//eyeViewProjInvMatrix - user camera's view projection inverse matrix
half4 rayScreenPos = half4(IN.vPosition,1.0,1.0);
half3 rayDirection = mul(rayScreenPos,eyeViewProjInvMatrix);

//PS
//reconstruct world position
//ray direction interpolated from fullscreen quad
//g_EyeWorldPosition - user camera's worldspace position
half3 rayDirection = normalize(IN.rayDirection);
half viewDepth = //viewspace depth
half3 worldPosition = g_EyeWorldPosition + viewDepth * rayDirection;


is this theortically correct? thx! Edwin

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5
JoeJ
19

• 11
• 15
• 9
• 10
• 12
• ### Forum Statistics

• Total Topics
633004
• Total Posts
3009835
• ### Who's Online (See full list)

There are no registered users currently online

×