Jump to content
  • Advertisement
Sign in to follow this  
Falhar

Shader problem

This topic is 4434 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!