Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjustments to the Debug View within MXAO. #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions Shaders/qUINT_mxao.fx
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ uniform float MXAO_FADE_DEPTH_END <
> = 0.4;

uniform int MXAO_DEBUG_VIEW_ENABLE <
ui_type = "combo";
ui_type = "radio";
ui_label = "Enable Debug View";
ui_items = "None\0AO/IL channel\0Normal vectors\0";
ui_items = "None\0AO channel\0IL channel\0AO+IL channel\0Normal vectors\0";
ui_tooltip = "Different debug outputs";
ui_category = "Debug";
> = 0;
Expand Down Expand Up @@ -620,15 +620,25 @@ void PS_SpatialFilter2(MXAO_VSOUT MXAO, out float4 color : SV_Target0)
color.rgb = sqrt(color.rgb);
}

if(MXAO_DEBUG_VIEW_ENABLE == 1)
switch(MXAO_DEBUG_VIEW_ENABLE)
{
color.rgb = max(0.0, 1.0 - ssil_ssao.www + ssil_ssao.xyz);
color.rgb *= (MXAO_ENABLE_IL != 0) ? 0.5 : 1.0;
}
else if(MXAO_DEBUG_VIEW_ENABLE == 2)
{
color.rgb = tex2D(sMXAO_NormalTex, MXAO.uv.xy).xyz;
color.b = 1-color.b; //looks nicer
case 1:
ssil_ssao.xyz = 0.0;
color.rgb = max(0.0, 1.0 - ssil_ssao.www + ssil_ssao.xyz);
// color.rgb *= 1.0;
break;
case 2:
color.rgb = max(0.0, 1.0 + ssil_ssao.xyz);
color.rgb *= 0.5;
break;
case 3:
color.rgb = max(0.0, 1.0 - ssil_ssao.www + ssil_ssao.xyz);
color.rgb *= (MXAO_ENABLE_IL != 0) ? 0.5 : 1.0;
break;
case 4:
color.rgb = tex2D(sMXAO_NormalTex, MXAO.uv.xy).xyz;
color.b = 1-color.b; //looks nicer
break;
}

color.a = 1.0;
Expand Down