Two slices of code that I believe to be more or less identical…
Code A:
void main()
{
float Lod = textureQueryLod(Diffuse, Vert.Texcoord).y;
FragColor = test(Diffuse, Vert.Texcoord, max(Lod, 0.0));
}
Code B:
void main()
{
float Lod = max(textureQueryLod(Diffuse, Vert.Texcoord).y, 0.0);
FragColor = test(Diffuse, Vert.Texcoord, Lod);
}
Seriously, am I crazy? is this the demonstration that I slept too less for the pass 10 years or have I reached critical quantity of Tea? Because looking at these 2 pieces of code I expect the same result.
Because in practice the result are not at all the same! Code A behave as I expected it (Lod can’t be negative) will B behave extract how I don’t want it, Lod can’t be positive.
I need a nap…