From ff46656233cd2676f1befef9ecc82722d962a89c Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 22 Mar 2026 20:26:20 +0100 Subject: fix(cnn_v3): frontFace_CW for raster pipeline + sphere impostor in gbuf_raster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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. --- cnn_v3/src/gbuffer_effect.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cnn_v3/src') 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; -- cgit v1.2.3