Water works now

This commit is contained in:
Dynamitos
2024-08-21 17:43:31 +02:00
parent fcdb132d49
commit 19a2423953
8 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ void taskMain(
bounding.maxCorner = float3(tile.location.x + 1, tile.height, tile.location.y + 1) * tile.extent;
float3 median = (bounding.minCorner + bounding.maxCorner) / 2;
float distance = distance(median, pViewParams.cameraPos_WS.xyz);
uint numMeshes = max(10 - uint(distance / tile.extent), 1);
uint numMeshes = max(4 - uint(distance / tile.extent), 1);
WaterPayload payload;
payload.offset = bounding.minCorner;
payload.extent = tile.extent / numMeshes;