Keep opacity independent of direction

This commit is contained in:
numzero 2024-11-17 20:14:04 +03:00
parent 30f02e4ff2
commit c1b505356c

View File

@ -37,7 +37,7 @@ fn vs_main(ver: VertexInput) -> VertexOutput {
var out: VertexOutput;
var light = dot(ver.normal, normalize(vec3(1., 1., 1.)));
light = .7 + .3 * light;
out.vertex_color = light * mesh.color;
out.vertex_color = vec4(light * mesh.color.xyz, mesh.color.w);
out.clip_position = camera.mvp * vec4(ver.position, 1.);
return out;
}