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.

Newcomers DBPro Corner / DarkShader issues

Author
Message
Daygamer
14
Years of Service
User Offline
Joined: 16th Mar 2010
Location: United States
Posted: 15th Apr 2010 03:47
Hi,

I've got a problem with DarkShader. I hope this is the appropriate place to ask about it.

I haven\'t found a tutorial for DarkShader. I\'ve figured out a few things, and even exported an effect file into my project. But when I tried to load it, it just changed the object\'s color to black (American spelling of color, I know). It didn\'t reflect the object environment like I was hoping it would. Later the object disappeared altogheter.

I\'ve tried multiple objects and shaders. I\'m probably being an idoit, but does anyone feel like helping out an idoit today. Thanks!!

Here\'s the code I\'m using. I would think the problem is somewhere around line 12 where I load the effect file.


Have a nice day, God Bless You!
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 22nd Apr 2010 02:32 Edited at: 22nd Apr 2010 02:36
I think the reflection shader needs a cube map or something of the sort. Have you tried exporting an entire project file from DarkShader? If so, did it work? I would try a simpler shader like normal mapping to start with. Try making a new DarkShader normal mapping project, exporting it, and running the exported code.

Generally, shaders require more than you just applying them to your objects. Oftentimes you will have to texture an object on multiple levels (called "stages") or feed some values to the shader in your main loop. Usually with normal maps, for example, Stage 0 is the regular texture, and Stage 1 is the blueish "normal map" texture. To texture an object's particular stage, use:

TEXTURE OBJECT object number, stage, image number

<-- Spell based team dueling game!
Daygamer
14
Years of Service
User Offline
Joined: 16th Mar 2010
Location: United States
Posted: 22nd Apr 2010 15:41
Alright, I'll mess around with it when I get the chance. Thank you very much.

Have a nice day, God Bless You!

Login to post a reply

Server time is: 2024-11-24 17:21:29
Your offset time is: 2024-11-24 17:21:29