mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- add gl_ssao_debug mode showing the depth
This commit is contained in:
parent
558760c090
commit
67490d13cb
2 changed files with 4 additions and 1 deletions
|
@ -669,6 +669,7 @@ void PPAmbientOcclusion::Render(PPRenderState *renderstate, float m5, int sceneW
|
||||||
float r2 = aoRadius * aoRadius;
|
float r2 = aoRadius * aoRadius;
|
||||||
|
|
||||||
float blurSharpness = 1.0f / blurAmount;
|
float blurSharpness = 1.0f / blurAmount;
|
||||||
|
blurSharpness = 0.0f;
|
||||||
|
|
||||||
auto sceneScale = screen->SceneScale();
|
auto sceneScale = screen->SceneScale();
|
||||||
auto sceneOffset = screen->SceneOffset();
|
auto sceneOffset = screen->SceneOffset();
|
||||||
|
@ -760,7 +761,7 @@ void PPAmbientOcclusion::Render(PPRenderState *renderstate, float m5, int sceneW
|
||||||
renderstate->Shader = gl_multisample > 1 ? &CombineMS : &Combine;
|
renderstate->Shader = gl_multisample > 1 ? &CombineMS : &Combine;
|
||||||
renderstate->Uniforms.Set(combineUniforms);
|
renderstate->Uniforms.Set(combineUniforms);
|
||||||
renderstate->Viewport = screen->mSceneViewport;
|
renderstate->Viewport = screen->mSceneViewport;
|
||||||
if (gl_ssao_debug < 3)
|
if (gl_ssao_debug < 4)
|
||||||
renderstate->SetInputTexture(0, &Ambient0, PPFilterMode::Linear);
|
renderstate->SetInputTexture(0, &Ambient0, PPFilterMode::Linear);
|
||||||
else
|
else
|
||||||
renderstate->SetInputSceneNormal(0, PPFilterMode::Linear);
|
renderstate->SetInputSceneNormal(0, PPFilterMode::Linear);
|
||||||
|
|
|
@ -37,6 +37,8 @@ void main()
|
||||||
FragColor = vec4(fogColor, 1.0 - attenutation);
|
FragColor = vec4(fogColor, 1.0 - attenutation);
|
||||||
else if (DebugMode < 3)
|
else if (DebugMode < 3)
|
||||||
FragColor = vec4(attenutation, attenutation, attenutation, 1.0);
|
FragColor = vec4(attenutation, attenutation, attenutation, 1.0);
|
||||||
|
else if (DebugMode == 3)
|
||||||
|
FragColor = vec4(ssao.yyy / 1000.0, 1.0);
|
||||||
else
|
else
|
||||||
FragColor = vec4(ssao.xyz, 1.0);
|
FragColor = vec4(ssao.xyz, 1.0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue