diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 15e4aaba55e19c5d62145851c15bad94197f1cca..f805061294246c8ca75a523379ea6ec4073aac19 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -300,6 +300,7 @@ function _M:act() self.shader_old_life = self.life self.old_air = self.air self.old_psi = self.psi + self.old_healwarn = (self:attr("no_healing") or ((self.healing_factor or 1) <= 0)) -- Clean log flasher -- game.flash:empty() @@ -348,6 +349,13 @@ function _M:updateMainShader() if solipsism_power > 0 then game.fbo_shader:setUniform("solipsism_warning", solipsism_power) else game.fbo_shader:setUniform("solipsism_warning", 0) end end + if (self:attr("no_healing") or ((self.healing_factor or 1) <= 0)) ~= self.old_healwarn then + if (self:attr("no_healing") or ((self.healing_factor or 1) <= 0)) then + game.fbo_shader:setUniform("intensify", {0.3,1.3,0.3,1}) + else + game.fbo_shader:setUniform("intensify", {0,0,0,0}) + end + end -- Colorize shader if self:attr("stealth") and self:attr("stealth") > 0 then game.fbo_shader:setUniform("colorize", {0.9,0.9,0.9,0.6}) diff --git a/game/modules/tome/data/gfx/shaders/main_fbo.frag b/game/modules/tome/data/gfx/shaders/main_fbo.frag index d169b8d944e9da97d6dcee13ddce5ce931f61fb7..21d7fac18e0090213f65d1be92cace243b5938bc 100644 --- a/game/modules/tome/data/gfx/shaders/main_fbo.frag +++ b/game/modules/tome/data/gfx/shaders/main_fbo.frag @@ -1,5 +1,6 @@ uniform float hp_warning; uniform float air_warning; +uniform float death_warning; uniform float solipsism_warning; uniform float motionblur; uniform float blur; @@ -104,9 +105,14 @@ void main(void) if (intensify.r > 0.0 || intensify.g > 0.0 || intensify.b > 0.0) { +/* float grey = gl_FragColor.r*0.3+gl_FragColor.g*0.59+gl_FragColor.b*0.11; vec4 vgrey = vec4(grey, grey, grey, gl_FragColor.a); gl_FragColor = max(gl_FragColor * intensify, vgrey); +*/ + float grey = gl_FragColor.r*0.3+gl_FragColor.g*0.59+gl_FragColor.b*0.11; + vec4 vgrey = vec4(grey, grey, grey, gl_FragColor.a); + gl_FragColor = gl_FragColor * intensify; } if (hp_warning > 0.0)