24 lines
497 B
Plaintext
24 lines
497 B
Plaintext
shader_type spatial;
|
|
|
|
#include "res://vfx/util.gdshaderinc"
|
|
|
|
UNIVERSAL_SOLID_PARAMS
|
|
uniform sampler2D image: TEXTURE_HINTS;
|
|
uniform float exponent = 1.0;
|
|
|
|
void fragment() {
|
|
ALBEDO = texture(image, UV).rgb;
|
|
vec3 hsv = rgb2hsv(ALBEDO);
|
|
float neon = pow(hsv.z, exponent);
|
|
float chrome = 1.0 - neon;
|
|
EMISSION = ALBEDO*neon;
|
|
METALLIC = chrome;
|
|
CLEARCOAT = chrome;
|
|
CLEARCOAT_ROUGHNESS = neon;
|
|
ROUGHNESS = neon;
|
|
SPECULAR = chrome;
|
|
RIM = chrome;
|
|
RIM_TINT = neon;
|
|
UNIVERSAL_SOLID_PROCESSING
|
|
}
|