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.

Dark GDK / Complex Shaders Question

Author
Message
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 30th Jul 2007 01:46
has anyone gotten any complex shader effects (multiple cameras) to work in the GDK yet...

i've spent most of the day translating Evolved SoftShadow code from DBPro to c++, with no luck so far... all i get is objects with no texture or shader stuff...

it works fine in DBPro...

here's the code... any ideas...




some of the commented stuff hasn't been ported over yet, but i think the essentials are there... i should be seeing something like what i see in DBPro...

--Mike
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 30th Jul 2007 02:11
Hi this may be a long shot but set
dbSetVector4(6,0.5f,0.5f,0.5f,1.0f); and uncomment dbSetEffectConstantVector (1,"Ambient",6);

Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 30th Jul 2007 02:16 Edited at: 30th Jul 2007 02:23
thx J... i'll try anything about now...


hey... quick question... is this thranslation of the following DBPro statement correct...

DBPro - sync mask 2^0
GDK - dbSyncMask(0x001);

thx


--Mike
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 30th Jul 2007 12:02
It would be easier to help if the fx & media files were included...
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 30th Jul 2007 16:11 Edited at: 30th Jul 2007 16:42
thx Morcilla, i'll gather em together in a few...

OK, here it is... c++ code, DBPro code, resources...

http://home.att.net/~mikey102/SoftShadowTest.zip

i changed the code a lil so that the resource paths are relative to the app path, so just toss the Media and FX folders in the app directory...

(everything checked for viruses before and after compressing)

--Mike
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 31st Jul 2007 12:37 Edited at: 31st Jul 2007 12:56
I got some soft shadows, although I'm not sure if that's the final result, as my DBPro version is not up to date.

You can check the source file attached. I just enabled the for-loops that excluded on/off the objects.

I also put them on a .sln solution file, because I was having linking issues.

[edit: oops, .vcproj file is needed also to use the .sln, I re-attach]

Attachments

Login to view attachments
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 31st Jul 2007 15:05
thx Morcilla... i'll take a look at this in a few...

--Mike
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 5th Aug 2007 16:13
i finally got the shadow shader code working... seems as if there's some issues with the ambient shader and the shadow shader...

i had to use based cpu shadows, and substitued the code that caled for the ambient shader effect to dbSetObjectAmbience()...

anyways, here's the code... just substitue it in the source file for the project you already have working...




and thanks for all the help...

--Mike

Login to post a reply

Server time is: 2024-11-16 18:12:54
Your offset time is: 2024-11-16 18:12:54