mirror of
https://github.com/tanema/light_world.lua.git
synced 2024-12-24 20:24:19 +00:00
fixed example of chromatic abberation in complex
This commit is contained in:
parent
2f19a07dc5
commit
0b3cc0e4a7
@ -217,7 +217,10 @@ function love.update(dt)
|
||||
if colorAberration > 0.0 then
|
||||
-- vert / horz blur
|
||||
lightWorld.post_shader:addEffect("blur", 2.0, 2.0)
|
||||
lightWorld.post_shader:addEffect("chromatic_aberration", math.sin(lightDirection * 10.0) * colorAberration, math.cos(lightDirection * 10.0) * colorAberration, math.cos(lightDirection * 10.0) * colorAberration, math.sin(lightDirection * 10.0) * -colorAberration, math.sin(lightDirection * 10.0) * colorAberration, math.cos(lightDirection * 10.0) * -colorAberration)
|
||||
lightWorld.post_shader:addEffect("chromatic_aberration",
|
||||
{math.sin(lightDirection * 10.0) * colorAberration, math.cos(lightDirection * 10.0) * colorAberration},
|
||||
{math.cos(lightDirection * 10.0) * colorAberration, math.sin(lightDirection * 10.0) * -colorAberration},
|
||||
{math.sin(lightDirection * 10.0) * colorAberration, math.cos(lightDirection * 10.0) * -colorAberration})
|
||||
else
|
||||
lightWorld.post_shader:removeEffect("blur")
|
||||
lightWorld.post_shader:removeEffect("chromatic_aberration")
|
||||
|
Loading…
Reference in New Issue
Block a user