stick-the-quick/vfx/glass.gdshader

21 lines
500 B
Plaintext

shader_type spatial;
#include "res://vfx/util.gdshaderinc"
UNIVERSAL_SOLID_PARAMS
uniform vec4 color: source_color = vec4(1.0, 1.0, 1.0, 0.5);
uniform float coarseness = 0.125;
uniform vec3 glow: source_color = vec3(0.0, 0.0, 0.0);
void fragment() {
ALBEDO = color.rgb;
ALPHA = mix(color.a, 1.0, coarseness);
SPECULAR = 1.0;
METALLIC = 1.0 - coarseness;
CLEARCOAT = 1.0 - coarseness;
CLEARCOAT_ROUGHNESS = coarseness;
ROUGHNESS = coarseness;
EMISSION = glow;
UNIVERSAL_SOLID_PROCESSING
}