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 / Pure Black Object with Evolved's Normal Map Shader

Author
Message
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 10th Jun 2007 18:50 Edited at: 10th Jun 2007 18:58
I am having a problem with Evolved's Normal Mapping Shader.

Evolved's Demo works perfectly and I can load both the model and textures I am trying to use into the demo, and they work there too.




In my game however, I can't seem to properly reproduce the effect.

For some reason the players body (the only object that the shader is being applied to) is always pure black. Always.

It's as if all the shaders variables are at 0.


I am using Sparky's Collision. But it is not being applied to the Object i am using the shader on.


Here is a snipet of the code I am applying to the object to attach the shader:

Assume the object and texture is loaded and MyObjNum stores the object index, and the texture image index (purposely the same).



------------------
[Custom Signature]
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 10th Jun 2007 18:51 Edited at: 10th Jun 2007 19:24
...Edit.

------------------
[Custom Signature]
Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 10th Jun 2007 20:01
I think the color and ambient values have to be between 0 and 1.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 11th Jun 2007 00:15
No dice.

The values I am using are used in a custom demo that I made, when I cut everything i didnt need out of Evolved's Demo. They work.

They make the object very bright.

Anyway, I tried what you suggested in my game it self. The problem remains unchanged.

------------------
[Custom Signature]
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 11th Jun 2007 01:39
It's the FOG!!!

Fog is set to Distance 3000. But it is making normal mapped objects the exact color of the fog!

Like as if the Object is far away but it isn't!.

If i turn fog off or disable fog on the object then the problem is gone!

Is this a Limitation of shaders or the fog?

Help!

------------------
[Custom Signature]

Login to post a reply

Server time is: 2024-05-08 17:01:55
Your offset time is: 2024-05-08 17:01:55