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 / Normal Map Shader issue

Author
Message
Phosphoer
16
Years of Service
User Offline
Joined: 8th Dec 2007
Location: Seattle
Posted: 12th Nov 2008 07:28 Edited at: 12th Nov 2008 07:28
Hey guys, I'm working on applying a normal map + reflection shader to a model in my game. I used the blinn_bump_reflect.fx file included in the sample FX Composer projects. In FX Composer, the model looks perfect and beautiful, however, when I load it into DarkGDK, the UV data get's all screwed up.

This is the code for the shader:



In DarkGDK, I simply load the 3d model and the effect, and apply the effect to the model with the use effect's textures flag enabled.

The effect seems to 'work', it's just the UV data is lost or skewed.

Help is greatly appreciated

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 12th Nov 2008 10:35
There are other normal map shaders in the forum, that are more suitable for DGDK/DBPro.
Besides the model usually needs to be textured with the normal map itself at some texture stage, so take care that all the textures in the above shader are available.
Phosphoer
16
Years of Service
User Offline
Joined: 8th Dec 2007
Location: Seattle
Posted: 12th Nov 2008 20:45
Thanks, it turns out the problem was that the shader was flipping the normal map on the x axis, I flipped the UV maps and it works just fine ^^.

Login to post a reply

Server time is: 2024-09-30 11:36:49
Your offset time is: 2024-09-30 11:36:49