cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

luofxgucas
Journeyman III

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:

http://img.bbs.csdn.net/upload/201308/07/1375859803_251062.png

The result in ATI:

http://img.bbs.csdn.net/upload/201308/07/1375859818_908485.png

=============================================================================

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?

Thanks.

消息编辑者为:Feixiong Luo

0 Likes
0 Replies