How to convert DXGI_FORMAT_NV12 to DXGI_FORMAT_R8G8B8A8_UNORM?
-
2012년 3월 29일 목요일 오전 6:32
first, I must use the DXGI_FORMAT_NV12 format to create a texture, then I map this texture to a mesh. But the render result is not right.I think the texture should be created with DXGI_FORMAT_R8G8B8A8_UNORM format ,and that will be render well.
So how can I convert DXGI_FORMAT_NV12 to DXGI_FORMAT_R8G8B8A8_UNORM?
I found the DXGI_FORMAT_NV12 is YUV 4:2:0 video resource format. if it doesn't need to convert, How to render right with DXGI_FORMAT_NV12 ?
모든 응답
-
2012년 3월 30일 금요일 오전 12:22
See http://msdn.microsoft.com/en-us/library/windows/desktop/bb173059(v=vs.85).aspx
- DXGI_FORMAT_NV12
Most common YUV 4:2:0 video resource format. Valid luminance data view formats for this video resource format are DXGI_FORMAT_R8_UNORM and DXGI_FORMAT_R8_UINT. Valid chrominance data view formats (width and height are each 1/2 of luminance view) for this video resource format are DXGI_FORMAT_R8G8_UNORM and DXGI_FORMAT_R8G8_UINT. Supported view types are SRV, RTV, and UAV. For luminance data view, the mapping to the view channel is Y->R8. For chrominance data view, the mapping to the view channel is U->R8 and V->G8.
-
2012년 3월 30일 금요일 오전 3:44
the document says , for luminance data view, the mapping to the view channel is Y->R8, that is the image can only show the red channel?
the document doesn't say how to convert DXGI_FORMAT_NV12 to DXGI_FORMAT_R8G8B8A8_UNORM, How to do it?
-
2012년 3월 30일 금요일 오후 8:10You don't. You can only use the aliasing to create a resource of hte format NV12 and then use shader resource views of the format R8 and R8G8 pointing to the same NV12 resource.
-
2012년 4월 5일 목요일 오전 8:44
If I use shader resource views of the format R8 , the result of the render is only Red channel?
If I use the R8G8, the result of render is only Red and Green Channel ?
I want the result of render is RGB format.How can I do it?
- 편집됨 zjubaoli 2012년 4월 5일 목요일 오전 8:46
-
2012년 4월 26일 목요일 오전 8:24How to use shader resource views of the format R8 and R8G8 pointing to the same NV12 resource?

