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 / Shadow and Transparency

Author
Message
Digao the big
18
Years of Service
User Offline
Joined: 20th Sep 2007
Location:
Posted: 3rd Jul 2011 06:07
how transparency is applied to the shadows?
look in my example are the shadows of the plans.


sorry for my english[img]null[/img]
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 3rd Jul 2011 12:43 Edited at: 3rd Jul 2011 12:44
As far as I know the build-in shadow doesn't support transparency. Try using Evolved's advanced lighting:
http://www.evolved-software.com/shaders/advlighting
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Jul 2011 13:03
Or look at the demo I posted on 23rd October 2009 here:

shadow mapping with transparency
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 3rd Jul 2011 13:23 Edited at: 3rd Jul 2011 13:31
Hi Digao

As already mentioned there are different ways to tackle this issue, many ways to cook the same dish as it were.

The previous posts should show you how to achieve what you want; but for further information; observe the example below which demonstrates the use of the Set Global Shadow Color function found in the Game FX section of the documentation.

Set Global Shadow Color [red], [gree], [blue], [alpha]

The alpha parameter, like the colour parameters, is a byte range from 0 - 255

Also note that you can use FX shaders. For static shadows you could use DLLs such as Dark Lights or a map editor with light mapping facilities to draw the shadows onto your textures; which obviously eases the runtime system load although you may not want static shadows.

Here is some code to get you started



Login to post a reply

Server time is: 2026-07-11 03:38:31
Your offset time is: 2026-07-11 03:38:31