diff options
author | Dobbias <dobbias1@gmail.com> | 2017-04-13 16:46:16 +0200 |
---|---|---|
committer | Dobbias <dobbias1@gmail.com> | 2017-04-13 16:46:16 +0200 |
commit | 5404e108037829e5b49c79e2bca4dc9b902c2259 (patch) | |
tree | 5b80204b479e2d594ea7c6251c9c9595532ead7f | |
parent | c4d3dd1a486479b243999bdc30bf26e5683a3b33 (diff) |
replaced incompatible keywords/function
-rw-r--r-- | drivers/gles3/shaders/particles.glsl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gles3/shaders/particles.glsl b/drivers/gles3/shaders/particles.glsl index f789be24cf..fa12dd7408 100644 --- a/drivers/gles3/shaders/particles.glsl +++ b/drivers/gles3/shaders/particles.glsl @@ -101,7 +101,7 @@ void main() { restart_phase*= (1.0-explosiveness); bool restart=false; - bool active = velocity_active.a > 0.5; + bool shader_active = velocity_active.a > 0.5; if (system_phase > prev_system_phase) { if (prev_system_phase < restart_phase && system_phase >= restart_phase) { @@ -134,7 +134,7 @@ void main() { uint particle_number = current_cycle * uint(total_particles) + uint(gl_VertexID); if (restart) { - active=emitting; + shader_active=emitting; } mat4 xform; @@ -148,7 +148,7 @@ void main() { out_velocity_active=vec4(0.0); out_custom=vec4(0.0); if (!restart) - active=false; + shader_active=false; xform = mat4( vec4(1.0,0.0,0.0,0.0), @@ -163,7 +163,7 @@ void main() { xform = transpose(mat4(xform_1,xform_2,xform_3,vec4(vec3(0.0),1.0))); } - if (active) { + if (shader_active) { //execute shader { @@ -178,7 +178,7 @@ VERTEX_SHADER_CODE for(int i=0;i<attractor_count;i++) { vec3 rel_vec = xform[3].xyz - attractors[i].pos; - float dist = rel_vec.length(); + float dist = length(rel_vec); if (attractors[i].radius < dist) continue; if (attractors[i].eat_radius>0 && attractors[i].eat_radius > dist) { @@ -215,7 +215,7 @@ VERTEX_SHADER_CODE xform = transpose(xform); - out_velocity_active.a = mix(0.0,1.0,active); + out_velocity_active.a = mix(0.0,1.0,shader_active); out_xform_1 = xform[0]; out_xform_2 = xform[1]; |