Löve "Light vs. Shadow" Engine [0.4.3]
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Can you provide your .love ?
Re: Löve "Light vs. Shadow" Engine [0.4.3]
I actually just realized that lightImage.setShadowType() is not lightWorld.newImage(). It works now, thank you
Btw, do you know if it is possible to have an animated character also have an "animated shadow". IE change the shadow every frame to match the frame that the character is having.
Btw, do you know if it is possible to have an animated character also have an "animated shadow". IE change the shadow every frame to match the frame that the character is having.
Re: Löve "Light vs. Shadow" Engine [0.4.3]
I think you would have to create a newImage for each frame and add/remove them which might be slow.
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Got a small issue with image shadows. When you have a light source on exactly the left or right side of an object, the image shadow becomes 1px wide.
I have been trying to implement a threshold so that the shadow never becomes that narrow, but have yet to succeed. Anyone else had this and fixed it?
I have been trying to implement a threshold so that the shadow never becomes that narrow, but have yet to succeed. Anyone else had this and fixed it?
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Yes i know, the theoretical problem is, that the image has no deep, so you can't cast a shadow from the side. In your special case (sphere), it could be possible to fake the side shadow by rotating, but this won't work for custom sprites.Jeeper wrote:Got a small issue with image shadows. When you have a light source on exactly the left or right side of an object, the image shadow becomes 1px wide.
I have been trying to implement a threshold so that the shadow never becomes that narrow, but have yet to succeed. Anyone else had this and fixed it?
But you can try the circle shadow type, maybe this is ok for your art style.
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Ah.. yeah. Well like you said, I could use circles for that. Or just accept that it does that, because it is till really cool.PriorBlue wrote:Yes i know, the theoretical problem is, that the image has no deep, so you can't cast a shadow from the side. In your special case (sphere), it could be possible to fake the side shadow by rotating, but this won't work for custom sprites.Jeeper wrote:Got a small issue with image shadows. When you have a light source on exactly the left or right side of an object, the image shadow becomes 1px wide.
I have been trying to implement a threshold so that the shadow never becomes that narrow, but have yet to succeed. Anyone else had this and fixed it?
But you can try the circle shadow type, maybe this is ok for your art style.
Btw I have a small other problem, I sent you a PM with a .love.
- CrackedP0t
- Citizen
- Posts: 69
- Joined: Wed May 07, 2014 4:01 am
- Contact:
Re: Löve "Light vs. Shadow" Engine [0.4.3]
On my computer, the third shader (the one after grainy grayscale) throws this error:
This was using an Intel Core i7 for the GPU.
Code: Select all
Error: lib/postshader.lua:124: Variable 'screen' does not exist.
A common error is to define but not use the variable.
stack traceback:
[C]: in function 'send'
lib/postshader.lua:124: in function 'addEffect'
examples/complex.lua:430: in function 'draw'
[string "boot.lua"]:438: in function <[string "boot.lua"]:399>
[C]: in function 'xpcall'
/人 ◕‿‿◕ 人\
Here, have an umlaut. Ö
Here, have an umlaut. Ö
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Everything seems to be messed up when using love.graphics.translate or love.graphics.scale.
I narrowed it down to the multiple shaders you're using. When I comment them out everything is ok.
What can I do to fix that ?
I narrowed it down to the multiple shaders you're using. When I comment them out everything is ok.
What can I do to fix that ?
Re: Löve "Light vs. Shadow" Engine [0.4.3]
I managed to find out why everything was messed up with love.graphics.scale: multiple canvas are used to apply the different shaders, so the scale factor is applied each time. I just had to apply the scale only when actually drawing to the screen.
I'll do a pull request
I'll do a pull request
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Hello!
This project seems quite nice, but I was wondering if you can actually use it easily for determining if an object is visible for light source? I was trying to look at the source and I felt, I could be wrong, that this project uses some kind of trick to draw the lights, instead of "clipping" the shadows from circle.
Anyway regardless of how the program is done, would there be any easy way around to keep a list of objects that are visible for certain light source, when it is building the light map?
Thank you for taking your time to read above post.
This project seems quite nice, but I was wondering if you can actually use it easily for determining if an object is visible for light source? I was trying to look at the source and I felt, I could be wrong, that this project uses some kind of trick to draw the lights, instead of "clipping" the shadows from circle.
Anyway regardless of how the program is done, would there be any easy way around to keep a list of objects that are visible for certain light source, when it is building the light map?
Thank you for taking your time to read above post.
Who is online
Users browsing this forum: Bing [Bot] and 1 guest