Hello,
I have a code in glsl which samples an env map from a given direction.
uniform samplerCube envSampler;
varying vec3 direction;
vec4 envColor = texture(envSampler, direction);
I want to use textureGrad to specify explicit gradient for mipmap level computation.
uniform samplerCube envSampler; (LINEAR_MIPMAP_LINEAR)
varying vec3 direction;
vec4 envColor = texture(envSampler, direction, dFdX(direction), dFdY(direction));
If I read the spec correctly this should give the same result, but in practice it does not. Actually I have slight difference for mipmap level (and sometimes more than one level variation). And I do not multisampling for this test.
Am I completely wrong ?