mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
Use normalized cross product results for irradiance map generation in PBR tutorials.
This commit is contained in:
@@ -19,8 +19,8 @@ void main()
|
||||
|
||||
// tangent space calculation from origin point
|
||||
vec3 up = vec3(0.0, 1.0, 0.0);
|
||||
vec3 right = cross(up, N);
|
||||
up = cross(N, right);
|
||||
vec3 right = normalize(cross(up, N));
|
||||
up = normalize(cross(N, right));
|
||||
|
||||
float sampleDelta = 0.025;
|
||||
float nrSamples = 0.0;
|
||||
|
||||
@@ -14,8 +14,8 @@ void main()
|
||||
|
||||
// tangent space calculation from origin point
|
||||
vec3 up = vec3(0.0, 1.0, 0.0);
|
||||
vec3 right = cross(up, N);
|
||||
up = cross(N, right);
|
||||
vec3 right = normalize(cross(up, N));
|
||||
up = normalize(cross(N, right));
|
||||
|
||||
float sampleDelta = 0.025;
|
||||
float nrSamples = 0.0f;
|
||||
|
||||
@@ -14,8 +14,8 @@ void main()
|
||||
|
||||
// tangent space calculation from origin point
|
||||
vec3 up = vec3(0.0, 1.0, 0.0);
|
||||
vec3 right = cross(up, N);
|
||||
up = cross(N, right);
|
||||
vec3 right = normalize(cross(up, N));
|
||||
up = normalize(cross(N, right));
|
||||
|
||||
float sampleDelta = 0.025;
|
||||
float nrSamples = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user