Skip to content
Permalink
Browse files

[Graphics] D3D: add support for using typeless textures

  • Loading branch information
xen2 committed Feb 7, 2019
1 parent 4645852 commit ff28be350deb6dd7492743fe60a208613c4a7a76
Showing with 4 additions and 0 deletions.
  1. +4 −0 sources/engine/Xenko.Graphics/Direct3D/Texture.Direct3D.cs
@@ -702,15 +702,19 @@ internal static PixelFormat ComputeShaderResourceFormatFromDepthFormat(PixelForm
// Determine TypeLess Format and ShaderResourceView Format
switch (format)
{
case PixelFormat.R16_Typeless:
case PixelFormat.D16_UNorm:
viewFormat = PixelFormat.R16_Float;
break;
case PixelFormat.R32_Typeless:
case PixelFormat.D32_Float:
viewFormat = PixelFormat.R32_Float;
break;
case PixelFormat.R24G8_Typeless:
case PixelFormat.D24_UNorm_S8_UInt:
viewFormat = PixelFormat.R24_UNorm_X8_Typeless;
break;
case PixelFormat.R32_Float_X8X24_Typeless:
case PixelFormat.D32_Float_S8X24_UInt:
viewFormat = PixelFormat.R32_Float_X8X24_Typeless;
break;

0 comments on commit ff28be3

Please sign in to comment.
You can’t perform that action at this time.