Updated particle fire shaders (Fixes #259)

This commit is contained in:
saschawillems 2016-12-19 20:21:44 +01:00
parent a88ddff390
commit ef26748142
8 changed files with 45 additions and 41 deletions

View file

@ -7,10 +7,9 @@ layout (binding = 1) uniform sampler2D samplerSmoke;
layout (binding = 2) uniform sampler2D samplerFire;
layout (location = 0) in vec4 inColor;
layout (location = 1) in float inPointSize;
layout (location = 2) in float inAlpha;
layout (location = 3) in flat int inType;
layout (location = 4) in float inRotation;
layout (location = 1) in float inAlpha;
layout (location = 2) in flat int inType;
layout (location = 3) in float inRotation;
layout (location = 0) out vec4 outFragColor;
@ -25,7 +24,7 @@ void main ()
float rotCenter = 0.5;
float rotCos = cos(inRotation);
float rotSin = sin(inRotation);
vec2 rotUV = vec2(
vec2 rotUV = vec2(
rotCos * (gl_PointCoord.x - rotCenter) + rotSin * (gl_PointCoord.y - rotCenter) + rotCenter,
rotCos * (gl_PointCoord.y - rotCenter) - rotSin * (gl_PointCoord.x - rotCenter) + rotCenter);