24 lines
657 B
Plaintext
24 lines
657 B
Plaintext
shader_type spatial;
|
|
render_mode unshaded, shadows_disabled;
|
|
#include "uid://cy7b01or0ckgk" // Rhythm Helper
|
|
|
|
uniform sampler2D albedo;
|
|
uniform float flash_exponent = 3.0;
|
|
uniform float intensity_multiplier = 1.0;
|
|
|
|
void vertex() {
|
|
// Called for every vertex the material is visible on.
|
|
}
|
|
|
|
void fragment() {
|
|
float phase = get_beat_phase();
|
|
vec4 tex = texture(albedo, UV);
|
|
float intensity = ease((1.0 - phase), flash_exponent) * intensity_multiplier;
|
|
ALBEDO = tex.rgb * intensity;
|
|
}
|
|
|
|
//void light() {
|
|
// // Called for every pixel for every light affecting the material.
|
|
// // Uncomment to replace the default light processing function with this one.
|
|
//}
|