Specular Color Doesn't Work?

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Ascent

Specular Color Doesn't Work?

Post by Ascent »

I played around with the per pixel lighting tutorial a little just trying out different ways
of lighting , materials, etc. (under D3D8/9).
I noticed, however, that no matter what I did, I could not see specular highlights.
First of all, i used only one static light, and the sphere from the per pixel example was well within the llight radius (although i tried moving it out as well).
I must say that all other material settings worked quite well - ambient, emissive, diffuse color - but not Specular.

I don't know if this is a bug really at least if it is "still" a bug. I checked out some of the earlier posts on this matter and found out that some guy reported exactly the same thing back in 2003, and Niko (many thanks to him for a cool engine) said it was a bug and that it was on his "to do" list.
So, is Specular higlighting buggy or not?

Thanks in advance...
Pr3t3nd3r
Posts: 186
Joined: Tue Feb 08, 2005 6:02 pm
Location: Romania
Contact:

Post by Pr3t3nd3r »

Is not buggy is just mising. I want it too :cry:
Ronin
Posts: 116
Joined: Wed Mar 03, 2004 6:23 pm
Location: Germany

Post by Ronin »

Hi, try this at initialization:

Code: Select all

// Direct 3D
	if(m_pDevice->getVideoDriver()->getDriverType() == irr::video::EDT_DIRECTX9)
	{
		irr::video::SExposedVideoData data = m_pDevice->getVideoDriver()->getExposedVideoData();
		IDirect3DDevice9 * device = data.D3D9.D3DDev9;
		if(device)
		{
			device->SetRenderState(D3DRS_SPECULARENABLE,TRUE);
			device->SetRenderState(D3DRS_NORMALIZENORMALS,TRUE);
		}
	}
Hope that helps...
YASS - Yet Another Space Shooter - www.yass-engine.de
Ascent

Post by Ascent »

I see your point, Ronin. However, there is no method for changing render states... at least not in my version of the engine. BTW I use VC++6.0 and Irrlicht 0.9.
But I will try to get around the problem one way or another....
Noiecity
Posts: 92
Joined: Wed Aug 23, 2023 7:22 pm
Contact:

Re: Specular Color Doesn't Work?

Post by Noiecity »

thanks Ronin
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free and in an anonymous way if necessary. You can send me a private message.

https://www.artstation.com/noiecty
**
Post Reply