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.

DarkBASIC Professional Discussion / Cubic shadow mapping shader - Packing multiple lights into one texture

Author
Message
Broken_Code
15
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 7th Jan 2014 21:00 Edited at: 7th Jan 2014 21:05
Hello all!

I've been working on packing multiple lights into one texture.
It was going well but recently I hit a Problem and can't get any further:

Depth mapping in two passes in one technique works for one light (because the cubemap is rendered at the Position of one of the lights but not the other) but not the other:



Depthmapping in two techniques (with two cubemap renders) works for light cast on the Scene but not for shadows cast by Scene objects:


Project, shader and exe (compiled with first variation) in download [~7MB].

What am I doing wrong? I expected that the second variant would work but I don't understand why that dosen't Show shadows from Scene objects.

Any help is appreciated!

Thanks,
Bruce

"... Why the hell did I chose game creation as a hobby!?" - Burning Feet Man
Broken_Code
15
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 7th Jan 2014 21:54 Edited at: 7th Jan 2014 21:56
Maybe it has somthing to do with the blend Operation?

I tried 'BlendOp = ADD;' instead of an Alpha blend but that didn't help, any ideas??

"... Why the hell did I chose game creation as a hobby!?" - Burning Feet Man
Broken_Code
15
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 7th Jan 2014 22:32
This is my current blend Setting for the 2nd cubemap render:


SrcBlend = ONE;
DestBlend = ONE;
BlendOp = ADD;
ColorWriteEnable = GREEN;

However, this lets Light1 overwrite Light0's shadows. This shouldn't happen because they're in different channels in the texture ?!?!?!?

"... Why the hell did I chose game creation as a hobby!?" - Burning Feet Man

Login to post a reply

Server time is: 2026-07-07 05:39:31
Your offset time is: 2026-07-07 05:39:31