From a94fcda490fa81f1a5d6f30b139fc8ea94676f9d Mon Sep 17 00:00:00 2001 From: Shanee Nishry Date: Wed, 30 May 2018 21:49:53 -0700 Subject: [PATCH] Wrap getIBLContribution with #ifdef USE_IBL --- shaders/pbr-frag.glsl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shaders/pbr-frag.glsl b/shaders/pbr-frag.glsl index 00daeda9..e59d4c53 100644 --- a/shaders/pbr-frag.glsl +++ b/shaders/pbr-frag.glsl @@ -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 @@ -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