Windows API - Win32
一组适用于桌面和服务器应用程序的核心 Windows 应用程序编程接口 (API)。 以前称为 Win32 API。
116 个问题
I'm a newbie in DX12 and trying to visualize Stencil buffer onto screen. I've been copied stencil plane slice into a DXGI_FORMAT_R8_UINT texture, but when HLSL samples this texture it just returns 0, and finally my render result is a black screen.
Here is the texture2d info from PIX:
the sampling code is very straightforward, but when I debug pixel history at uv coordinate (0.398125, 0.534167), it just return a very small value from Sample expression:
Texture2D gDiffuseMap : register(t0);
SamplerState gsamAnisotropicWrap : register(s4);
float4 PS_PixelOverdraw(VertexOut pin) : SV_TARGET
{
float4 diffuseAlbedo = gDiffuseMap.Sample(gsamAnisotropicWrap, pin.TexC);
return float4(diffuseAlbedo.xyz, 1.0f);
}
Finally, the whole output is a black screen.