@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
20 lines • 686 B
JavaScript
import { Color4 } from "../../Maths/math.color.js";
import { ShaderMaterial } from "../shaderMaterial.js";
import "../../Shaders/color.fragment.js";
import "../../Shaders/color.vertex.js";
/**
* A material to use for fast depth-only rendering.
* @since 5.0.0
*/
export class OcclusionMaterial extends ShaderMaterial {
constructor(name, scene) {
super(name, scene, "color", {
attributes: ["position"],
uniforms: ["world", "viewProjection", "color"],
});
this.disableColorWrite = true;
this.forceDepthWrite = true;
this.setColor4("color", new Color4(0, 0, 0, 1));
}
}
//# sourceMappingURL=occlusionMaterial.js.map