Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

D3DIM question

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Pseudo   Members   

100
Like
Likes
Like

Posted 19 January 2000 - 02:27 PM

Is is just me, or does setting the ambient light do NOTHING! I am using a single directional light, and it works fine, then I call this every frame: lpD3DDevice->SetRenderState( D3DRENDERSTATE_AMBIENT, RANDOM_COLOR); This should at least change how the image looks considering I am pseudo-randomly changing the ambient color, but it doesn''t change a thing. Is there something I have to do to enable ambient lights? Pseudo

#2 Goodlife   Members   

122
Like
Likes
Like

Posted 19 January 2000 - 11:52 PM

Most people recommend that you do the lighting yourself, using D3DLVERTEX. Typically, your own lighting model is faster, since d3d takes many things into account that you wouldn''t typically bother with.

If you do it this way, it''s as easy as setting up an ambient light variable and keeping it.

I had your problem too, but I switched to my own lighting model-- not because of it, but because when I compared the speeds of the two, my own model was faster.

#3 Pseudo   Members   

100
Like
Likes
Like

Posted 21 January 2000 - 09:23 AM

D3DLVERTEX doesn''t contain normal data so how do you use it to do your own lighting model? Don''t you still use vertex normals to shade? I hope you don''t fill the D3DLVERTEX structure after the calculations, because this would mean you have to duplicate every vertex. Please inlighten me.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.