remember to fix normals to [-1, 1]
This commit is contained in:
@@ -45,7 +45,7 @@ float dither(vec2 uv) {
|
||||
void main()
|
||||
{
|
||||
// only sample normals for normal mapped geometry
|
||||
vec3 normal = bool(normalMapped) ? vec3(texture(normalSampler, textureCoordinates)) : normal_in;
|
||||
vec3 normal = bool(normalMapped) ? 2*vec3(texture(normalSampler, textureCoordinates))-1 : normal_in;
|
||||
|
||||
vec3 N = normalize(normal);
|
||||
vec3 V = normalize(cameraPosition - worldPosition);
|
||||
|
||||
Reference in New Issue
Block a user