Fix perspective correction issue for uv coordinates
This commit is contained in:
@@ -21,11 +21,11 @@ layout(set = 1, binding = 0) uniform CameraData {
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 light = normalize(vec3(1));
|
||||
vec3 light = normalize(vec3(10));
|
||||
vec4 worldPos = node.world * vec4(position, 1.0);
|
||||
vec3 worldNormal = normalize(transpose(inverse(mat3(node.world))) * normal);
|
||||
float brightness = max(0.0, dot(worldNormal, light));
|
||||
outColor = vec4(clamp(color.rgb * (0.5 + brightness / 2), 0, 1), 1);
|
||||
gl_Position = normalize(cam.viewProjection * worldPos);
|
||||
gl_Position = cam.viewProjection * worldPos;
|
||||
fragTextureCoordinates = textureCoordinates.xy;
|
||||
}
|
||||
Reference in New Issue
Block a user