Skip to main content
gamedev.net
🔒 Locked

buffer darkening problem

Started by hound Aug 23, 2005 at 4:26 AM 0 replies 300+ views
Original Post
hound
hound
Hi there, I have a OffscreenPlainSurface ( D3DPOOL_DEFAULT, D3DFMT_X8R8G8B8 ) and I need to "darken" the whole surface. I copy the surface into temporary texture (and convert format to D3DFMT_A8R8G8B8), create render surface, assign the texture to poly with black diffuse color, set render state D3DRS_TEXTUREFACTOR to appropriate value, and render into render surface. Finally I copy the render surface back into origin offscreen surface. It works, but it's slow... What makes it slow, is the copying between surfaces. I tried D3DXLoadSurcaseFromSurface, or to access the memory of the surfaces directly, but both of this approaches are almos equal. Is there any better solution?
JohnBolton
JohnBolton
Is it possible to render a black quad with 50% (or so) alpha directly to the offscreen surface?
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.