mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- fix ssao not working when multisample was off
This commit is contained in:
parent
128c8d8318
commit
2128b99117
1 changed files with 3 additions and 3 deletions
|
@ -794,7 +794,7 @@ void PPAmbientOcclusion::UpdateSteps()
|
|||
// Calculate linear depth values
|
||||
{
|
||||
PPStep step;
|
||||
step.ShaderName = gl_multisample ? "SSAO.LinearDepthMS" : "SSAO.LinearDepth";
|
||||
step.ShaderName = gl_multisample > 1 ? "SSAO.LinearDepthMS" : "SSAO.LinearDepth";
|
||||
step.Uniforms.Set(linearUniforms);
|
||||
step.Viewport = ambientViewport;
|
||||
step.SetInputSceneDepth(0);
|
||||
|
@ -807,7 +807,7 @@ void PPAmbientOcclusion::UpdateSteps()
|
|||
// Apply ambient occlusion
|
||||
{
|
||||
PPStep step;
|
||||
step.ShaderName = gl_multisample ? "SSAO.AmbientOccludeMS" : "SSAO.AmbientOcclude";
|
||||
step.ShaderName = gl_multisample > 1 ? "SSAO.AmbientOccludeMS" : "SSAO.AmbientOcclude";
|
||||
step.Uniforms.Set(ssaoUniforms);
|
||||
step.Viewport = ambientViewport;
|
||||
step.SetInputTexture(0, "SSAO.LinearDepth");
|
||||
|
@ -839,7 +839,7 @@ void PPAmbientOcclusion::UpdateSteps()
|
|||
// Add SSAO back to scene texture:
|
||||
{
|
||||
PPStep step;
|
||||
step.ShaderName = gl_multisample ? "SSAO.CombineMS" : "SSAO.Combine";
|
||||
step.ShaderName = gl_multisample > 1 ? "SSAO.CombineMS" : "SSAO.Combine";
|
||||
step.Uniforms.Set(combineUniforms);
|
||||
step.Viewport = screen->mSceneViewport;
|
||||
step.SetInputTexture(0, "SSAO.Ambient0", PPFilterMode::Linear);
|
||||
|
|
Loading…
Reference in a new issue