k_szczech
02-20-2006, 02:59 PM
I have shader developed on GeForce 6600 and can't even get 1/3 of it's original code to run on Radeon x850. I've commented-out entire code and added the following lines at the end of the fragment shader:
vec3 color;
color.r = gl_FragCoord.x / 1280.0 + 0.5;
color.g = gl_FragCoord.y / 1024.0 + 0.5;
color.b = 0.5;
gl_FragColor.rgb = color;Alpha blending is disabled.
I run this in 1280x1024 and I get some sort of test - whenever I draw polygon it has color depending on it's location on the screen.
When I uncomment some lines at the beginning it still works, but when I uncomment more I just get a gray surfaces. Note that the fragment shader still works, because if not the color would be different.
It doesn't matter wchich lines I uncomment - at some piont I always get this - gl_FragCoord is simply (0.0, 0.0) on entire screen.
Ain't that weird?
This happened on Radeon x850, bot the same shader works fine on GeForce 7800.
Out of registers? Too many instructions?
At the point when problems begin I still have 2/3 of the fragment shader commented-out. When I try to run entire shader (as it runs on GeForce) my application stops responding when rendering polygons.
At the moment I can't post the shader code since it's on another machine, but I can post it tomorrow on demand.
However, I'm convinced there is nothing wrong with the shader, so my question is:
Is there anything wrong with ATI's GLSL support that I should know about in the first place?
Thanks in advance for any hints.
vec3 color;
color.r = gl_FragCoord.x / 1280.0 + 0.5;
color.g = gl_FragCoord.y / 1024.0 + 0.5;
color.b = 0.5;
gl_FragColor.rgb = color;Alpha blending is disabled.
I run this in 1280x1024 and I get some sort of test - whenever I draw polygon it has color depending on it's location on the screen.
When I uncomment some lines at the beginning it still works, but when I uncomment more I just get a gray surfaces. Note that the fragment shader still works, because if not the color would be different.
It doesn't matter wchich lines I uncomment - at some piont I always get this - gl_FragCoord is simply (0.0, 0.0) on entire screen.
Ain't that weird?
This happened on Radeon x850, bot the same shader works fine on GeForce 7800.
Out of registers? Too many instructions?
At the point when problems begin I still have 2/3 of the fragment shader commented-out. When I try to run entire shader (as it runs on GeForce) my application stops responding when rendering polygons.
At the moment I can't post the shader code since it's on another machine, but I can post it tomorrow on demand.
However, I'm convinced there is nothing wrong with the shader, so my question is:
Is there anything wrong with ATI's GLSL support that I should know about in the first place?
Thanks in advance for any hints.