Reaaly slow vertex + fragment shader

Started by DanDanger, March 17, 2006, 23:34:19

Previous topic - Next topic

DanDanger

Hello,

Ive written a vertex and fragment shader (the simplest you can imagine) however when i try to render anything with these activated it renders INCREDIBELY slowly. Has anyone had any problems like this? Im using an ATI x800 gfx card and the logs claim that the vertex+frag shaders are running in hardware.

This has been driving me nuts for about 3 days now so any help would be really appreciated ^_^

// vert shader
void main()
{
   gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}

// frag shader
void main()
{
  gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}

-------- additional info --------
Having disabled the fragment shader it now runs at full speed.

spasi

There are some GL states that, if enabled, cause software rendering when using GLSL fragment shaders on ATI cards. I've found the following to be problematic in many occasions:

QuoteAA lines, AA points, wide lines, wide points, line stipple, polygon stipple and polygon offset.

Try disabling some of the above (if enabled) and see what happens.

DanDanger

You sir, are a genius! I love you and want to have your children ^_^

by putting in this:

GL11.glDisable(GL11.GL_LINE_SMOOTH);

my fragment shader runs at full speed! I can get on with the rest of me game now!

Thank you so very much ^_^




Quote from: "spasi"There are some GL states that, if enabled, cause software rendering when using GLSL fragment shaders on ATI cards. I've found the following to be problematic in many occasions:

QuoteAA lines, AA points, wide lines, wide points, line stipple, polygon stipple and polygon offset.

Try disabling some of the above (if enabled) and see what happens.