shader_type spatial; render_mode unshaded; uniform sampler2D depth_texture : source_color, hint_depth_texture; void vertex() { // Called for every vertex the material is visible on. } void fragment() { float depth = texture(depth_texture, SCREEN_UV).x; //ALBEDO = vec3(1.0, 1.0, 1.0); ALBEDO = vec3(0.7, 0.7, 0.7) + depth * SCREEN_UV.x; ALPHA = 1.0; } void light() { DIFFUSE_LIGHT = vec3(1.0, 1.0, 1.0); }