LED BULB EFFECT SPATIAL SHADER
THIS IS A LED BULB EFFECT LIKE SHADER
Shader code
shader_type spatial;
uniform float scroll_speed = 1.0;
uniform float led_size = 0.1;
uniform vec4 led_color = vec4(1.0, 0.0, 0.0, 1.0); // Red LED color
void fragment() {
vec2 uv = UV; // Use UV mapping for 3D textures
// Create a scrolling effect
float scroll = mod(uv.y + TIME * scroll_speed, 1.0);
// Simulate LED bulbs with a grid-like effect
float led_effect = step(led_size, mod(uv.x, led_size * 2.0)) * step(led_size, mod(scroll, led_size * 2.0));
// Set LED color for "on" pixels
vec4 color = mix(led_color, vec4(0.0), led_effect);
ALBEDO = color.rgb; // Set the final color of the surface
ALPHA = color.a; // Apply transparency if needed
}