[LITE] setClipPlane - PBR, Standard and Shader materials are not clipped

Verified against @babylonjs/lite 1.8.0.

Example - Babylon Lite Playground

Babylon Lite publicly exposes SceneContext.clipPlane and setClipPlane(scene, plane). The helper stores the plane and registers a writer for scene.clipPlane in the scene uniform buffer:

setClipPlane(scene, [0.5, 0.866, 0, -1.2]);

However, meshes using built-in PBR materials are not clipped. The same gap exists in the built-in Standard and Shader material paths.

In the published 1.8.0 package, the scene uniform declaration and UBO writer include clipPlane, but no PBR, Standard, or Shader material shader references it. The only material implementation that consumes the value is Node Material’s ClipPlanesBlock.

Expected result

Built-in materials should discard fragments on the configured side of the public scene plane, or the public API should clearly state which material families support it.

Or if the using of setClipPlane requires additional workarounds depending on scene materials, it should be shown in typedoc somehow.

cc @ryantrem to see if he can help with this issue ?

Looking…

PR here: fix(material): honor scene clip plane in built-in PBR and Standard materials by ryantrem · Pull Request #386 · BabylonJS/Babylon-Lite