Merge pull request #1 from turanszkij/stochastic-ssr

Stochastic ssr
This commit is contained in:
Kliaxe
2020-03-10 22:56:34 +01:00
committed by GitHub
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;