Sign in to follow this  
Falhar

Shader problem

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this