Progress i guess

This commit is contained in:
Dynamitos
2023-11-08 23:27:21 +01:00
parent ecb5050dc7
commit 19c3e559b1
49 changed files with 268 additions and 361 deletions
+2 -3
View File
@@ -9,15 +9,14 @@ struct ViewParameter
float4 cameraPos_WS;
float2 screenDimensions;
}
layout(set = INDEX_VIEW_PARAMS)
ParameterBlock<ViewParameter> viewParams;
ParameterBlock<ViewParameter> pViewParams;
// Convert screen space coordinates to view space.
float4 screenToClip( float4 screen )
{
// Convert to normalized texture coordinates
float2 texCoord = screen.xy / viewParams.screenDimensions;
float2 texCoord = screen.xy / pViewParams.screenDimensions;
// Convert to clip space
return float4( float2( texCoord.x, 1.0f-texCoord.y ) * 2.0f - 1.0f, screen.z, screen.w );