Keep opacity independent of direction
This commit is contained in:
parent
30f02e4ff2
commit
c1b505356c
|
|
@ -37,7 +37,7 @@ fn vs_main(ver: VertexInput) -> VertexOutput {
|
||||||
var out: VertexOutput;
|
var out: VertexOutput;
|
||||||
var light = dot(ver.normal, normalize(vec3(1., 1., 1.)));
|
var light = dot(ver.normal, normalize(vec3(1., 1., 1.)));
|
||||||
light = .7 + .3 * light;
|
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.);
|
out.clip_position = camera.mvp * vec4(ver.position, 1.);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user