ludic/packages/ludic.render3d/shaders
Orkuncakilkaya 4fc4768083 fix(shaders): Vulkan SPIR-V keeps the near half of the depth range
The renderer's projections are OpenGL's, whose clip-space depth runs from -w to w; Vulkan clips
everything below 0. `ludic-dev shaders` now wraps each vertex stage - its own main runs, then
gl_Position.z = (z + w) / 2 - so every variant's depth lands in [0, w]. The GLSL the OpenGL
renderer compiles is untouched. No y flip is needed: a Vulkan target's row 0 is where OpenGL's is
(NDC y = -1), so render to texture, sampling and gl_FragCoord agree between the two, and only the
present and the screenshot flip.

45 vertex modules regenerated (spirv-val clean, manifest unchanged); ludic-dev test 140 passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 12:05:43 +03:00
..
spv fix(shaders): Vulkan SPIR-V keeps the near half of the depth range 2026-09-15 12:05:43 +03:00
adapt.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
bake.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
bloom_down.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
bloom_up.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
depth.frag perf(render3d): a depth prepass for the near tree foliage 2026-09-13 04:18:38 +03:00
fullscreen.vert feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
grass.vert feat(render3d): replace the world at run time, water bodies, terrain_sea 2026-09-13 00:03:40 +03:00
heightgen.frag feat(render3d): replace the world at run time, water bodies, terrain_sea 2026-09-13 00:03:40 +03:00
ibl_brdf.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
ibl_irradiance.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
ibl_prefilter.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
impostor.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
impostor.vert feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
lighting.glsl fix(render3d): lakes clipped to their ellipse; r3d_fog_base 2026-09-13 00:29:37 +03:00
model.frag perf(render3d): a depth prepass for the near tree foliage 2026-09-13 04:18:38 +03:00
model.vert perf(render3d): a depth prepass for the near tree foliage 2026-09-13 04:18:38 +03:00
noise.glsl feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
outline.frag feat(render3d): a rim outline around a highlighted actor 2026-09-10 16:15:12 +03:00
overlay.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
overlay.vert feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
shadow.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
sharpen.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
skin.vert feat(render3d): a rim outline around a highlighted actor 2026-09-10 16:15:12 +03:00
sky.frag feat(render3d): give the moon a phase 2026-09-10 16:15:19 +03:00
ssao.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
ssao_blur.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
ssgi.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
ternormal.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
terrain.frag feat(render3d): replace the world at run time, water bodies, terrain_sea 2026-09-13 00:03:40 +03:00
terrain.vert feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
tershadow.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
tersun.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
tonemap.frag feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
variants.list feat(render3d): every shader variant as Vulkan SPIR-V, built ahead of time 2026-09-15 10:11:31 +03:00
water.frag fix(render3d): lakes clipped to their ellipse; r3d_fog_base 2026-09-13 00:29:37 +03:00
water.vert feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00