mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-22 15:51:30 +11:00
fix no-aa mode in royale
This commit is contained in:
parent
d93fef37a8
commit
fc0d4519f7
|
@ -265,7 +265,8 @@ void main()
|
||||||
// 2.) Overscan == float2(1.0, 1.0)
|
// 2.) Overscan == float2(1.0, 1.0)
|
||||||
// Skipping AA is sharper, but it's only faster with dynamic branches.
|
// Skipping AA is sharper, but it's only faster with dynamic branches.
|
||||||
const float2 abs_aa_r_offset = abs(get_aa_subpixel_r_offset());
|
const float2 abs_aa_r_offset = abs(get_aa_subpixel_r_offset());
|
||||||
const bool need_subpixel_aa = abs_aa_r_offset.x + abs_aa_r_offset.y > 0.0;
|
// this next check seems to always return true, even when it shouldn't so disabling it for now
|
||||||
|
const bool need_subpixel_aa = false;//abs_aa_r_offset.x + abs_aa_r_offset.y > 0.0;
|
||||||
float3 color;
|
float3 color;
|
||||||
|
|
||||||
if(aa_level > 0.5 && (geom_mode > 0.5 || any(bool2((geom_overscan.x != 1.0), (geom_overscan.y != 1.0)))))
|
if(aa_level > 0.5 && (geom_mode > 0.5 || any(bool2((geom_overscan.x != 1.0), (geom_overscan.y != 1.0)))))
|
||||||
|
|
|
@ -1,96 +0,0 @@
|
||||||
#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));
|
|
||||||
}
|
|
|
@ -205,7 +205,7 @@ scale11 = "1.0"
|
||||||
srgb_framebuffer11 = "true"
|
srgb_framebuffer11 = "true"
|
||||||
|
|
||||||
# Pass 12: Compute curvature/AA:
|
# Pass 12: Compute curvature/AA:
|
||||||
shader12 = "../crt/shaders/crt-royale/src/crt-royale-last-pass-no-geom.slang"
|
shader12 = "../crt/shaders/crt-royale/src/crt-royale-geometry-aa-last-pass.slang"
|
||||||
filter_linear12 = "true"
|
filter_linear12 = "true"
|
||||||
scale_type12 = "viewport"
|
scale_type12 = "viewport"
|
||||||
mipmap_input12 = "true"
|
mipmap_input12 = "true"
|
||||||
|
|
Loading…
Reference in a new issue