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 / What am I doing wrong with this shadow shading?

Author
Message
Dodga
16
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 9th Aug 2011 02:16
I mostly use darkgdk but I've been messing with dark basic, with darkgdk its as simple as having the shader in the project folder and setting the command to use the shader, now for the life of me, using this code, I cannot get a shadow to show, what gives?

load object "police.x", 1
load image "police_1_d2.dds", 1
load object "room.x", 2
set shadow shading on 2, 0, 100, 1
set shadow shading on 1, 0, 100, 1
set global shadows on
position light 0, 0, 100, 0
set shadow position 0, 50, 50, 30
set camera range 0, 1, 10000
autocam off
position camera 0, -50, 100, -50
point camera 0, 0, 0, 0
texture object 1,1
do

sync
LOOP
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Aug 2011 14:31
Quote: "set global shadows on"

This line is not needed for the standard shadows to work.

Quote: "set shadow position 0, 50, 50, 30"

Change this to:
set shadow position -1, 50, 50, 30

...as you are wanting to change the default location.

Maybe you could try increasing the range of the shadows too?

Just some ideas.

Login to post a reply

Server time is: 2026-07-10 17:19:58
Your offset time is: 2026-07-10 17:19:58