// Enable depth writing for standard opaque objects sceneMaterial.setDepthWrite(DepthWrite.ENABLE) // Disable depth writing for transparent objects sceneMaterial.setDepthWrite(DepthWrite.DISABLE)
enum DepthWrite : Enum<DepthWrite>
| Member | Description |
|---|---|
ENABLE |
Enables writing to the depth buffer.
When a fragment passes the depth test, its depth value will be written to the depth buffer, updating the stored depth at that pixel location. This is the standard setting for opaque objects to ensure proper occlusion in 3D scenes.
|
DISABLE |
Disables writing to the depth buffer.
When a fragment passes the depth test, it will be drawn but will not update the depth buffer. This is useful for transparent objects or special effects where you want to render something without affecting subsequent depth tests.
|
encoding
:
Int
[Get] |
Integer value corresponding to the native graphics API encoding for this depth write mode
Signature
val encoding: Int |