Everything is broken

This commit is contained in:
Dynamitos
2024-10-01 16:56:04 +02:00
parent 4ca43427e2
commit a5694b838a
23 changed files with 49 additions and 57 deletions
+2 -2
View File
@@ -179,7 +179,7 @@ void meshMain(
float3 worldPos = params.offset + objectPos * params.extent + float3(groupID.x * params.extent, 0, groupID.y * params.extent);
float lodDisplacement = 0;
float3 camPos = pViewParams.cameraPos_WS.xyz;
float3 camPos = pViewParams.ameraPos_WS.xyz;
float cameraDistance = distance(worldPos, camPos);
float threshold = 0;
if(params.numMeshes == 3)
@@ -237,7 +237,7 @@ void meshMain(
[shader("pixel")]
float4 fragmentMain(WaterVertex vert) : SV_TARGET {
float3 lightDir = -normalize(pWaterMaterial.sunDirection);
float3 viewDir = normalize(pViewParams.c.cameraPos_WS.xyz - vert.position_WS);
float3 viewDir = normalize(pViewParams.cameraPos_WS.xyz - vert.position_WS);
float3 halfwayDir = normalize(lightDir + viewDir);
float depth = vert.depth;
float LdotH = clamp(dot(lightDir, halfwayDir), 0, 1);