Skip to content
Snippets Groups Projects
Commit 556bac01 authored by DarkGod's avatar DarkGod
Browse files

update runicshield shader

parent 77fabb80
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ uniform sampler2D tex;
uniform float tick;
uniform float tick_start;
uniform float aadjust;
uniform vec3 color;
uniform vec4 color;
uniform float time_factor;
uniform float ellipsoidalFactor; //1 is perfect circle, >1 is ellipsoidal
......@@ -169,7 +169,7 @@ vec4 GetFireRingColor(float currTime, vec2 pos, float freqMult, float stretchMul
vec4 result;
result.rgb = color;
result.a = verticalPos;
result.a = verticalPos * color.a;
return result;
}
......
......@@ -22,10 +22,10 @@ return {
vert = nil,
args = {
tex = { texture = 0 },
color = color or {1.0, 1.0, 1.0},
color = color or {1.0, 1.0, 1.0, 1.0},
time_factor = time_factor or 2000,
aadjust = aadjust or 10,
ellipsoidalFactor = 1.8, --1 is perfect circle, >1 is ellipsoidal
ellipsoidalFactor = ellipsoidalFactor or 1.8, --1 is perfect circle, >1 is ellipsoidal
oscillationSpeed = oscillationSpeed or 10.0, --oscillation between ellipsoidal and spherical form
antialiasingRadius = antialiasingRadius or 0.98, --1.0 is no antialiasing, 0.0 - fully smoothed(looks worse)
shieldIntensity = shieldIntensity or 0.2, --physically affects shield layer thickness
......
......@@ -33,7 +33,7 @@ newTalent{
self:heal(self:spellCrit(t.getHeal(self, t)), self)
self:attr("allow_on_heal", -1)
if core.shader.active(4) then
self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2, img="runicshield_yellow"}, {type="runicshield", color={0xe1/255, 0xcb/255, 0x3f/255}, shieldIntensity=0.1, horizontalScrollingSpeed=-0.8}))
self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2, img="runicshield_yellow"}, {type="runicshield", color={0xe1/255, 0xcb/255, 0x3f/255, 1}, shieldIntensity=0.1, horizontalScrollingSpeed=-0.8}))
end
game:playSoundNear(self, "talents/heal")
return true
......
......@@ -171,7 +171,7 @@ newTalent{
self:heal(self:spellCrit(t.getHeal(self, t)), self)
self:attr("allow_on_heal", -1)
if core.shader.active(4) then
self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2, img="runicshield_teal"}, {type="runicshield", color={0x35/255, 0x88/255, 0x8e/255}, shieldIntensity=0.15, horizontalScrollingSpeed=-0.8}))
self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2, img="runicshield_teal"}, {type="runicshield", color={0x35/255, 0x88/255, 0x8e/255, 1}, shieldIntensity=0.15, horizontalScrollingSpeed=-0.8}))
end
local target = self
......
......@@ -45,7 +45,7 @@ newTalent{
self:attr("allow_on_heal", 1)
self:heal(power, golem)
self:attr("allow_on_heal", -1)
if core.shader.active(4) then self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2}, {type="runicshield", color={0.34, 0.1, 0.5}})) end
if core.shader.active(4) then self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2}, {type="runicshield", color={0.34, 0.1, 0.5, 1}})) end
game:playSoundNear(self, "talents/arcane")
return true
end,
......
......@@ -33,7 +33,7 @@ newTalent{
self:heal(self:spellCrit(t.getHeal(self, t)), self)
self:attr("allow_on_heal", -1)
if core.shader.active(4) then
self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2}, {type="runicshield", color={0.34, 0.1, 0.5}}))
self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2}, {type="runicshield", color={0.34, 0.1, 0.5, 1}}))
end
game:playSoundNear(self, "talents/heal")
return true
......
......@@ -248,7 +248,7 @@ newTalent{
self.alchemy_golem:attr("allow_on_heal", 1)
self.alchemy_golem:heal(t.getHeal(self, t), self)
self.alchemy_golem:attr("allow_on_heal", -1)
if core.shader.active(4) then self.alchemy_golem:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2}, {type="runicshield", color={0.34, 0.1, 0.5}})) end
if core.shader.active(4) then self.alchemy_golem:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2}, {type="runicshield", color={0.34, 0.1, 0.5, 1}})) end
-- resurrect the golem
elseif not self:hasEffect(self.EFF_GOLEM_MOUNT) then
......
......@@ -135,7 +135,7 @@ newTalent{
self:attr("allow_on_heal", 1)
self:heal(maxdrain)
self:attr("allow_on_heal", -1)
if core.shader.active(4) then self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2, img="runicshield_dark"}, {type="runicshield", color={0.34, 0.1, 0.5}})) end
if core.shader.active(4) then self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2, img="runicshield_dark"}, {type="runicshield", color={0.34, 0.1, 0.5, 1}})) end
game:playSoundNear(self, "talents/ice")
return true
end,
......
......@@ -96,7 +96,7 @@ newTalent{ short_name = "SKELETON_REASSEMBLE",
self:attr("allow_on_heal", 1)
self:heal(t.getHeal(self, t), self)
self:attr("allow_on_heal", -1)
if core.shader.active(4) then self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2, img="runicshield_dark"}, {type="runicshield", color={0.34, 0.1, 0.5}})) end
if core.shader.active(4) then self:addParticles(Particles.new("shader_shield_temp", 1, {size_factor=1.1, sizev=1.5, sizea=0.2, img="runicshield_dark"}, {type="runicshield", color={0.34, 0.1, 0.5, 1}})) end
game:playSoundNear(self, "talents/heal")
return true
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