Starting to refactor into mesh shading

This commit is contained in:
Dynamitos
2023-10-07 19:29:53 +02:00
parent fcc4fc12d4
commit 1b6e1a8453
42 changed files with 488 additions and 1577 deletions
+3 -3
View File
@@ -9,15 +9,15 @@ struct ViewParameter
float4 cameraPos_WS;
float2 screenDimensions;
}
layout(set = INDEX_VIEW_PARAMS, binding = 0, std430)
ConstantBuffer<ViewParameter> gViewParams;
//layout(set = INDEX_VIEW_PARAMS, binding = 0, std430)
ParameterBlock<ViewParameter> viewParams;
// Convert screen space coordinates to view space.
float4 screenToClip( float4 screen )
{
// Convert to normalized texture coordinates
float2 texCoord = screen.xy / gViewParams.screenDimensions;
float2 texCoord = screen.xy / viewParams.screenDimensions;
// Convert to clip space
return float4( float2( texCoord.x, 1.0f-texCoord.y ) * 2.0f - 1.0f, screen.z, screen.w );