Skip to content

Add cloud shadows shader chunk override example#8604

Merged
mvaligursky merged 1 commit intomainfrom
mv-cloud-shadows-example
Apr 16, 2026
Merged

Add cloud shadows shader chunk override example#8604
mvaligursky merged 1 commit intomainfrom
mv-cloud-shadows-example

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

Add a new example demonstrating scrolling cloud shadows via StandardMaterial shader chunk overrides.

Changes:

  • New cloud-shadows example in examples/src/examples/shaders/ showing how to override the endPS chunk to apply cloud shadow modulation after lighting but before emission/fog/tonemapping/gamma
  • Cloud shadow uniforms set globally via scope.resolve() — no per-material setup needed
  • Provides both GLSL and WGSL shader chunk files for WebGL and WebGPU support
  • Interactive controls for speed, direction, intensity, and scale

Examples:

  • New: shaders/cloud-shadows — instanced forest scene with directional light shadows and scrolling cloud shadow texture overlay

New example demonstrating scrolling cloud shadows via StandardMaterial
shader chunk overrides. Overrides the endPS chunk to apply cloud shadow
modulation after lighting but before emission/fog/tonemapping/gamma.
Uniforms are set globally via scope.resolve() with no per-material setup.
Includes both GLSL and WGSL shader chunks and interactive controls.
@mvaligursky mvaligursky self-assigned this Apr 16, 2026
@mvaligursky mvaligursky merged commit 86081f1 into main Apr 16, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-cloud-shadows-example branch April 16, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant