add depth write material

This commit is contained in:
Nick Fisher
2025-03-25 11:33:37 +08:00
parent d6666d6388
commit 396b7ed6dc

View File

@@ -0,0 +1,17 @@
material {
name : LinearDepth,
shadingModel : unlit,
requires : [ position, uv0 ],
shadingModel : unlit,
doubleSided : false,
blending: opaque,
depthWrite : true,
depthCulling : true,
}
fragment {
void material(inout MaterialInputs material) {
prepareMaterial(material);
material.baseColor = vec4(gl_FragCoord.z, 0.0, 0.0, 1.0);
}
}