Jump to content
  • Advertisement
Sign in to follow this  
cwhite

GLSL vertex program running in software mode (Solved)

This topic is 4964 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi- I am trying to write a simple shader that will animate a series of objects by modifying the vertex position based on trigonometric functions. I have the following GLSL vertex program:
[source language=GLSL]
//Vertex Program


uniform float time;

void main(void)
{
	vec4 temp = gl_Vertex;
	if (gl_TexCoord[0].t > 0.9)
	{
		temp.x = temp.x + sin(time);
		temp.y = temp.y + cos(time);
	}
	gl_ClipVertex = gl_ModelViewMatrix * temp;
	gl_Position = gl_ModelViewProjectionMatrix * temp;
}


When I compile and link my vertex and fragment programs, I get the following error message: Link Successful. The GLSL vertex shader will run in software mode -- unsupported language element used. The GLSL fragment shader will run in hardware. Any ideas on how I should modify this vertex program to run in hardware? Software mode is absolutely slaughtering my performance. [Edited by - cwhite on March 14, 2005 9:18:01 PM]

Share this post


Link to post
Share on other sites
Advertisement
What graphics card do you have and what drivers? It MAY be the conditional, but i dont know enough to be sure, another idea is that it maybe doesnt like uniform floats (instead it wants float4s or something, i dont know for sure though)

hope that helps
-Dan

Share this post


Link to post
Share on other sites
It's an ATI radeon 9800 Pro. Catalyst drivers are 5.3.

Edit: My fragment program has a conditional, so I don't think that's the problem.

[Edited by - cwhite on March 14, 2005 8:07:31 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!