summaryrefslogtreecommitdiff
path: root/cnn_v3/src
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-03-22 20:26:20 +0100
committerskal <pascal.massimino@gmail.com>2026-03-22 20:26:20 +0100
commitff46656233cd2676f1befef9ecc82722d962a89c (patch)
tree1f76d83c8d643381ace344ef9ea10473e7b476aa /cnn_v3/src
parent7a8227bc8b67f935685991f43666ee938ce39393 (diff)
fix(cnn_v3): frontFace_CW for raster pipeline + sphere impostor in gbuf_raster
- Missing WGPUFrontFace_CW (Y-flipped perspective) caused back faces to render instead of front faces → cubes appeared inside-out. - Sphere objects now use ray-sphere impostor in fs_main: correct silhouette, smooth normal from hit point, and reprojected clip-space depth.
Diffstat (limited to 'cnn_v3/src')
-rw-r--r--cnn_v3/src/gbuffer_effect.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/cnn_v3/src/gbuffer_effect.cc b/cnn_v3/src/gbuffer_effect.cc
index ff78cf8..c49ab88 100644
--- a/cnn_v3/src/gbuffer_effect.cc
+++ b/cnn_v3/src/gbuffer_effect.cc
@@ -552,8 +552,9 @@ void GBufferEffect::create_raster_pipeline() {
pipe_desc.vertex.entryPoint = str_view("vs_main");
pipe_desc.fragment = &frag;
pipe_desc.depthStencil = &ds;
- pipe_desc.primitive.topology = WGPUPrimitiveTopology_TriangleList;
- pipe_desc.primitive.cullMode = WGPUCullMode_Back;
+ pipe_desc.primitive.topology = WGPUPrimitiveTopology_TriangleList;
+ pipe_desc.primitive.cullMode = WGPUCullMode_Back;
+ pipe_desc.primitive.frontFace = WGPUFrontFace_CW; // Y-flipped perspective
pipe_desc.multisample.count = 1;
pipe_desc.multisample.mask = 0xFFFFFFFF;