31 lines
794 B
Plaintext
31 lines
794 B
Plaintext
shader_type spatial;
|
|
render_mode unshaded, depth_draw_always;
|
|
|
|
uniform sampler2D input_texture : source_color, filter_nearest;
|
|
|
|
float random(vec2 uv) {
|
|
return fract(sin(dot(uv.xy,
|
|
vec2(12.9898,78.233))) * 43758.5453123);
|
|
}
|
|
void vertex() {
|
|
// Called for every vertex the material is visible on.
|
|
if (VERTEX.y > 0.0) {
|
|
VERTEX.x += VERTEX.x * abs(sin(TIME))/(5.0);
|
|
VERTEX.z += VERTEX.x * abs(sin(TIME))/(10.0);
|
|
}
|
|
|
|
}
|
|
|
|
void fragment() {
|
|
// Called for every pixel the material is visible on.
|
|
ALBEDO = texture(input_texture, UV).rgb;
|
|
ALPHA = texture(input_texture, UV).a;
|
|
ALPHA_SCISSOR_THRESHOLD = 0.5;
|
|
}
|
|
|
|
|
|
//void light() {
|
|
// // Called for every pixel for every light affecting the material.
|
|
// // Uncomment to replace the default light processing function with this one.
|
|
//}
|