From fd504bad880f1dfa2b3c1b3c49d00270fed43dda Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Mon, 26 May 2025 00:45:03 +0200 Subject: [PATCH] wip --- Crafter.Graphics-HeightmapShader.cppm | 2 +- MeshShaderHeightmapRGBA.glsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Crafter.Graphics-HeightmapShader.cppm b/Crafter.Graphics-HeightmapShader.cppm index 5f83bdf..475955e 100644 --- a/Crafter.Graphics-HeightmapShader.cppm +++ b/Crafter.Graphics-HeightmapShader.cppm @@ -55,7 +55,7 @@ namespace Crafter { Update(); } ) { - data.value->stride = stride; + data.value->stride = stride*4; data.value->spacing = spacing; transform = MatrixRowMajor::Identity(); } diff --git a/MeshShaderHeightmapRGBA.glsl b/MeshShaderHeightmapRGBA.glsl index 193f546..5ede60f 100644 --- a/MeshShaderHeightmapRGBA.glsl +++ b/MeshShaderHeightmapRGBA.glsl @@ -54,7 +54,7 @@ void main() { SetMeshOutputsEXT(256, 128); - uint linearID = gl_LocalInvocationID.x; + uint linearID = gl_GlobalInvocationID.x; uint quadX = linearID % ubo.stride; uint quadZ = linearID / ubo.stride;