Problems with Moonshine shaders

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
the_spice_must_flow
Prole
Posts: 13
Joined: Thu Jan 04, 2018 10:49 pm

Problems with Moonshine shaders

Post by the_spice_must_flow »

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

Code: Select all

 effect = moonshine(moonshine.effects.crt)
into love.load() and

Code: Select all

 effect.draw(function()
      love.graphics.draw(love.graphics.newImage("/res/background.png"), 0 ,0)
    end)
    
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.
starhack.love
(9.18 MiB) Downloaded 127 times
User avatar
zorg
Party member
Posts: 3468
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Problems with Moonshine shaders

Post by zorg »

What's line 214 (or 216, since you apparently can't decide which line number it is :3) of scenes/maingame.lua?
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
the_spice_must_flow
Prole
Posts: 13
Joined: Thu Jan 04, 2018 10:49 pm

Re: Problems with Moonshine shaders

Post by the_spice_must_flow »

Uncommenting line 216 will attach the black screen shader to the background entity.
Commenting out line 214 Will remove the background from the world, so there isn't a duplicate image when adding the code I posted to main.lua
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests