Jump to content

  • Log In with Google      Sign In   
  • Create Account


Use Depth buffer as texture

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

#1 8up tuotlo   Members   -  Reputation: 120

Like
0Likes
Like

Posted 27 February 2014 - 08:06 AM

Is it possible to set depth buffer as the texture to effect (LPDIRECT3DEFFECT9) in direct3d?

 

thanks.



Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 6368

Like
2Likes
Like

Posted 27 February 2014 - 11:26 AM

Yes, no, and it depends on why you want to do it.

 

If for shadow mapping, then it can be done (on certain hardware), but you need to create a new texture with a depth/stencil format, get surface level 0 on it, set that as your depth/stencil surface and draw into it.  All summarized here: http://aras-p.info/texts/D3D9GPUHacks.html#shadowmap


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 Hodgman   Moderators   -  Reputation: 24088

Like
2Likes
Like

Posted 27 February 2014 - 03:51 PM

The INTZ method on the same page works for general purpose usage (e.g. Deferred rendering, post processing), but requires the user to have a D3D10-capable GPU (or very late D3D9-era)





PARTNERS