mipchain and nan fix for #96

This commit is contained in:
Turanszki Janos
2020-03-10 21:36:46 +00:00
parent fd5e77bb96
commit f0a4ad60ce
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -19,5 +19,5 @@ float4 main(float4 pos : SV_Position, float2 uv : TEXCOORD) : SV_TARGET
ApplyFog(depth, color);
return color;
return max(0, color);
}
+2 -1
View File
@@ -8887,9 +8887,10 @@ void Postprocess_StochasticSSR(
main_desc.Height = desc.Height;
main_desc.Format = FORMAT_R16G16B16A16_FLOAT;
main_desc.BindFlags = BIND_SHADER_RESOURCE | BIND_UNORDERED_ACCESS;
main_desc.MipLevels = 11;
main_desc.MipLevels = 0; // full mip chain
device->CreateTexture(&main_desc, nullptr, &texture_main);
main_desc = texture_main.GetDesc(); // mip count was initialized in CreateTexture()
for (uint32_t i = 0; i < main_desc.MipLevels; ++i)
{
int subresource_index;