Descriptors now work in metal hopefully

This commit is contained in:
Dynamitos committed 2024-09-16 13:00:53 +02:00
1 parent 49e94d3b74
commit 6417ab940d
45 files changed
+435 -476

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ float Beckmann(float ndoth, float roughness) {
[shader("pixel")]
float4 fragmentMain(WaterVertex vert) : SV_TARGET {
float3 lightDir = -normalize(pWaterMaterial.sunDirection);
float3 viewDir = normalize(pViewParams.cameraPos_WS.xyz - vert.position_WS);
float3 viewDir = normalize(pViewParams.c.cameraPos_WS.xyz - vert.position_WS);
float3 halfwayDir = normalize(lightDir + viewDir);
float depth = vert.depth;
float LdotH = clamp(dot(lightDir, halfwayDir), 0, 1);