Skip to content

Commit

Permalink
Cleanup ui_items
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Jul 5, 2024
1 parent 7767347 commit 6b0b10e
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 14 deletions.
2 changes: 1 addition & 1 deletion shaders/cAutoExposure.fx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ uniform int _Meter <
ui_category = "Main Shader: Spot Metering";
ui_label = "Method";
ui_type = "combo";
ui_items = " Average\0 Centered\0";
ui_items = "Average\0Centered\0";
> = 0;

uniform bool _Debug <
Expand Down
2 changes: 1 addition & 1 deletion shaders/cBlending.fx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
uniform int _Blend <
ui_label = "Blend Mode";
ui_type = "combo";
ui_items = " Add\0 Subtract\0 Multiply\0 Min\0 Max\0 Screen\0";
ui_items = "Add\0Subtract\0Multiply\0Min\0Max\0Screen\0";
> = 0;

uniform float3 _SrcFactor <
Expand Down
2 changes: 1 addition & 1 deletion shaders/cChromaticity.fx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
uniform int _Select <
ui_label = "Chromaticity Method";
ui_type = "combo";
ui_items = " Length (XY)\0 Length (XYZ)\0 Average (XY)\0 Average (XYZ)\0 Sum (XY)\0 Sum (XYZ)\0 Max (XY)\0 Max (XYZ)\0 Ratio (XY)\0 Spherical (XY)\0 Hue-Saturation (HSI)\0 Hue-Saturation (HSL)\0 Hue-Saturation (HSV)\0 CoCg (XY)\0 CrCb (XY)\0";
ui_items = "Length (XY)\0Length (XYZ)\0Average (XY)\0Average (XYZ)\0Sum (XY)\0Sum (XYZ)\0Max (XY)\0Max (XYZ)\0Ratio (XY)\0Spherical (XY)\0Hue-Saturation (HSI)\0Hue-Saturation (HSL)\0Hue-Saturation (HSV)\0CoCg (XY)\0CrCb (XY)\0";
> = 0;

/*
Expand Down
25 changes: 18 additions & 7 deletions shaders/cColorBand.fx
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,34 @@ uniform int3 _Range <
ui_max = 32.0;
> = 8;

uniform bool _Dither <
ui_label = "Dither";
ui_type = "radio";
> = true;
uniform int _DitherMethod <
ui_label = "Dither Method";
ui_type = "combo";
ui_items = "None\0Hash\0Interleaved Gradient Noise\0";
> = 0;

/*
[Pixel Shaders]
*/

float4 PS_Color(VS2PS_Quad Input) : SV_TARGET0
{
float3 Dither = GetIGNoise(Input.HPos.xy);
float4 ColorMap = tex2D(CShade_SampleGammaTex, Input.Tex0);

if (_Dither)
switch (_DitherMethod)
{
ColorMap.rgb += (Dither / _Range);
case 0:
ColorMap.rgb = ColorMap.rgb;
break;
case 1:
ColorMap.rgb += (GetHash1(Input.HPos.xy, 0.0) / _Range);
break;
case 2:
ColorMap.rgb += (GetIGNoise(Input.HPos.xy) / _Range);
break;
default:
ColorMap.rgb = ColorMap.rgb;
break;
}

ColorMap.rgb = floor(ColorMap.rgb * _Range) / (_Range);
Expand Down
2 changes: 1 addition & 1 deletion shaders/cGrayscale.fx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
uniform int _Select <
ui_label = "Luminance Method";
ui_type = "combo";
ui_items = " Average\0 Min\0 Median\0 Max\0 Length\0 None\0";
ui_items = "Average\0Min\0Median\0Max\0Length\0None\0";
> = 0;

/*
Expand Down
4 changes: 2 additions & 2 deletions shaders/cPyramidBlur.fx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ namespace cPyramidBlur
uniform int _Downscale <
ui_label = "Downscale Kernel";
ui_type = "combo";
ui_items = " 2x2 Box\0 3x3 Tent\0 Jorge\0 Kawase\0";
ui_items = "2x2 Box\03x3 Tent\0Jorge\0Kawase\0";
> = 0;

uniform int _Upscale <
ui_label = "Upscale Kernel";
ui_type = "combo";
ui_items = " 2x2 Box\0 3x3 Tent\0 Jorge\0 Kawase\0";
ui_items = "2x2 Box\03x3 Tent\0Jorge\0Kawase\0";
> = 0;

/*
Expand Down
2 changes: 1 addition & 1 deletion shaders/cTemplateMatching.fx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace cTemplateMatching
uniform int _Method <
ui_label = "Template Matching Method";
ui_type = "combo";
ui_items = " SSD\0 NCC\0";
ui_items = "SSD\0NCC\0";
> = 0;

uniform int _Size <
Expand Down

0 comments on commit 6b0b10e

Please sign in to comment.