fixed weird aura when view direction and surface normal are aligned

This commit is contained in:
Anselme 2017-08-26 12:22:13 +02:00
parent 07ec396968
commit 2fc5938a87
2 changed files with 7 additions and 1 deletions

View File

@ -31,6 +31,12 @@ const glm::mat4 Light::biasMatrix(
Texture* AmbientLight::brdfLUT = nullptr;
void AmbientLight::setBrdfLut(Texture* texture)
{
brdfLUT = texture;
brdfLUT->setWrap(GL_CLAMP_TO_EDGE);
}
void AmbientLight::bindAttributes(Shader *shader, Camera *camera)
{
int slot = PBRMaterial::NB_PBR_SLOTS;

View File

@ -64,7 +64,7 @@ public:
Texture* getAmbient() { return ambient; }
void setReflect(Texture* texture) { reflect = texture; }
Texture* getReflect() { return reflect; }
static void setBrdfLut(Texture* texture) { brdfLUT = texture; }
static void setBrdfLut(Texture* texture);
};
class DirectionnalLight : public Light