ludic/packages/ludic.render3d/shaders
Orkuncakilkaya 9dff8f21bd feat(render3d): one wind, and everything in the valley is moved by it
The grass had a gust built from two sines; the trees had no gust term AT ALL, only a
per-instance wobble. So the meadow rippled and the canopy above it swayed to an unrelated
rhythm, and nothing ever crossed the valley.

wind.glsl is prepended to every stage (programs.ludic, and shaders.ludic for the SPIR-V
build) so grass, crowns and water read the same field at the same world position. It
declares no uniforms on purpose: u_time and u_wind already exist in several of those
files and redeclaring them is a compile error in whichever stage includes both.

The wavelength is what made it work. At 0.030 the front was 209 m crest to crest -
longer than the meadow you can see - so the whole frame sat in one phase and the gust
read as everything breathing together. At 0.085 it is 74 m and a front crosses a view in
a couple of seconds.

R3D_DEBUG_WIND=1 paints the field on the ground. It is the only honest way to show a gust
in a still image, and two shots 0.3 s apart move by 39/255.

400 frames: GL 6.9 s, VK 7.2 s. Backends agree to 0.68/255.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 18:24:43 +03:00
..
spv feat(render3d): one wind, and everything in the valley is moved by it 2026-09-19 18:24: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
compute.list feat(render3d): compute and indirect draws on Vulkan, and tree layers culled on the GPU (opt-in) 2026-09-15 14:19:43 +03:00
depth.frag perf(render3d): a depth prepass for the near tree foliage 2026-09-13 04:18:38 +03:00
dof.frag feat(render3d): anti-aliasing that exists, and a lens for the viewfinder 2026-09-19 17:38:25 +03:00
fullscreen.vert feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
grass.mesh feat(render3d): mesh-shader grass 2026-09-15 20:20:42 +03:00
grass.vert feat(render3d): one wind, and everything in the valley is moved by it 2026-09-19 18:24:43 +03:00
heightgen.frag feat(render3d): terrain_lake_carve - a height map may carry its own lake bed 2026-09-16 15:27:21 +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 feat(render3d): the air and the light are the hour's, not one constant apiece 2026-09-19 14:42:30 +03:00
model.frag fix(render3d): a leaf is not matte 2026-09-19 16:41:33 +03:00
model.vert feat(render3d): one wind, and everything in the valley is moved by it 2026-09-19 18:24:43 +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(render3d): HDR calibration; fix the HDR toggle crash and yellow reading as red 2026-09-15 22:57:18 +03:00
overlay.vert feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
probe.comp feat(render3d): compute and indirect draws on Vulkan, and tree layers culled on the GPU (opt-in) 2026-09-15 14:19:43 +03:00
scatter_cull.comp render3d(vulkan): GPU-driven trees - one merged mesh per material, one draw per material; on by default 2026-09-15 16:44:00 +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(render3d): anti-aliasing that exists, and a lens for the viewfinder 2026-09-19 17:38:25 +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): the air and the light are the hour's, not one constant apiece 2026-09-19 14:42:30 +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): one wind, and everything in the valley is moved by it 2026-09-19 18:24:43 +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(render3d): HDR calibration; fix the HDR toggle crash and yellow reading as red 2026-09-15 22:57:18 +03:00
variants.list feat(render3d): anti-aliasing that exists, and a lens for the viewfinder 2026-09-19 17:38:25 +03:00
volumetric.frag feat(render3d): light you can see - sun shafts and valley mist 2026-09-19 16:06:16 +03:00
water.frag fix(render3d): the meadow is vegetation, and still water reads as water 2026-09-19 18:07:01 +03:00
water.vert feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
wind.glsl feat(render3d): one wind, and everything in the valley is moved by it 2026-09-19 18:24:43 +03:00