AltParty2024/scripts/WatchDogsCool.gdshader

20 lines
416 B
Text
Raw Normal View History

2024-10-01 17:29:36 +03:00
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);
}