0
我在應用程序中使用模板緩衝區實現了鼠標拾取功能。某些英特爾GPU上的多采樣紋理加載失敗
這裏的像素着色器鼠標下的讀取值:
Texture2DMS<uint2> depthStencilTexture : register(t0);
cbuffer ReadDepthInput : register(b2)
{
int2 readPosition;
}
// Produces vector3(x, y, stencilValue)
float4 main() : SV_Target0
{
uint2 res = depthStencilTexture.Load(readPosition, 1);
float stencil = res.y;
// Scale the result from integers to 0..1
stencil /= 255.0f;
return float4(float(readPosition.x)/65535.0f, float(readPosition.y)/65535.0f, stencil, 0);
}
代碼工作在NVIDIA和AMD的GPU,適用於英特爾虹膜英特爾的Haswell的GPU 550
代碼失敗(英特爾HD 5000,Intel HD 4600)。 Texture2DMS.Load只返回0.任何想法可能是錯誤的?
更新:只有8x MSAA纔會發生。即使在受影響的英特爾GPU上,將其降至4倍也可以。
您是否確認該驅動程序使用「CheckFormatSupport」和8x MSAA對該格式使用「CheckMultisampleQualityLevels」支持「D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD」? –
@ChuckWalbourn是的,我的應用程序在啓動時調用它們,並禁用MSAA /降低級別。 – Soonts