From 1aa019564f952f5698324b8eefb5c80f909dbee6 Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Fri, 7 Dec 2018 23:00:21 +0100 Subject: [PATCH] [NSMBU and SMM] Fix AA shaders Might've been only a problem on AMD cards. Fixes https://github.com/slashiee/cemu_graphic_packs/issues/294 --- .../50e29e8929cea348_00000000000003c9_ps.txt | 7 ++++--- .../37a4ec1a7dbc7391_00000000000003c9_ps.txt | 8 ++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Resolutions/NewSuperMarioBrosU_Resolution/50e29e8929cea348_00000000000003c9_ps.txt b/Resolutions/NewSuperMarioBrosU_Resolution/50e29e8929cea348_00000000000003c9_ps.txt index dc862769..4477497f 100644 --- a/Resolutions/NewSuperMarioBrosU_Resolution/50e29e8929cea348_00000000000003c9_ps.txt +++ b/Resolutions/NewSuperMarioBrosU_Resolution/50e29e8929cea348_00000000000003c9_ps.txt @@ -1,9 +1,8 @@ - #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable // shader 50e29e8929cea348 -//AA fix PS +// Used for: Scaling Anti-Aliasing solution of game uniform ivec4 uf_remappedPS[3]; @@ -11,8 +10,10 @@ layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf45c5000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 layout(location = 0) in vec4 passParameterSem1; layout(location = 0) out vec4 passPixelColor0; + uniform vec2 uf_fragCoordScale; -const float resScale = (1.0 / uf_fragCoordScale.x); +float resScale = (1.0 / uf_fragCoordScale.x); + int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Resolutions/SuperMarioMaker_Resolution/37a4ec1a7dbc7391_00000000000003c9_ps.txt b/Resolutions/SuperMarioMaker_Resolution/37a4ec1a7dbc7391_00000000000003c9_ps.txt index fd97b5a1..44aebf75 100644 --- a/Resolutions/SuperMarioMaker_Resolution/37a4ec1a7dbc7391_00000000000003c9_ps.txt +++ b/Resolutions/SuperMarioMaker_Resolution/37a4ec1a7dbc7391_00000000000003c9_ps.txt @@ -2,14 +2,18 @@ #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable // shader 37a4ec1a7dbc7391 -//AAfix +// Used for: Scaling Anti-Aliasing solution of game + + uniform ivec4 uf_remappedPS[4]; layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x1d28c000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 layout(location = 0) in vec4 passParameterSem2; layout(location = 0) out vec4 passPixelColor0; + uniform vec2 uf_fragCoordScale; -const float scaleAA = uf_fragCoordScale.x; +float scaleAA = uf_fragCoordScale.x; + int clampFI32(int v) { if( v == 0x7FFFFFFF )