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 / Shader Problem (objects turn out black)

Author
Message
AmbulanceGames
16
Years of Service
User Offline
Joined: 15th May 2010
Location: Salt Lake City, UT
Posted: 13th Nov 2010 04:42
Hey, found that this has been addressed before but I can't find any solution to it. I made a normal map .fx file in DarkSHADER, loaded it up in DBPro and tried to apply it to a simple sphere and it turns out black. Everything else is lit in my scene but the object is still black. I've tried disabling fog, which I never turned on, disabling fog on the object, tried using 1 and 0 on the set object effect command for the texture flag. I just can't seem to get it to show up. If anyone found out a fix for this, please let me know. Thanks.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Nov 2010 11:49
Quote: "I made a normal map .fx file"


Quote: "If anyone found out a fix for this, please let me know."


How can we possibly help you if you don't show us your .fx and .dba code?
AmbulanceGames
16
Years of Service
User Offline
Joined: 15th May 2010
Location: Salt Lake City, UT
Posted: 14th Nov 2010 09:56
Sorry, thought maybe this was a common problem with a simple answer. Anyway here's the shader.



and here's my DBPro code so far



Hope this helps. Thanks.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Nov 2010 11:15
Your code doesn't seem to apply any lights to the shader.

You've added some lightmapping commands from Dark Lights but those are not the ones you want with that shader - they are for creating a fixed light map. Your shader seems to use the lighting system used by Dark Shader. I suggest you read the Dark Shader Help page: Help>Contents>Exporting>Passing Lights to a shader.

I don't use that system in my shaders though.
AmbulanceGames
16
Years of Service
User Offline
Joined: 15th May 2010
Location: Salt Lake City, UT
Posted: 14th Nov 2010 21:51
Okay, I'll give it a look over. Thanks for the advice. I just figured you could load any lights in and it should work...still new at this.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Nov 2010 21:58
Post back if you're still stuck. We should be able to fix it for you.

Login to post a reply

Server time is: 2026-07-21 18:58:23
Your offset time is: 2026-07-21 18:58:23