Skip to content

Commit

Permalink
Merge pull request #82 from Lunarsong/master
Browse files Browse the repository at this point in the history
Wrap getIBLContribution with #ifdef USE_IBL
  • Loading branch information
emackey authored Jun 1, 2018
2 parents 253b901 + a94fcda commit 88eda8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shaders/pbr-frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ vec3 getNormal()
// Calculation of the lighting contribution from an optional Image Based Light source.
// Precomputed Environment Maps are required uniform inputs and are computed as outlined in [1].
// See our README.md on Environment Maps [3] for additional discussion.
#ifdef USE_IBL
vec3 getIBLContribution(PBRInfo pbrInputs, vec3 n, vec3 reflection)
{
float mipCount = 9.0; // resolution of 512x512
Expand All @@ -165,6 +166,7 @@ vec3 getIBLContribution(PBRInfo pbrInputs, vec3 n, vec3 reflection)

return diffuse + specular;
}
#endif

// Basic Lambertian diffuse
// Implementation from Lambert's Photometria https://archive.org/details/lambertsphotome00lambgoog
Expand Down

0 comments on commit 88eda8c

Please sign in to comment.