Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / 2D dynamic shadows

Author
Message
tarkusAB
7
Years of Service
User Offline
Joined: 15th May 2016
Location: Honolulu, Hawaii
Posted: 20th Apr 2024 23:53 Edited at: 20th Apr 2024 23:54
I'm looking for a shader that I can use to create 2D dynamic shadows using multiple lights and additive blending.

I found a thread by Janbo that gives an example of 2D dynamic shadows. (https://forum.thegamecreators.com/thread/213189) However, it has only ONE light in the center. I have found no example that uses MULTIPLE lights. And I don't understand shaders enough to modify Janbo's shader to support multiple dynamic lights and additive blending. Maybe somebody could help me understand how to modify the code.

I wish I understood shaders better....

Here's a screenshot of the game right now. I think it would benefit greatly from proper shadows.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Apr 2024 00:59 Edited at: 21st Apr 2024 01:02
tarkusAB
7
Years of Service
User Offline
Joined: 15th May 2016
Location: Honolulu, Hawaii
Posted: 21st Apr 2024 01:49
Yes, I've looked through that thread and could not find what I was looking for.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Apr 2024 22:11
This is not what you're after?
https://forum.thegamecreators.com/thread/212525
tarkusAB
7
Years of Service
User Offline
Joined: 15th May 2016
Location: Honolulu, Hawaii
Posted: 21st Apr 2024 22:31
It's close, but that and Janbo's method are the same algorithm which are not designed for multiple lights with additive blending. Would have asked in those threads but this forum's rules mean I can't bump those threads so I must create a new one.

Login to post a reply

Server time is: 2024-05-04 21:15:06
Your offset time is: 2024-05-04 21:15:06