diff options
| author | 1029chris <1029chris@gmail.com> | 2016-08-04 17:03:41 -0700 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2016-08-04 17:03:41 -0700 |
| commit | a44b67729ebd8370ba4ba07851e9b1b85af57e55 (patch) | |
| tree | 43a8b2192b77071e273fed1aff6caa147f3d2549 | |
| parent | 5a5df103bfc3b023cd17d42a7136d4f397aac107 (diff) | |
Added mask effect (from Love2D wiki)
https://love2d.org/wiki/love.graphics.setStencil
| -rw-r--r-- | assets.lua | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -262,6 +262,14 @@ function loadAssets(id) video = {} video.attacktortoise = love.graphics.newVideo("assets/attacktortoise.ogv") loadVar() + mask_effect = love.graphics.newShader[[ + vec4 effect (vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords) { + if (Texel(texture, texture_coords).rgb == vec3(0.0)) { + discard; + } + return vec4(1.0); + } + ]] end if id == 17 then loadDia() |
