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 / Help with cubic shadow shader -> adding normal mapping OR more lights

Author
Message
Broken_Code
15
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 29th Jan 2013 19:14
Hello all!

I've been trying for some time to make a shader which will have both normal mapping and shadow mapping from multiple lights.

There are 2 shaders which each do half of what I want:
Green Gandalf wrote a very good shadow shader with multiple lights:



EVOLVED wrote a very nice shadow shader with normal mapping but only one light:



I started with EVOLVED's shader and tried to add more lights to it, I've got to the part where all the light's effects must be combined and I'm not really sure what to do next, I'm a bit out of my depth with this shader, can anyone help?

Here's my effort of changing EVOLVED's shader (works with one light, and all but the final pixel shader with 2 lights):



If anyone can help me add normal mapping to GG's shader or multiple lights to EVOLVED's shader that'd be awesome!

Thanks,
BC
Broken_Code
15
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 29th Jan 2013 19:18
Forgot to upload the DBP code for these!
Here's the code for GG's shader:


and here's the code for EVOLVED's shader:


And the code for my effort:

Login to post a reply

Server time is: 2026-07-07 02:39:38
Your offset time is: 2026-07-07 02:39:38