@nvidia: Random behaviour in glsl-shader on nvidia hardware

Hi,

I have a very, very anoying problem. I have a number of shaders where I do some tonemapping before writing the result into the framebuffer. Since the shader share the same code, I simply put together some strings to build my shader code.

However, while it works fine for most shader, one shader simply transposes the matrices I have encoded as constants like this:

const mat3 XYZtoRGB = mat3( 3.240479, -0.969256, 0.055648,
                            -1.537150, 1.875992, -0.204043,
                            -0.498535, 0.041556, 1.057311);

const mat3 RGBtoXYZ = mat3( 0.412453, 0.212671, 0.019334,
                            0.357580, 0.715160,0.119193,
                            0.180423, 0.072169, 0.950227);

This happens since driver release 81.xx, before that everything was fine.
What might cause this eratic behaviour? To be clear: The shader use exactly the same code in this part!!!

Any ideas?

Case

Ok, it is a driver bug that hasn´t been fixed yet. Otherwise there is no explanation why this

vec3 CIEtoRGB(in vec3 color)
{
  return color * mat3( 3.240479, -0.969256, 0.055648,
                            -1.537150, 1.875992, -0.204043,
                            -0.498535, 0.041556, 1.057311);;
}

works correctly while this

const mat3 XYZtoRGB = mat3( 3.240479, -0.969256, 0.055648,
                            -1.537150, 1.875992, -0.204043,
                            -0.498535, 0.041556, 1.057311);
vec3 CIEtoRGB(in vec3 color)
{
  return color * XYZtoRGB;
}

doesn´t work.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.