Skip to content
Snippets Groups Projects
Commit 9e2706f6 authored by DarkGod's avatar DarkGod
Browse files

plop

parent 080e037d
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,8 @@ uniform float noup = 0.0;
uniform vec2 ellipsoidalFactor = vec2(1.0, 1.0); //(1.0, 1.0) is perfect circle, (2.0, 1.0) is vertical ellipse, (1.0, 2.0) is horizontal ellipse
uniform float verticalIntensityAdjust = 0.0; //negative number negates bottom flame, positive number negates top flame, 0.0 leaves it regular
vec4 permute( vec4 x ) {
......@@ -105,7 +107,7 @@ vec2 snoise2(vec3 pos)
float GetFireDelta(float currTime, vec2 pos, float freqMult, float stretchMult, float scrollSpeed, float evolutionSpeed)
{
//firewall
float delta = 0;
float delta = 0.0;
// pos.y += (1.0 - pos.y) * 0.5;
//pos.y += 0.5;
pos.y /= stretchMult;
......@@ -167,14 +169,25 @@ void main(void)
float ringRadius = 0.3;
float ringWidth = 0.2;
vec2 dir = radius / radiusLen;
float intensityAdjust = 0.0;
if(verticalIntensityAdjust > 0.0)
{
intensityAdjust = (1.0 + dir.y) * abs(verticalIntensityAdjust);
}else
{
intensityAdjust = (1.0 - dir.y) * abs(verticalIntensityAdjust);
}
vec4 c;
if(radiusLen > ringRadius - ringWidth && radiusLen < ringRadius)
{
c = GetFireRingColor(tick / time_factor + 0.0 , radius, 6, 15.0, 1, 2, ringRadius, ringRadius - ringWidth, 0.0, 0.5);
c = GetFireRingColor(tick / time_factor + 0.0 , radius, 6.0, 15.0, 1.0, 2.0 + intensityAdjust, ringRadius, ringRadius - ringWidth, 0.0, 0.5);
}else
if(radiusLen < ringRadius + ringWidth && radiusLen >= ringRadius)
{
c = GetFireRingColor(tick / time_factor + 10.0 , radius, 6, 15.0, 1, 2, ringRadius, ringRadius + ringWidth, 0.0, 0.5);
c = GetFireRingColor(tick / time_factor + 10.0 , radius, 6.0, 15.0, 1.0, 2.0 + intensityAdjust, ringRadius, ringRadius + ringWidth, 0.0, 0.5);
}else
{
c = vec4(0.0, 0.0, 0.0, 0.0);
......@@ -182,6 +195,7 @@ void main(void)
c.a *= gl_Color.a;
if (noup == 1.0) { if (gl_TexCoord[0].y < 0.5) c.a = 0.0; }
else if (noup == 2.0) { if (gl_TexCoord[0].y >= 0.5) c.a = 0.0; }
gl_FragColor = c;
}
......@@ -25,6 +25,7 @@ return {
time_factor = time_factor or 4000,
ellipsoidalFactor = ellipsoidalFactor or {1,1}, --1 is perfect circle, >1 is ellipsoidal
noup = noup or 0,
verticalIntensityAdjust = verticalIntensityAdjust or 0,
},
clone = false,
}
......@@ -166,9 +166,9 @@ newTalent{
}
local particle
if core.shader.active(4) then
ret.particle1 = self:addParticles(Particles.new("shader_ring_rotating", 1, {rotation=0, radius=1.1, img="coldgeneric"}, {type="circular_flames", ellipsoidalFactor={1,2}, time_factor=22000, noup=2.0}))
ret.particle1 = self:addParticles(Particles.new("shader_ring_rotating", 1, {rotation=0, radius=1.1, img="coldgeneric"}, {type="circular_flames", ellipsoidalFactor={1,2}, time_factor=22000, noup=2.0, verticalIntensityAdjust=-3.0}))
ret.particle1.toback = true
ret.particle2 = self:addParticles(Particles.new("shader_ring_rotating", 1, {rotation=0, radius=1.1, img="coldgeneric"}, {type="circular_flames", ellipsoidalFactor={1,2}, time_factor=22000, noup=1.0}))
ret.particle2 = self:addParticles(Particles.new("shader_ring_rotating", 1, {rotation=0, radius=1.1, img="coldgeneric"}, {type="circular_flames", ellipsoidalFactor={1,2}, time_factor=22000, noup=1.0, verticalIntensityAdjust=-3.0}))
else
ret.particle1 = self:addParticles(Particles.new("uttercold", 1))
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment