mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-26 09:21:30 +11:00
fix disabled runtime parameters code path
This commit is contained in:
parent
202d0c7684
commit
b4203c5f8c
|
@ -33,73 +33,24 @@ static const float gba_gamma = 3.5; // Irrelevant but necessary to define.
|
||||||
|
|
||||||
// Disable runtime shader params if the user doesn't explicitly want them.
|
// Disable runtime shader params if the user doesn't explicitly want them.
|
||||||
// Static constants will be defined in place of uniforms of the same name.
|
// Static constants will be defined in place of uniforms of the same name.
|
||||||
#ifndef RUNTIME_SHADER_PARAMS_ENABLE
|
#ifdef RUNTIME_SHADER_PARAMS_ENABLE
|
||||||
#undef PARAMETER_UNIFORM
|
#ifndef RUNTIME_SCANLINES_HORIZ_FILTER_COLORSPACE
|
||||||
|
static const float beam_horiz_filter = clamp(beam_horiz_filter_static, 0.0, 2.0);
|
||||||
|
static const float beam_horiz_linear_rgb_weight = clamp(beam_horiz_linear_rgb_weight_static, 0.0, 1.0);
|
||||||
|
#endif
|
||||||
|
#ifndef RUNTIME_PHOSPHOR_MASK_MODE_TYPE_SELECT
|
||||||
|
static const float mask_type = clamp(mask_type_static, 0.0, 2.0);
|
||||||
|
#endif
|
||||||
|
#ifndef RUNTIME_ANTIALIAS_WEIGHTS
|
||||||
|
static const float aa_cubic_c = aa_cubic_c_static; // Clamp to [0, 4]?
|
||||||
|
static const float aa_gauss_sigma = max(FIX_ZERO(0.0), aa_gauss_sigma_static); // Clamp to [FIXZERO(0), 1]?
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define HARDCODE_SETTINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Bind option names to shader parameter uniforms or static constants.
|
// Bind option names to shader parameter uniforms or static constants.
|
||||||
#ifdef HARDCODE_SETTINGS
|
#ifdef HARDCODE_SETTINGS
|
||||||
#ifdef PARAMETER_UNIFORM
|
|
||||||
uniform float crt_gamma;
|
|
||||||
uniform float lcd_gamma;
|
|
||||||
uniform float levels_contrast;
|
|
||||||
uniform float halation_weight;
|
|
||||||
uniform float diffusion_weight;
|
|
||||||
uniform float bloom_underestimate_levels;
|
|
||||||
uniform float bloom_excess;
|
|
||||||
uniform float beam_min_sigma;
|
|
||||||
uniform float beam_max_sigma;
|
|
||||||
uniform float beam_spot_power;
|
|
||||||
uniform float beam_min_shape;
|
|
||||||
uniform float beam_max_shape;
|
|
||||||
uniform float beam_shape_power;
|
|
||||||
uniform float beam_horiz_sigma;
|
|
||||||
#ifdef RUNTIME_SCANLINES_HORIZ_FILTER_COLORSPACE
|
|
||||||
uniform float beam_horiz_filter;
|
|
||||||
uniform float beam_horiz_linear_rgb_weight;
|
|
||||||
#else
|
|
||||||
static const float beam_horiz_filter = clamp(beam_horiz_filter_static, 0.0, 2.0);
|
|
||||||
static const float beam_horiz_linear_rgb_weight = clamp(beam_horiz_linear_rgb_weight_static, 0.0, 1.0);
|
|
||||||
#endif
|
|
||||||
uniform float convergence_offset_x_r;
|
|
||||||
uniform float convergence_offset_x_g;
|
|
||||||
uniform float convergence_offset_x_b;
|
|
||||||
uniform float convergence_offset_y_r;
|
|
||||||
uniform float convergence_offset_y_g;
|
|
||||||
uniform float convergence_offset_y_b;
|
|
||||||
#ifdef RUNTIME_PHOSPHOR_MASK_MODE_TYPE_SELECT
|
|
||||||
uniform float mask_type;
|
|
||||||
#else
|
|
||||||
static const float mask_type = clamp(mask_type_static, 0.0, 2.0);
|
|
||||||
#endif
|
|
||||||
uniform float mask_sample_mode_desired;
|
|
||||||
uniform float mask_specify_num_triads;
|
|
||||||
uniform float mask_triad_size_desired;
|
|
||||||
uniform float mask_num_triads_desired;
|
|
||||||
uniform float aa_subpixel_r_offset_x_runtime;
|
|
||||||
uniform float aa_subpixel_r_offset_y_runtime;
|
|
||||||
#ifdef RUNTIME_ANTIALIAS_WEIGHTS
|
|
||||||
uniform float aa_cubic_c;
|
|
||||||
uniform float aa_gauss_sigma;
|
|
||||||
#else
|
|
||||||
static const float aa_cubic_c = aa_cubic_c_static; // Clamp to [0, 4]?
|
|
||||||
static const float aa_gauss_sigma = max(FIX_ZERO(0.0), aa_gauss_sigma_static); // Clamp to [FIXZERO(0), 1]?
|
|
||||||
#endif
|
|
||||||
uniform float geom_mode_runtime;
|
|
||||||
uniform float geom_radius;
|
|
||||||
uniform float geom_view_dist;
|
|
||||||
uniform float geom_tilt_angle_x;
|
|
||||||
uniform float geom_tilt_angle_y;
|
|
||||||
uniform float geom_aspect_ratio_x;
|
|
||||||
uniform float geom_aspect_ratio_y;
|
|
||||||
uniform float geom_overscan_x;
|
|
||||||
uniform float geom_overscan_y;
|
|
||||||
uniform float border_size;
|
|
||||||
uniform float border_darkness;
|
|
||||||
uniform float border_compress;
|
|
||||||
uniform float interlace_bff;
|
|
||||||
uniform float interlace_1080i;
|
|
||||||
#else
|
|
||||||
// Use constants from user-settings.h, and limit ranges appropriately:
|
// Use constants from user-settings.h, and limit ranges appropriately:
|
||||||
static const float crt_gamma = max(0.0, crt_gamma_static);
|
static const float crt_gamma = max(0.0, crt_gamma_static);
|
||||||
static const float lcd_gamma = max(0.0, lcd_gamma_static);
|
static const float lcd_gamma = max(0.0, lcd_gamma_static);
|
||||||
|
@ -147,9 +98,91 @@ static const float gba_gamma = 3.5; // Irrelevant but necessary to define.
|
||||||
static const float border_compress = max(1.0, border_compress_static); // < 1.0 darkens whole image
|
static const float border_compress = max(1.0, border_compress_static); // < 1.0 darkens whole image
|
||||||
static const float interlace_bff = float(interlace_bff_static);
|
static const float interlace_bff = float(interlace_bff_static);
|
||||||
static const float interlace_1080i = float(interlace_1080i_static);
|
static const float interlace_1080i = float(interlace_1080i_static);
|
||||||
|
#else
|
||||||
|
#pragma parameter crt_gamma "Simulated CRT Gamma" 2.5 1.0 5.0 0.025
|
||||||
|
#define crt_gamma global.crt_gamma
|
||||||
|
#pragma parameter lcd_gamma "Your Display Gamma" 2.2 1.0 5.0 0.025
|
||||||
|
#define lcd_gamma global.lcd_gamma
|
||||||
|
#pragma parameter levels_contrast "Contrast" 1.0 0.0 4.0 0.015625
|
||||||
|
#define levels_contrast global.levels_contrast
|
||||||
|
#pragma parameter halation_weight "Halation Weight" 0.0 0.0 1.0 0.005
|
||||||
|
#pragma parameter diffusion_weight "Diffusion Weight" 0.075 0.0 1.0 0.005
|
||||||
|
#pragma parameter bloom_underestimate_levels "Bloom - Underestimate Levels" 0.8 0.0 5.0 0.01
|
||||||
|
#define bloom_underestimate_levels global.bloom_underestimate_levels
|
||||||
|
#pragma parameter bloom_excess "Bloom - Excess" 0.0 0.0 1.0 0.005
|
||||||
|
#pragma parameter beam_min_sigma "Beam - Min Sigma" 0.02 0.005 1.0 0.005
|
||||||
|
#define beam_min_sigma global.beam_min_sigma
|
||||||
|
#pragma parameter beam_max_sigma "Beam - Max Sigma" 0.3 0.005 1.0 0.005
|
||||||
|
#define beam_max_sigma global.beam_max_sigma
|
||||||
|
#pragma parameter beam_spot_power "Beam - Spot Power" 0.33 0.01 16.0 0.01
|
||||||
|
#define beam_spot_power global.beam_spot_power
|
||||||
|
#pragma parameter beam_min_shape "Beam - Min Shape" 2.0 2.0 32.0 0.1
|
||||||
|
#define beam_min_shape global.beam_min_shape
|
||||||
|
#pragma parameter beam_max_shape "Beam - Max Shape" 4.0 2.0 32.0 0.1
|
||||||
|
#define beam_max_shape global.beam_max_shape
|
||||||
|
#pragma parameter beam_shape_power "Beam - Shape Power" 0.25 0.01 16.0 0.01
|
||||||
|
#define beam_shape_power global.beam_shape_power
|
||||||
|
#pragma parameter beam_horiz_filter "Beam - Horiz Filter" 0.0 0.0 2.0 1.0
|
||||||
|
#define beam_horiz_filter global.beam_horiz_filter
|
||||||
|
#pragma parameter beam_horiz_sigma "Beam - Horiz Sigma" 0.35 0.0 0.67 0.005
|
||||||
|
#define beam_horiz_sigma global.beam_horiz_sigma
|
||||||
|
#pragma parameter beam_horiz_linear_rgb_weight "Beam - Horiz Linear RGB Weight" 1.0 0.0 1.0 0.01
|
||||||
|
#pragma parameter convergence_offset_x_r "Convergence - Offset X Red" 0.0 -4.0 4.0 0.05
|
||||||
|
#define convergence_offset_x_r global.convergence_offset_x_r
|
||||||
|
#pragma parameter convergence_offset_x_g "Convergence - Offset X Green" 0.0 -4.0 4.0 0.05
|
||||||
|
#define convergence_offset_x_g global.convergence_offset_x_g
|
||||||
|
#pragma parameter convergence_offset_x_b "Convergence - Offset X Blue" 0.0 -4.0 4.0 0.05
|
||||||
|
#define convergence_offset_x_b global.convergence_offset_x_b
|
||||||
|
#pragma parameter convergence_offset_y_r "Convergence - Offset Y Red" 0.0 -2.0 2.0 0.05
|
||||||
|
#define convergence_offset_y_r global.convergence_offset_y_r
|
||||||
|
#pragma parameter convergence_offset_y_g "Convergence - Offset Y Green" 0.0 -2.0 2.0 0.05
|
||||||
|
#define convergence_offset_y_g global.convergence_offset_y_g
|
||||||
|
#pragma parameter convergence_offset_y_b "Convergence - Offset Y Blue" 0.0 -2.0 2.0 0.05
|
||||||
|
#define convergence_offset_y_b global.convergence_offset_y_b
|
||||||
|
#pragma parameter mask_type "Mask - Type" 1.0 0.0 2.0 1.0
|
||||||
|
#define mask_type global.mask_type
|
||||||
|
#pragma parameter mask_sample_mode_desired "Mask - Sample Mode" 0.0 0.0 2.0 1.0 // Consider blocking mode 2.
|
||||||
|
#define mask_sample_mode_desired global.mask_sample_mode_desired
|
||||||
|
#pragma parameter mask_specify_num_triads "Mask - Specify Number of Triads" 0.0 0.0 1.0 1.0
|
||||||
|
#pragma parameter mask_triad_size_desired "Mask - Triad Size Desired" 3.0 1.0 18.0 0.125
|
||||||
|
#pragma parameter mask_num_triads_desired "Mask - Number of Triads Desired" 480.0 342.0 1920.0 1.0
|
||||||
|
#pragma parameter aa_subpixel_r_offset_x_runtime "AA - Subpixel R Offset X" -0.333333333 -0.333333333 0.333333333 0.333333333
|
||||||
|
#define aa_subpixel_r_offset_x_runtime global.aa_subpixel_r_offset_x_runtime
|
||||||
|
#pragma parameter aa_subpixel_r_offset_y_runtime "AA - Subpixel R Offset Y" 0.0 -0.333333333 0.333333333 0.333333333
|
||||||
|
#define aa_subpixel_r_offset_y_runtime global.aa_subpixel_r_offset_y_runtime
|
||||||
|
#pragma parameter aa_cubic_c "AA - Cubic Sharpness" 0.5 0.0 4.0 0.015625
|
||||||
|
#define aa_cubic_c global.aa_cubic_c
|
||||||
|
#pragma parameter aa_gauss_sigma "AA - Gaussian Sigma" 0.5 0.0625 1.0 0.015625
|
||||||
|
#define aa_gauss_sigma global.aa_gauss_sigma
|
||||||
|
#pragma parameter geom_mode_runtime "Geometry - Mode" 0.0 0.0 3.0 1.0
|
||||||
|
#define geom_mode_runtime global.geom_mode_runtime
|
||||||
|
#pragma parameter geom_radius "Geometry - Radius" 2.0 0.16 1024.0 0.1
|
||||||
|
#define geom_radius global.geom_radius
|
||||||
|
#pragma parameter geom_view_dist "Geometry - View Distance" 2.0 0.5 1024.0 0.25
|
||||||
|
#define geom_view_dist global.geom_view_dist
|
||||||
|
#pragma parameter geom_tilt_angle_x "Geometry - Tilt Angle X" 0.0 -3.14159265 3.14159265 0.017453292519943295
|
||||||
|
#define geom_tilt_angle_x global.geom_tilt_angle_x
|
||||||
|
#pragma parameter geom_tilt_angle_y "Geometry - Tilt Angle Y" 0.0 -3.14159265 3.14159265 0.017453292519943295
|
||||||
|
#define geom_tilt_angle_y global.geom_tilt_angle_y
|
||||||
|
#pragma parameter geom_aspect_ratio_x "Geometry - Aspect Ratio X" 432.0 1.0 512.0 1.0
|
||||||
|
#define geom_aspect_ratio_x global.geom_aspect_ratio_x
|
||||||
|
#pragma parameter geom_aspect_ratio_y "Geometry - Aspect Ratio Y" 329.0 1.0 512.0 1.0
|
||||||
|
#define geom_aspect_ratio_y global.geom_aspect_ratio_y
|
||||||
|
#pragma parameter geom_overscan_x "Geometry - Overscan X" 1.0 0.00390625 4.0 0.00390625
|
||||||
|
#define geom_overscan_x global.geom_overscan_x
|
||||||
|
#pragma parameter geom_overscan_y "Geometry - Overscan Y" 1.0 0.00390625 4.0 0.00390625
|
||||||
|
#define geom_overscan_y global.geom_overscan_y
|
||||||
|
#pragma parameter border_size "Border - Size" 0.015 0.0000001 0.5 0.005
|
||||||
|
#define border_size global.border_size
|
||||||
|
#pragma parameter border_darkness "Border - Darkness" 2.0 0.0 16.0 0.0625
|
||||||
|
#define border_darkness global.border_darkness
|
||||||
|
#pragma parameter border_compress "Border - Compression" 2.5 1.0 64.0 0.0625
|
||||||
|
#define border_compress global.border_compress
|
||||||
|
#pragma parameter interlace_bff "Interlacing - Bottom Field First" 0.0 0.0 1.0 1.0
|
||||||
|
//#define interlace_bff global.interlace_bff
|
||||||
|
#pragma parameter interlace_1080i "Interlace - Detect 1080i" 0.0 0.0 1.0 1.0
|
||||||
|
#define interlace_1080i global.interlace_1080i
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Provide accessors for vector constants that pack scalar uniforms:
|
// Provide accessors for vector constants that pack scalar uniforms:
|
||||||
inline float2 get_aspect_vector(const float geom_aspect_ratio)
|
inline float2 get_aspect_vector(const float geom_aspect_ratio)
|
||||||
|
@ -243,7 +276,4 @@ inline float get_mask_sample_mode()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif // BIND_SHADER_PARAMS_H
|
#endif // BIND_SHADER_PARAMS_H
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,6 @@ const float max_viewport_size_x = 1080.0*1024.0*(4.0/3.0);
|
||||||
|
|
||||||
/////////////////////////////// VERTEX INCLUDES ///////////////////////////////
|
/////////////////////////////// VERTEX INCLUDES ///////////////////////////////
|
||||||
|
|
||||||
#include "params.inc"
|
|
||||||
#include "../../../../include/compat_macros.inc"
|
#include "../../../../include/compat_macros.inc"
|
||||||
#include "../user-settings.h"
|
#include "../user-settings.h"
|
||||||
#include "bind-shader-params.h"
|
#include "bind-shader-params.h"
|
||||||
|
|
|
@ -95,7 +95,6 @@ const float bloom_diff_thresh_ = 1.0/256.0;
|
||||||
|
|
||||||
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
||||||
|
|
||||||
#include "params.inc"
|
|
||||||
#include "../../../../include/compat_macros.inc"
|
#include "../../../../include/compat_macros.inc"
|
||||||
#include "../user-settings.h"
|
#include "../user-settings.h"
|
||||||
#include "derived-settings-and-constants.h"
|
#include "derived-settings-and-constants.h"
|
||||||
|
|
|
@ -80,7 +80,6 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
|
|
||||||
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
||||||
|
|
||||||
#include "params.inc"
|
|
||||||
#include "../../../../include/compat_macros.inc"
|
#include "../../../../include/compat_macros.inc"
|
||||||
#include "../user-settings.h"
|
#include "../user-settings.h"
|
||||||
#include "derived-settings-and-constants.h"
|
#include "derived-settings-and-constants.h"
|
||||||
|
|
|
@ -91,7 +91,6 @@ const float bloom_diff_thresh_ = 1.0/256.0;
|
||||||
|
|
||||||
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
||||||
|
|
||||||
#include "params.inc"
|
|
||||||
#include "../../../../include/compat_macros.inc"
|
#include "../../../../include/compat_macros.inc"
|
||||||
#include "../user-settings.h"
|
#include "../user-settings.h"
|
||||||
#include "derived-settings-and-constants.h"
|
#include "derived-settings-and-constants.h"
|
||||||
|
|
|
@ -85,7 +85,6 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
|
|
||||||
////////////////////////////////// INCLUDES //////////////////////////////////
|
////////////////////////////////// INCLUDES //////////////////////////////////
|
||||||
|
|
||||||
#include "params.inc"
|
|
||||||
#include "../../../../include/compat_macros.inc"
|
#include "../../../../include/compat_macros.inc"
|
||||||
#include "../user-settings.h"
|
#include "../user-settings.h"
|
||||||
#include "bind-shader-params.h"
|
#include "bind-shader-params.h"
|
||||||
|
|
|
@ -81,7 +81,6 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
|
|
||||||
#define LAST_PASS
|
#define LAST_PASS
|
||||||
#define SIMULATE_CRT_ON_LCD
|
#define SIMULATE_CRT_ON_LCD
|
||||||
#include "params.inc"
|
|
||||||
#include "../../../../include/compat_macros.inc"
|
#include "../../../../include/compat_macros.inc"
|
||||||
#include "../user-settings.h"
|
#include "../user-settings.h"
|
||||||
#include "derived-settings-and-constants.h"
|
#include "derived-settings-and-constants.h"
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
#version 450
|
||||||
|
|
||||||
|
layout(push_constant) uniform Push
|
||||||
|
{
|
||||||
|
vec4 SourceSize;
|
||||||
|
vec4 OriginalSize;
|
||||||
|
vec4 OutputSize;
|
||||||
|
uint FrameCount;
|
||||||
|
} params;
|
||||||
|
|
||||||
|
layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
|
{
|
||||||
|
mat4 MVP;
|
||||||
|
float crt_gamma;
|
||||||
|
float lcd_gamma;
|
||||||
|
float levels_contrast;
|
||||||
|
float halation_weight;
|
||||||
|
float diffusion_weight;
|
||||||
|
float bloom_underestimate_levels;
|
||||||
|
float bloom_excess;
|
||||||
|
float beam_min_sigma;
|
||||||
|
float beam_max_sigma;
|
||||||
|
float beam_spot_power;
|
||||||
|
float beam_min_shape;
|
||||||
|
float beam_max_shape;
|
||||||
|
float beam_shape_power;
|
||||||
|
float beam_horiz_filter;
|
||||||
|
float beam_horiz_sigma;
|
||||||
|
float beam_horiz_linear_rgb_weight;
|
||||||
|
float convergence_offset_x_r;
|
||||||
|
float convergence_offset_x_g;
|
||||||
|
float convergence_offset_x_b;
|
||||||
|
float convergence_offset_y_r;
|
||||||
|
float convergence_offset_y_g;
|
||||||
|
float convergence_offset_y_b;
|
||||||
|
float mask_type;
|
||||||
|
float mask_sample_mode_desired;
|
||||||
|
float mask_num_triads_desired;
|
||||||
|
float mask_triad_size_desired;
|
||||||
|
float mask_specify_num_triads;
|
||||||
|
float aa_subpixel_r_offset_x_runtime;
|
||||||
|
float aa_subpixel_r_offset_y_runtime;
|
||||||
|
float aa_cubic_c;
|
||||||
|
float aa_gauss_sigma;
|
||||||
|
float geom_mode_runtime;
|
||||||
|
float geom_radius;
|
||||||
|
float geom_view_dist;
|
||||||
|
float geom_tilt_angle_x;
|
||||||
|
float geom_tilt_angle_y;
|
||||||
|
float geom_aspect_ratio_x;
|
||||||
|
float geom_aspect_ratio_y;
|
||||||
|
float geom_overscan_x;
|
||||||
|
float geom_overscan_y;
|
||||||
|
float border_size;
|
||||||
|
float border_darkness;
|
||||||
|
float border_compress;
|
||||||
|
float interlace_bff;
|
||||||
|
float interlace_1080i;
|
||||||
|
vec4 MASKED_SCANLINESSize;
|
||||||
|
vec4 HALATION_BLURSize;
|
||||||
|
vec4 BRIGHTPASSSize;
|
||||||
|
} global;
|
||||||
|
|
||||||
|
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
||||||
|
|
||||||
|
#define LAST_PASS
|
||||||
|
#define SIMULATE_CRT_ON_LCD
|
||||||
|
#include "../../../../include/compat_macros.inc"
|
||||||
|
#include "../user-settings.h"
|
||||||
|
#include "derived-settings-and-constants.h"
|
||||||
|
#include "bind-shader-params.h"
|
||||||
|
|
||||||
|
////////////////////////////////// INCLUDES //////////////////////////////////
|
||||||
|
|
||||||
|
#include "../../../../include/gamma-management.h"
|
||||||
|
|
||||||
|
#pragma stage vertex
|
||||||
|
layout(location = 0) in vec4 Position;
|
||||||
|
layout(location = 1) in vec2 TexCoord;
|
||||||
|
layout(location = 0) out vec2 vTexCoord;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
gl_Position = global.MVP * Position;
|
||||||
|
vTexCoord = TexCoord;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma stage fragment
|
||||||
|
layout(location = 0) in vec2 vTexCoord;
|
||||||
|
layout(location = 0) out vec4 FragColor;
|
||||||
|
layout(set = 0, binding = 2) uniform sampler2D Source;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
FragColor = encode_output(vec4(texture(Source, vTexCoord).rgb, 1.0));
|
||||||
|
}
|
|
@ -78,7 +78,6 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
|
|
||||||
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
||||||
|
|
||||||
#include "params.inc"
|
|
||||||
#include "../../../../include/compat_macros.inc"
|
#include "../../../../include/compat_macros.inc"
|
||||||
#include "../user-settings.h"
|
#include "../user-settings.h"
|
||||||
#include "derived-settings-and-constants.h"
|
#include "derived-settings-and-constants.h"
|
||||||
|
|
|
@ -78,7 +78,6 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
|
|
||||||
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
||||||
|
|
||||||
#include "params.inc"
|
|
||||||
#include "../../../../include/compat_macros.inc"
|
#include "../../../../include/compat_macros.inc"
|
||||||
#include "../user-settings.h"
|
#include "../user-settings.h"
|
||||||
#include "derived-settings-and-constants.h"
|
#include "derived-settings-and-constants.h"
|
||||||
|
|
|
@ -100,7 +100,6 @@ const float max_viewport_size_x = 1080.0*1024.0*(4.0/3.0);
|
||||||
|
|
||||||
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
///////////////////////////// SETTINGS MANAGEMENT ////////////////////////////
|
||||||
|
|
||||||
#include "params.inc"
|
|
||||||
#include "../../../../include/compat_macros.inc"
|
#include "../../../../include/compat_macros.inc"
|
||||||
#include "../user-settings.h"
|
#include "../user-settings.h"
|
||||||
#include "derived-settings-and-constants.h"
|
#include "derived-settings-and-constants.h"
|
||||||
|
|
|
@ -76,7 +76,6 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
|
|
||||||
////////////////////////////////// INCLUDES //////////////////////////////////
|
////////////////////////////////// INCLUDES //////////////////////////////////
|
||||||
|
|
||||||
#include "params.inc"
|
|
||||||
#include "../../../../include/compat_macros.inc"
|
#include "../../../../include/compat_macros.inc"
|
||||||
#include "../user-settings.h"
|
#include "../user-settings.h"
|
||||||
#include "derived-settings-and-constants.h"
|
#include "derived-settings-and-constants.h"
|
||||||
|
|
|
@ -1,88 +0,0 @@
|
||||||
//#define HARDCODE_SETTINGS
|
|
||||||
|
|
||||||
#ifndef HARDCODE_SETTINGS
|
|
||||||
// Set shader params for all passes here:
|
|
||||||
#pragma parameter crt_gamma "Simulated CRT Gamma" 2.5 1.0 5.0 0.025
|
|
||||||
#define crt_gamma global.crt_gamma
|
|
||||||
#pragma parameter lcd_gamma "Your Display Gamma" 2.2 1.0 5.0 0.025
|
|
||||||
#define lcd_gamma global.lcd_gamma
|
|
||||||
#pragma parameter levels_contrast "Contrast" 1.0 0.0 4.0 0.015625
|
|
||||||
#define levels_contrast global.levels_contrast
|
|
||||||
#pragma parameter halation_weight "Halation Weight" 0.0 0.0 1.0 0.005
|
|
||||||
#pragma parameter diffusion_weight "Diffusion Weight" 0.075 0.0 1.0 0.005
|
|
||||||
#pragma parameter bloom_underestimate_levels "Bloom - Underestimate Levels" 0.8 0.0 5.0 0.01
|
|
||||||
#define bloom_underestimate_levels global.bloom_underestimate_levels
|
|
||||||
#pragma parameter bloom_excess "Bloom - Excess" 0.0 0.0 1.0 0.005
|
|
||||||
#pragma parameter beam_min_sigma "Beam - Min Sigma" 0.02 0.005 1.0 0.005
|
|
||||||
#define beam_min_sigma global.beam_min_sigma
|
|
||||||
#pragma parameter beam_max_sigma "Beam - Max Sigma" 0.3 0.005 1.0 0.005
|
|
||||||
#define beam_max_sigma global.beam_max_sigma
|
|
||||||
#pragma parameter beam_spot_power "Beam - Spot Power" 0.33 0.01 16.0 0.01
|
|
||||||
#define beam_spot_power global.beam_spot_power
|
|
||||||
#pragma parameter beam_min_shape "Beam - Min Shape" 2.0 2.0 32.0 0.1
|
|
||||||
#define beam_min_shape global.beam_min_shape
|
|
||||||
#pragma parameter beam_max_shape "Beam - Max Shape" 4.0 2.0 32.0 0.1
|
|
||||||
#define beam_max_shape global.beam_max_shape
|
|
||||||
#pragma parameter beam_shape_power "Beam - Shape Power" 0.25 0.01 16.0 0.01
|
|
||||||
#define beam_shape_power global.beam_shape_power
|
|
||||||
#pragma parameter beam_horiz_filter "Beam - Horiz Filter" 0.0 0.0 2.0 1.0
|
|
||||||
#define beam_horiz_filter global.beam_horiz_filter
|
|
||||||
#pragma parameter beam_horiz_sigma "Beam - Horiz Sigma" 0.35 0.0 0.67 0.005
|
|
||||||
#define beam_horiz_sigma global.beam_horiz_sigma
|
|
||||||
#pragma parameter beam_horiz_linear_rgb_weight "Beam - Horiz Linear RGB Weight" 1.0 0.0 1.0 0.01
|
|
||||||
#pragma parameter convergence_offset_x_r "Convergence - Offset X Red" 0.0 -4.0 4.0 0.05
|
|
||||||
#define convergence_offset_x_r global.convergence_offset_x_r
|
|
||||||
#pragma parameter convergence_offset_x_g "Convergence - Offset X Green" 0.0 -4.0 4.0 0.05
|
|
||||||
#define convergence_offset_x_g global.convergence_offset_x_g
|
|
||||||
#pragma parameter convergence_offset_x_b "Convergence - Offset X Blue" 0.0 -4.0 4.0 0.05
|
|
||||||
#define convergence_offset_x_b global.convergence_offset_x_b
|
|
||||||
#pragma parameter convergence_offset_y_r "Convergence - Offset Y Red" 0.0 -2.0 2.0 0.05
|
|
||||||
#define convergence_offset_y_r global.convergence_offset_y_r
|
|
||||||
#pragma parameter convergence_offset_y_g "Convergence - Offset Y Green" 0.0 -2.0 2.0 0.05
|
|
||||||
#define convergence_offset_y_g global.convergence_offset_y_g
|
|
||||||
#pragma parameter convergence_offset_y_b "Convergence - Offset Y Blue" 0.0 -2.0 2.0 0.05
|
|
||||||
#define convergence_offset_y_b global.convergence_offset_y_b
|
|
||||||
#pragma parameter mask_type "Mask - Type" 1.0 0.0 2.0 1.0
|
|
||||||
#define mask_type global.mask_type
|
|
||||||
#pragma parameter mask_sample_mode_desired "Mask - Sample Mode" 0.0 0.0 2.0 1.0 // Consider blocking mode 2.
|
|
||||||
#define mask_sample_mode_desired global.mask_sample_mode_desired
|
|
||||||
#pragma parameter mask_specify_num_triads "Mask - Specify Number of Triads" 0.0 0.0 1.0 1.0
|
|
||||||
#pragma parameter mask_triad_size_desired "Mask - Triad Size Desired" 3.0 1.0 18.0 0.125
|
|
||||||
#pragma parameter mask_num_triads_desired "Mask - Number of Triads Desired" 480.0 342.0 1920.0 1.0
|
|
||||||
#pragma parameter aa_subpixel_r_offset_x_runtime "AA - Subpixel R Offset X" -0.333333333 -0.333333333 0.333333333 0.333333333
|
|
||||||
#define aa_subpixel_r_offset_x_runtime global.aa_subpixel_r_offset_x_runtime
|
|
||||||
#pragma parameter aa_subpixel_r_offset_y_runtime "AA - Subpixel R Offset Y" 0.0 -0.333333333 0.333333333 0.333333333
|
|
||||||
#define aa_subpixel_r_offset_y_runtime global.aa_subpixel_r_offset_y_runtime
|
|
||||||
#pragma parameter aa_cubic_c "AA - Cubic Sharpness" 0.5 0.0 4.0 0.015625
|
|
||||||
#define aa_cubic_c global.aa_cubic_c
|
|
||||||
#pragma parameter aa_gauss_sigma "AA - Gaussian Sigma" 0.5 0.0625 1.0 0.015625
|
|
||||||
#define aa_gauss_sigma global.aa_gauss_sigma
|
|
||||||
#pragma parameter geom_mode_runtime "Geometry - Mode" 0.0 0.0 3.0 1.0
|
|
||||||
#define geom_mode_runtime global.geom_mode_runtime
|
|
||||||
#pragma parameter geom_radius "Geometry - Radius" 2.0 0.16 1024.0 0.1
|
|
||||||
#define geom_radius global.geom_radius
|
|
||||||
#pragma parameter geom_view_dist "Geometry - View Distance" 2.0 0.5 1024.0 0.25
|
|
||||||
#define geom_view_dist global.geom_view_dist
|
|
||||||
#pragma parameter geom_tilt_angle_x "Geometry - Tilt Angle X" 0.0 -3.14159265 3.14159265 0.017453292519943295
|
|
||||||
#define geom_tilt_angle_x global.geom_tilt_angle_x
|
|
||||||
#pragma parameter geom_tilt_angle_y "Geometry - Tilt Angle Y" 0.0 -3.14159265 3.14159265 0.017453292519943295
|
|
||||||
#define geom_tilt_angle_y global.geom_tilt_angle_y
|
|
||||||
#pragma parameter geom_aspect_ratio_x "Geometry - Aspect Ratio X" 432.0 1.0 512.0 1.0
|
|
||||||
#define geom_aspect_ratio_x global.geom_aspect_ratio_x
|
|
||||||
#pragma parameter geom_aspect_ratio_y "Geometry - Aspect Ratio Y" 329.0 1.0 512.0 1.0
|
|
||||||
#define geom_aspect_ratio_y global.geom_aspect_ratio_y
|
|
||||||
#pragma parameter geom_overscan_x "Geometry - Overscan X" 1.0 0.00390625 4.0 0.00390625
|
|
||||||
#define geom_overscan_x global.geom_overscan_x
|
|
||||||
#pragma parameter geom_overscan_y "Geometry - Overscan Y" 1.0 0.00390625 4.0 0.00390625
|
|
||||||
#define geom_overscan_y global.geom_overscan_y
|
|
||||||
#pragma parameter border_size "Border - Size" 0.015 0.0000001 0.5 0.005
|
|
||||||
#define border_size global.border_size
|
|
||||||
#pragma parameter border_darkness "Border - Darkness" 2.0 0.0 16.0 0.0625
|
|
||||||
#define border_darkness global.border_darkness
|
|
||||||
#pragma parameter border_compress "Border - Compression" 2.5 1.0 64.0 0.0625
|
|
||||||
#define border_compress global.border_compress
|
|
||||||
#pragma parameter interlace_bff "Interlacing - Bottom Field First" 0.0 0.0 1.0 1.0
|
|
||||||
//#define interlace_bff global.interlace_bff
|
|
||||||
#pragma parameter interlace_1080i "Interlace - Detect 1080i" 0.0 0.0 1.0 1.0
|
|
||||||
#define interlace_1080i global.interlace_1080i
|
|
||||||
#endif
|
|
Loading…
Reference in a new issue