border shader

This commit is contained in:
Asuro
2025-05-19 18:19:28 +02:00
parent ec7a709570
commit 1a8be39c19
2 changed files with 6 additions and 5 deletions

View File

@@ -89,8 +89,9 @@ void main()
{
vec2 uv = vec2(1.0 - v_uv0.x, v_uv0.y);
vec3 rawTex = texture2D(s_texColor, uv).xyz;
vec3 col = rawTex * u_dotColor.xyz;
float brightness = lerp(0.5, 0.9, calcBrightnessDirectional(vec3(0.5, 0.3, 1.0), v_normal));
brightness = 1.0;
// float brightness = lerp(0.5, 0.9, calcBrightnessDirectional(vec3(0.5, 0.3, 1.0), v_normal));
vec3 col = rawTex;
if (uv.x < 0.1 || uv.y < 0.1 || uv.x > 0.9 || uv.y > 0.9) col *= u_dotColor.xyz;
float brightness = 1.0;
gl_FragColor = vec4(col * brightness, 1.0);
}