Jump to content
  • Advertisement
Sign in to follow this  

Shader problem

This topic is 4527 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

i'm trying to make particle shader . i've made basic shader and now i'am trying to add rotation .. and i'm geting strange results. when the angle of particle is other than 0 deg it slow down 300->20 FPS and makes weird(??) things with varying variables. :( code: float rot = radians(0.0); float COS = cos(rot); float SIN = sin(rot); vec2 p = vec2(COS*gl_Vertex.x-SIN*gl_Vertex.y,SIN*gl_Vertex.x+COS*gl_Vertex.y); vec4 pos; pos.xyz = pns.xyz+pns.w*(A*p.x+B*p.y); without rotation and 0 angle it works good but when i change angle to anything else it stops working good :(( - sorry for bad english

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!