From 556bac0117797ccd60f051e4aad514b8c1270c29 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Wed, 30 Oct 2013 12:21:24 +0100 Subject: [PATCH] update runicshield shader --- game/modules/tome/data/gfx/shaders/runicshield.frag | 4 ++-- game/modules/tome/data/gfx/shaders/runicshield.lua | 4 ++-- game/modules/tome/data/talents/celestial/light.lua | 2 +- .../tome/data/talents/chronomancy/age-manipulation.lua | 2 +- game/modules/tome/data/talents/spells/advanced-golemancy.lua | 2 +- game/modules/tome/data/talents/spells/aegis.lua | 2 +- game/modules/tome/data/talents/spells/golemancy.lua | 2 +- game/modules/tome/data/talents/spells/necrosis.lua | 2 +- game/modules/tome/data/talents/undeads/skeleton.lua | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/game/modules/tome/data/gfx/shaders/runicshield.frag b/game/modules/tome/data/gfx/shaders/runicshield.frag index 6787039615..ec643aa02e 100644 --- a/game/modules/tome/data/gfx/shaders/runicshield.frag +++ b/game/modules/tome/data/gfx/shaders/runicshield.frag @@ -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; } diff --git a/game/modules/tome/data/gfx/shaders/runicshield.lua b/game/modules/tome/data/gfx/shaders/runicshield.lua index b8efca5e97..5ba9b5c5c3 100644 --- a/game/modules/tome/data/gfx/shaders/runicshield.lua +++ b/game/modules/tome/data/gfx/shaders/runicshield.lua @@ -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 diff --git a/game/modules/tome/data/talents/celestial/light.lua b/game/modules/tome/data/talents/celestial/light.lua index ac2168a57a..12548116fc 100644 --- a/game/modules/tome/data/talents/celestial/light.lua +++ b/game/modules/tome/data/talents/celestial/light.lua @@ -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 diff --git a/game/modules/tome/data/talents/chronomancy/age-manipulation.lua b/game/modules/tome/data/talents/chronomancy/age-manipulation.lua index f6dd0dcc30..5067c2ddac 100644 --- a/game/modules/tome/data/talents/chronomancy/age-manipulation.lua +++ b/game/modules/tome/data/talents/chronomancy/age-manipulation.lua @@ -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 diff --git a/game/modules/tome/data/talents/spells/advanced-golemancy.lua b/game/modules/tome/data/talents/spells/advanced-golemancy.lua index cda9de2905..6fd6ef349d 100644 --- a/game/modules/tome/data/talents/spells/advanced-golemancy.lua +++ b/game/modules/tome/data/talents/spells/advanced-golemancy.lua @@ -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, diff --git a/game/modules/tome/data/talents/spells/aegis.lua b/game/modules/tome/data/talents/spells/aegis.lua index 86edd992ea..db46a3c520 100644 --- a/game/modules/tome/data/talents/spells/aegis.lua +++ b/game/modules/tome/data/talents/spells/aegis.lua @@ -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 diff --git a/game/modules/tome/data/talents/spells/golemancy.lua b/game/modules/tome/data/talents/spells/golemancy.lua index f679afc5d2..b718b3e5ad 100644 --- a/game/modules/tome/data/talents/spells/golemancy.lua +++ b/game/modules/tome/data/talents/spells/golemancy.lua @@ -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 diff --git a/game/modules/tome/data/talents/spells/necrosis.lua b/game/modules/tome/data/talents/spells/necrosis.lua index 59f02d62ca..01e50c5414 100644 --- a/game/modules/tome/data/talents/spells/necrosis.lua +++ b/game/modules/tome/data/talents/spells/necrosis.lua @@ -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, diff --git a/game/modules/tome/data/talents/undeads/skeleton.lua b/game/modules/tome/data/talents/undeads/skeleton.lua index d0cdf2b541..c94ac61a6c 100644 --- a/game/modules/tome/data/talents/undeads/skeleton.lua +++ b/game/modules/tome/data/talents/undeads/skeleton.lua @@ -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, -- GitLab