- Added an event when switching to another input device. - Added InitialSetupMenu, which shows up when starting the game for the first time. - Updated entrance hall csg. - Added DialogBank for easier localization. - Shaders can now be paused and time scaled. - Added shading the edges of the beating lightbeam shader.
30 lines
902 B
Plaintext
30 lines
902 B
Plaintext
shader_type spatial;
|
|
render_mode unshaded, shadows_disabled, cull_disabled;
|
|
#include "uid://cy7b01or0ckgk" // Rhythm Helper
|
|
|
|
uniform vec3 color: source_color = vec3(1.0, 1.0, 1.0);
|
|
uniform float alpha_multiplier: hint_range(0.0, 1.0, 0.001) = 0.25;
|
|
uniform sampler2D albedo;
|
|
uniform float flash_exponent = 3.0;
|
|
uniform float edge_fade = 0.5;
|
|
|
|
void vertex() {
|
|
// Called for every vertex the material is visible on.
|
|
}
|
|
|
|
void fragment() {
|
|
float phase = get_beat_phase();
|
|
vec4 tex = texture(albedo, UV);
|
|
|
|
float edge = dot(NORMAL, VIEW);
|
|
edge = clamp(pow(edge, mix(8.0, 2.0, edge_fade)), 0.0, 1.0);
|
|
|
|
ALBEDO = mix(tex.rgb, color.rgb, 0.5);
|
|
ALPHA = max(tex.a * ease(1.0 - phase, flash_exponent) * alpha_multiplier * edge, 0.0);
|
|
}
|
|
|
|
//void light() {
|
|
// // Called for every pixel for every light affecting the material.
|
|
// // Uncomment to replace the default light processing function with this one.
|
|
//}
|