Guys, I love you, no homo. You helped me achieve exactly what I needed.
You fucking rock.
Search found 106 matches
- Fri Jul 25, 2014 6:48 pm
- Forum: Support and Development
- Topic: Preventing lighting from being drawn on the background
- Replies: 19
- Views: 9515
- Fri Jul 25, 2014 4:38 pm
- Forum: Support and Development
- Topic: Preventing lighting from being drawn on the background
- Replies: 19
- Views: 9515
Re: Preventing lighting from being drawn on the background
Using a plain vanilla stencil will only work in restricted cases. If the foreground is made of image with "holes" in it (=transparency) then a stencil will not work. A stencil function always considers the full rectangle of an image. A solution is given on the wiki-page on stencils (see p...
- Fri Jul 25, 2014 9:51 am
- Forum: Support and Development
- Topic: Preventing lighting from being drawn on the background
- Replies: 19
- Views: 9515
Re: Preventing lighting from being drawn on the background
draw_background() love.graphics.setStencil(draw_foreground()) draw_foreground() love.graphics.setStencil() [wiki]love.graphics.setStencil[/wiki] setStencil says you ONLY draw to where the stencil draws. (the stencil is just a function with stuff that is drawn) I can't draw the background manually, ...
- Fri Jul 25, 2014 8:34 am
- Forum: Support and Development
- Topic: Preventing lighting from being drawn on the background
- Replies: 19
- Views: 9515
Re: Preventing lighting from being drawn on the background
There's so much code and stuff that I'd have to spend hours to pack everything into a separate .love file.kikito wrote:Show us the code. Give us a .love file showing the issue. Otherwise it's too difficult to help you.
Edit: argh, no automerge. ;_;
- Fri Jul 25, 2014 8:33 am
- Forum: Support and Development
- Topic: Preventing lighting from being drawn on the background
- Replies: 19
- Views: 9515
Re: Preventing lighting from being drawn on the background
What method are you using for drawing the lighting? Is it a shader or a mesh or something else? It's a spritebatch. A spriteBatch like 1 sprite per pixel? *cough* inefficient *cough* I was guessing for a shader and you did not really explain how you did the lightning. 1. Draw the background 2. Star...
- Fri Jul 25, 2014 6:42 am
- Forum: Support and Development
- Topic: Preventing lighting from being drawn on the background
- Replies: 19
- Views: 9515
Re: Preventing lighting from being drawn on the background
It's a spritebatch.micha wrote:What method are you using for drawing the lighting? Is it a shader or a mesh or something else?
- Fri Jul 25, 2014 6:06 am
- Forum: Support and Development
- Topic: Preventing lighting from being drawn on the background
- Replies: 19
- Views: 9515
Re: Preventing lighting from being drawn on the background
That won't do anything.Zer0 wrote:Probably using a canvas for the foreground (everything BUT the background) that is shaded and drawing it ontop of the unshaded background.
[wiki]Canvas[/wiki]
- Thu Jul 24, 2014 8:06 pm
- Forum: Support and Development
- Topic: Preventing lighting from being drawn on the background
- Replies: 19
- Views: 9515
Preventing lighting from being drawn on the background
So I have lighting in my game, however I came across an issue - the shadows are drawn on the background. I need a way of preventing the shadows from being drawn on the background. Here's the problem I came across: https://love2d.org/imgmirrur/MvzBhmz.png The orange'ish color is the background, and o...
- Tue Jul 22, 2014 11:35 am
- Forum: Support and Development
- Topic: "Questions that don't deserve their own thread" thread
- Replies: 905
- Views: 410978
Re: "Questions that don't deserve their own thread" thread
How would I go about serialising C data? I am currently using the FFI library to create a structure that I store lots of data in, and being able to save it is crucial.
- Fri Jul 18, 2014 3:01 pm
- Forum: Support and Development
- Topic: "Questions that don't deserve their own thread" thread
- Replies: 905
- Views: 410978
Re: "Questions that don't deserve their own thread" thread
What's a screenshot or game example that demonstrates the look you want to achieve with the lighting? We might be able to help with it (and it might be a good idea to make a dedicated thread for it at this point.) Here's what the lighting looks like at the moment: https://www.dropbox.com/s/g5n70g82...