Page 1 of 1

Specular Color Doesn't Work?

Posted: Wed Apr 27, 2005 2:03 pm
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...

Posted: Wed Apr 27, 2005 2:19 pm
by Pr3t3nd3r
Is not buggy is just mising. I want it too :cry:

Posted: Thu Apr 28, 2005 12:12 am
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...

Posted: Thu Apr 28, 2005 3:43 pm
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....

Re: Specular Color Doesn't Work?

Posted: Sun Feb 11, 2024 11:12 pm
by Noiecity
thanks Ronin