Jump to content
  • Advertisement
Sign in to follow this  
_void_

[D3D12] Plane slice

This topic is 1129 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

 

I do not understand how to use Plane Slice while creating a render target view for a texture https://msdn.microsoft.com/en-us/library/windows/desktop/dn770433(v=vs.85).aspx.
According to the documentation https://msdn.microsoft.com/en-us/library/windows/desktop/dn705766(v=vs.85).aspx, Plane Slice indicates either red, green or blue color component of the texture.

What should I pass for Plane Slice if I want to have red, green and blue color components for the render target view?

 

Thanks!
 
?

Share this post


Link to post
Share on other sites
Advertisement

I think you'll find every format you'll ever care about has only 1 plane, and that plane includes every channel in the format. I think planes may be useful on multi-plane video formats that have chroma and luminance, but I don't see them being used for standard texture formats. Combined Depth/Stencil formats such as D24S8 and D32S8 are also two plane formats.

 

For example:

 

D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = { DXGI_FORMAT_R8G8B8A8_UNORM };
mD3DDevice->CheckFeatureSupport(D3D12_FEATURE_FORMAT_INFO, &formatInfo, sizeof(formatInfo));

formatInfo.PlaneCount is 1 for this standard format.

 
I'll look into why the documentation is a little misleading, but for now just specify 0 for the Plane Slice.
 
EDIT: I reported the incorrect documentation and it has now been updated.
Edited by ajmiles

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!