shader_type spatial; uniform sampler2D texture_albedo : source_color, filter_linear_mipmap, repeat_enable; void light() { float rim_dot_product = 1.0 - dot(VIEW, NORMAL); float rim_intensity = pow(smoothstep(0.0, 2.0, rim_dot_product) * 2.0, 4); DIFFUSE_LIGHT += rim_intensity; } void fragment() { vec2 base_uv = UV; vec4 albedo_tex = texture(texture_albedo,base_uv); ALBEDO = albedo_tex.rgb; }
or share this direct link: