|
|
|
|
|
|
return positionVS.xyz / positionVS.w; |
|
|
|
} |
|
|
|
|
|
|
|
// 'depthOffsetVS' is in the direction opposite to the view vector 'V', e.i. away from the camera. |
|
|
|
// 'depthOffsetVS' is in the opposite direction of the view vector 'V', e.i. away from the camera. |
|
|
|
void ApplyDepthOffsetPositionInput(float3 V, float depthOffsetVS, float4x4 viewProjMatrix, inout PositionInputs posInput) |
|
|
|
{ |
|
|
|
posInput.depthVS += depthOffsetVS; |
|
|
|