Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Different shading results in ATI Cat 4.4 and NV FW 57.10

  1. #1
    Member Regular Contributor
    Join Date
    Apr 2002
    Location
    Austria
    Posts
    328

    Different shading results in ATI Cat 4.4 and NV FW 57.10

    Hi all!

    I've got a problem with a tangent space bump mapping shader. After a lot of pseudo-debugging I noticed that the problem is in my vertex-shader. I different values for my light and my view vectors on ATI Catalyst 4.4 and NV ForceWare 57.10.

    Here's my vertex shader source:
    Code :
    attribute vec3 a2v_Normal;
    attribute vec3 a2v_Tangent;
    attribute vec3 a2v_Binormal;
    attribute vec2 a2v_TexCoord;
     
    varying vec3 v2f_LightVec1;
    varying vec3 v2f_LightVec2;
     
    varying vec3 v2f_ViewVec;
    varying vec2 v2f_TexCoord;
     
    void main()
    {
    	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
     
    	mat3 TBN_Matrix;
    	TBN_Matrix[0] = gl_NormalMatrix * a2v_Tangent;
    	TBN_Matrix[1] = gl_NormalMatrix * a2v_Binormal;
    	TBN_Matrix[2] = gl_NormalMatrix * a2v_Normal;
     
    Space
    	vec4 Vertex_ModelView = gl_ModelViewMatrix * gl_Vertex;
    	v2f_LightVec1 = (TBN_Matrix * vec3(gl_LightSource[0].position - Vertex_ModelView));
    	v2f_LightVec2 = (TBN_Matrix * vec3(gl_LightSource[1].position - Vertex_ModelView));
    	v2f_ViewVec = TBN_Matrix * vec3(-Vertex_ModelView);
     
    	v2f_TexCoord = a2v_TexCoord;
    }
    Thanks a lot for every help!
    There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

    There is another theory which states that this has already happened...

  2. #2

    Re: Different shading results in ATI Cat 4.4 and NV FW 57.10

    Aparently there is still a few bugs here and there.
    until recently the lightsource position had the wrong value in the ATI drivers(v4.3), but that had been fixed in the 4.4 drivers(acording to http://www.clockworkcoders.com/oglsl ).
    One can only imagine that more of these little buggs exist here and there in booth drivers.

    You will just have to wait until booth ATI and Nvidia release the non beta version of GLSLang.
    perhaps then they will work the same way for booth of them.

  3. #3
    Member Regular Contributor
    Join Date
    Apr 2002
    Location
    Austria
    Posts
    328

    Re: Different shading results in ATI Cat 4.4 and NV FW 57.10

    ...until recently the lightsource position had the wrong value in the ATI drivers(v4.3)...
    Thanks for the info. Both (ATI and NV) give a nearly good image but even though they are a little bit different. I had the idea that the image produced by ATI isn't 100% correct.
    There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

    There is another theory which states that this has already happened...

  4. #4

    Re: Different shading results in ATI Cat 4.4 and NV FW 57.10

    The nvidia glsl implementation is probobly less completed than the ATI one.
    However i do beleve that nvidia is not far behind.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •