Skip to content

Commit

Permalink
cBloom, cImageSharpen, cAntiAliasing: Reorganized settings
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Sep 2, 2024
1 parent 5c1d113 commit 8705a12
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
5 changes: 4 additions & 1 deletion shaders/cAntiAliasing.fx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ uniform int _RenderMode <
> = 0;

uniform int _RelativeThreshold <
ui_category = "Anti-Aliasing";
ui_label = "Relative Threshold";
ui_tooltip = "Trims the algorithm from processing darks.";
ui_type = "combo";
Expand All @@ -32,6 +33,7 @@ static const float RelativeThresholds[3] =
};

uniform int _ContrastThreshold <
ui_category = "Anti-Aliasing";
ui_label = "Contrast Threshold";
ui_tooltip = "The minimum amount of local contrast required to apply algorithm.";
ui_type = "combo";
Expand All @@ -44,6 +46,7 @@ static const float ContrastThresholds[5] =
};

uniform int _SubpixelBlending <
ui_category = "Anti-Aliasing";
ui_label = "Subpixel Blending";
ui_tooltip = "Choose the amount of sub-pixel aliasing removal.";
ui_type = "combo";
Expand Down Expand Up @@ -275,7 +278,7 @@ float4 PS_AntiAliasing(CShade_VS2PS_Quad Input) : SV_TARGET0
{
float3 FXAA = float3(Input.Tex0 - BlendTex, 0.0);
FXAA.xy = (normalize(FXAA.xy) * 0.5) + 0.5;
return CBlend_OutputChannels(float4(FXAA, _CShadeAlphaFactor));
return CBlend_OutputChannels(float4(FXAA.rgb, _CShadeAlphaFactor));
}
else
{
Expand Down
12 changes: 6 additions & 6 deletions shaders/cBloom.fx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

uniform float _Frametime < source = "frametime"; >;

uniform int _RenderMode <
ui_label = "Render Mode";
ui_type = "combo";
ui_items = "Base + Bloom\0Bloom\0";
> = 0;

uniform float _Threshold <
ui_category = "Bloom | General";
ui_label = "Threshold";
Expand Down Expand Up @@ -38,12 +44,6 @@ uniform float _Intensity <
ui_max = 1.0;
> = 0.5;

uniform int _RenderMode <
ui_label = "Render Mode";
ui_type = "combo";
ui_items = "Base + Bloom\0Bloom\0";
> = 0;

uniform float _Level8Weight <
ui_category = "Bloom | Level Weights";
ui_label = "Level 8";
Expand Down
15 changes: 9 additions & 6 deletions shaders/cImageSharpen.fx
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,34 @@
THE SOFTWARE.
*/

uniform int _RenderMode <
ui_label = "Render Mode";
ui_type = "combo";
ui_items = "Image\0Mask\0";
> = 0;

uniform int _Detection <
ui_category = "Sharpening";
ui_label = "Detection Mode";
ui_type = "combo";
ui_items = "Multi-Channel\0Single-Channel (Average)\0Single-Channel (Max)\0";
> = 0;

uniform int _Kernel <
ui_category = "Sharpening";
ui_label = "Kernel Shape";
ui_type = "combo";
ui_items = "CAS: Box\0CAS: Diamond\0CShade: Bilinear Diamond\0";
> = 1;

uniform float _Contrast <
ui_category = "Sharpening";
ui_label = "Contrast";
ui_type = "slider";
ui_min = 0.0;
ui_max = 1.0;
> = 0.0;

uniform int _RenderMode <
ui_label = "Render Mode";
ui_type = "combo";
ui_items = "Render Image\0Render Mask\0";
> = 0;

#include "shared/fidelityfx/cCas.fxh"

#include "shared/cShade.fxh"
Expand Down

0 comments on commit 8705a12

Please sign in to comment.