24 lines
617 B
Plaintext
24 lines
617 B
Plaintext
shader_type spatial;
|
|
|
|
const float belt_length = 2.85;
|
|
const float uv_scale = 3.7313;
|
|
uniform float speed = 1.0;
|
|
uniform sampler2D basecolor : source_color, repeat_enable, filter_linear;
|
|
uniform sampler2D arm : hint_default_white, repeat_enable, filter_linear;
|
|
uniform sampler2D normal : hint_normal, repeat_enable, filter_linear;
|
|
|
|
varying vec2 uv;
|
|
|
|
void vertex() {
|
|
uv = vec2(UV.x, UV.y - TIME * (speed / belt_length) * uv_scale);
|
|
}
|
|
|
|
void fragment() {
|
|
ALBEDO = texture(basecolor, uv).rgb;
|
|
NORMAL_MAP = texture(normal, uv).rgb;
|
|
vec3 ARM = texture(arm, uv).rgb;
|
|
AO = ARM.r;
|
|
ROUGHNESS = ARM.g;
|
|
METALLIC = ARM.b;
|
|
}
|