Problems with Moonshine shaders
Posted: Sat Sep 08, 2018 9:37 pm
I'm having a problem with the Moonshine modules. Attempting to draw the shader causes the screen to go black instead of correctly applying the shader. I have a few draw wrapper functions in the Kernel module, drawShader, drawQuadShader, and drawTextShader. These wrapper functions call Moonshine. The shader works correctly if you comment out line 214 of scenes/maingame.lua, add
into love.load() and
into love.draw()
You can reproduce the black screen error by uncommenting line 216 of scenes/maingame.lua
Does anyone know what the problem is? I am finding this even more wonky than the problems I am having with my chunk loader.
Here is a stripped down copy of my .love file, for clarity.
Code: Select all
effect = moonshine(moonshine.effects.crt)
Code: Select all
effect.draw(function()
love.graphics.draw(love.graphics.newImage("/res/background.png"), 0 ,0)
end)
You can reproduce the black screen error by uncommenting line 216 of scenes/maingame.lua
Does anyone know what the problem is? I am finding this even more wonky than the problems I am having with my chunk loader.
Here is a stripped down copy of my .love file, for clarity.