i am working on getting a gradient map working in 3d, all the tutorials i can find are for 2d and made years ago.
at its very simplest what i am using is this
shader_type spatial;
render_mode unshaded;
uniform sampler2D gradient_texture : hint_default_black;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture,repeat_disable,filter_nearest;
void fragment(){
vec4 input_color = texture(SCREEN_TEXTURE,SCREEN_UV);
float grayscale_value = dot(input_color.rgb, vec3(0.299,0.587,0.114));
vec3 sampled_color = texture(gradient_texture,vec2(grayscale_value, 0.0)).rgb;
ALBEDO.rgb = vec3(sampled_color);
}
i have the gradient created , its working as a shader. but the result is super banded and gets weird in the dark end.
new to this kind of thing.