0 Replies Latest reply on Aug 7, 2013 12:25 PM by luofxgucas

    A prblem of OpenGL shader transferring from NV GTX 650 to ATI HD 7950


      I transferred a opengl shader from NV card to ATI card. However it encouters a problem. Who can tell me why? Thanks.

      Vertex Shader:

      attribute dvec3 myvertex;

      void main()


      vec4 pos;

      pos.x = myvertex.x;

      pos.y = myvertex.y;

      pos.z = myvertex.z;

      pos.w = 1.0;

      gl_Position = gl_ModelViewProjectionMatrix * pos;


      Frag Shader:

      void main()



      gl_FragColor = vec4(1.0,0,0.0,1.0);


      The result in NV:


      The result in ATI:



      The latest news: I find a solution. I use 3 double variables instead of dvec3. The result on ATI card is correct.

      Therefore, I guess maybe dvec3 on ATI has some problems. Could ATI give me a explaination about that?



      消息编辑者为:Feixiong Luo