diff --git a/materials/linear_depth.mat b/materials/linear_depth.mat new file mode 100644 index 00000000..2c57d17c --- /dev/null +++ b/materials/linear_depth.mat @@ -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); + } +}