Skip to content

feat(examples): dual-backend shader-material example#8698

Merged
mvaligursky merged 1 commit into
mainfrom
mv-shader-material-example
May 7, 2026
Merged

feat(examples): dual-backend shader-material example#8698
mvaligursky merged 1 commit into
mainfrom
mv-shader-material-example

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

The former WGSL-only wgsl-shader example is renamed to shader-material, gains matching GLSL shader chunks, and runs on both WebGL2 and WebGPU. The example is no longer hidden so it appears in the shaders category.

Changes:

  • Rename example and shader assets to shader-material, using the same chunk naming pattern as other shader examples (*.shader.glsl.vert, *.shader.wgsl.vert, etc.).
  • Supply vertexGLSL / fragmentGLSL alongside WGSL; use aPosition / aUv0 attributes aligned with primitive meshes.
  • Remove WEBGL_DISABLED, HIDDEN, and the runtime WebGPU requirement.
  • Add sidebar thumbnails for shaders/shader-material.

Examples:

  • Renamed: examples/src/examples/shaders/shader-material.example.mjs (from wgsl-shader.example.mjs).
  • New GLSL: shader-material.shader.glsl.vert, shader-material.shader.glsl.frag.
  • WGSL: shader-material.shader.wgsl.vert, shader-material.shader.wgsl.frag.

Note: Direct links to the old iframe path shaders_wgsl-shader will need updating to shaders_shader-material.

Rename wgsl-shader to shader-material with GLSL and WGSL chunks, remove
WebGPU-only restriction, and list the example in the browser.
@mvaligursky mvaligursky self-assigned this May 7, 2026
@mvaligursky mvaligursky merged commit f1c27fc into main May 7, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-shader-material-example branch May 7, 2026 16:28
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