stick-the-quick/vfx/gemstone.gdshader

22 lines
509 B
Plaintext
Raw Permalink Normal View History

shader_type spatial;
#include "res://vfx/util.gdshaderinc"
UNIVERSAL_SOLID_PARAMS
uniform sampler2D image: TEXTURE_HINTS;
uniform float reflectivity = 0.9;
uniform float radiance = 0.03;
void fragment() {
ALBEDO = texture(image, UV).rgb;
SPECULAR = reflectivity;
CLEARCOAT = reflectivity;
CLEARCOAT_ROUGHNESS = 1.0 - reflectivity;
ROUGHNESS = 1.0 - reflectivity;
METALLIC = reflectivity;
RIM = reflectivity;
RIM_TINT = 1.0 - reflectivity;
EMISSION = ALBEDO*radiance;
UNIVERSAL_SOLID_PROCESSING
}