Category : shader

I’m trying to calculate the reflection/refraction but with I perform a gl_FragColor = mix(objectColor, environmentColor, 1.0f); I start getting uniform errors that it can’t find my uniform for lightPosition. This doesn’t make sense as I’m using that uniform for calculating the diffuse lighting and when I remove the mix function to just gl_FragColor = objectColor; ..

Read more