1528 lines
95 KiB
Plaintext
1528 lines
95 KiB
Plaintext
/*
|
|
#version:1# (machine generated, don't edit!)
|
|
|
|
Generated by sokol-shdc (https://github.com/floooh/sokol-tools)
|
|
|
|
Cmdline:
|
|
sokol-shdc -i shader_post_process_main.glsl -o ./jai/shader_post_process_main.jai -l glsl430:glsl300es:metal_macos -f sokol_jai
|
|
|
|
Overview:
|
|
=========
|
|
Shader program: 'postprocess':
|
|
Get shader desc: postprocess_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_pp
|
|
Fragment Shader: fs_pp
|
|
Attributes:
|
|
ATTR_postprocess_position => 0
|
|
ATTR_postprocess_uv => 1
|
|
Bindings:
|
|
Uniform block 'post_process_config':
|
|
Jai struct: Post_Process_Config
|
|
Bind slot: UB_post_process_config => 0
|
|
Image 'pptex':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_pptex => 0
|
|
Image 'lut':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_lut => 1
|
|
Sampler 'ppsmp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_ppsmp => 0
|
|
Sampler 'lut_linear':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_lut_linear => 1
|
|
*/
|
|
ATTR_postprocess_position :: 0;
|
|
ATTR_postprocess_uv :: 1;
|
|
UB_post_process_config :: 0;
|
|
IMG_pptex :: 0;
|
|
IMG_lut :: 1;
|
|
SMP_ppsmp :: 0;
|
|
SMP_lut_linear :: 1;
|
|
Post_Process_Config :: struct {
|
|
exposure: float;
|
|
contrast: float;
|
|
saturation: float;
|
|
gamma: float;
|
|
tonemap: float;
|
|
vignette_intensity: float;
|
|
vignette_radius: float;
|
|
scanlines_intensity: float;
|
|
scanlines_density: float;
|
|
chromatic_aberration_intensity: float;
|
|
film_grain_intensity: float;
|
|
barrel_distortion_intensity: float;
|
|
lut_mode: s32;
|
|
_: [12]u8;
|
|
};
|
|
/*
|
|
#version 430
|
|
|
|
layout(location = 0) in vec2 position;
|
|
layout(location = 0) out vec2 texcoord;
|
|
layout(location = 1) in vec2 uv;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = vec4(position, 0.5, 1.0);
|
|
texcoord = uv;
|
|
}
|
|
|
|
*/
|
|
vs_pp_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x6c,0x61,
|
|
0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
|
|
0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x6f,0x73,0x69,0x74,
|
|
0x69,0x6f,0x6e,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
|
|
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,
|
|
0x63,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x3b,0x0a,0x6c,0x61,0x79,
|
|
0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,
|
|
0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x0a,0x76,
|
|
0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x34,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x30,0x2e,
|
|
0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x74,0x65,0x78,
|
|
0x63,0x6f,0x6f,0x72,0x64,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
struct post_process_config
|
|
{
|
|
float exposure;
|
|
float contrast;
|
|
float saturation;
|
|
float gamma;
|
|
float tonemap;
|
|
float vignette_intensity;
|
|
float vignette_radius;
|
|
float scanlines_intensity;
|
|
float scanlines_density;
|
|
float chromatic_aberration_intensity;
|
|
float film_grain_intensity;
|
|
float barrel_distortion_intensity;
|
|
int lut_mode;
|
|
};
|
|
|
|
uniform post_process_config _75;
|
|
|
|
layout(binding = 16) uniform sampler2D pptex_ppsmp;
|
|
layout(binding = 17) uniform sampler2D lut_ppsmp;
|
|
layout(binding = 18) uniform sampler2D lut_lut_linear;
|
|
|
|
layout(location = 0) in vec2 texcoord;
|
|
layout(location = 0) out vec4 frag_color;
|
|
|
|
vec3 aces(vec3 x)
|
|
{
|
|
return clamp((x * ((x * 2.5099999904632568359375) + vec3(0.02999999932944774627685546875))) / ((x * ((x * 2.4300000667572021484375) + vec3(0.589999973773956298828125))) + vec3(0.14000000059604644775390625)), vec3(0.0), vec3(1.0));
|
|
}
|
|
|
|
float rand(vec2 co)
|
|
{
|
|
return fract(sin(dot(co, vec2(12.98980045318603515625, 78.233001708984375))) * 43758.546875);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec2 _66 = texcoord - vec2(0.5);
|
|
float _67 = length(_66);
|
|
vec2 _86 = (_66 * (1.0 + (_67 * _75.barrel_distortion_intensity))) + vec2(0.5);
|
|
if (_75.barrel_distortion_intensity > 0.0)
|
|
{
|
|
float _96 = _86.x;
|
|
bool _97 = _96 < 0.0;
|
|
bool _104;
|
|
if (!_97)
|
|
{
|
|
_104 = _96 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_104 = _97;
|
|
}
|
|
bool _112;
|
|
if (!_104)
|
|
{
|
|
_112 = _86.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_112 = _104;
|
|
}
|
|
bool _119;
|
|
if (!_112)
|
|
{
|
|
_119 = _86.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_119 = _112;
|
|
}
|
|
if (_119)
|
|
{
|
|
frag_color = vec4(0.0, 0.0, 0.0, 1.0);
|
|
return;
|
|
}
|
|
}
|
|
vec2 _142 = vec2(_75.chromatic_aberration_intensity, 0.0);
|
|
vec4 _144 = texture(pptex_ppsmp, _86 + _142);
|
|
vec4 _151 = texture(pptex_ppsmp, _86);
|
|
vec4 _162 = texture(pptex_ppsmp, _86 - _142);
|
|
vec3 _176 = vec4(_144.x, _151.y, _162.z, 1.0).xyz * _75.exposure;
|
|
vec3 color_ldr_linear;
|
|
if (_75.tonemap > 0.5)
|
|
{
|
|
vec3 param = _176;
|
|
color_ldr_linear = aces(param);
|
|
}
|
|
else
|
|
{
|
|
color_ldr_linear = _176;
|
|
}
|
|
vec3 _198 = ((color_ldr_linear - vec3(0.5)) * max(_75.contrast, 0.0)) + vec3(0.5);
|
|
color_ldr_linear = clamp(mix(vec3(dot(_198, vec3(0.2125000059604644775390625, 0.7153999805450439453125, 0.07209999859333038330078125))), _198, vec3(_75.saturation)), vec3(0.0), vec3(1.0));
|
|
if (_75.lut_mode != 0)
|
|
{
|
|
if (_75.lut_mode == 2)
|
|
{
|
|
color_ldr_linear = texture(lut_ppsmp, vec2((floor(color_ldr_linear.z * 15.0) * 0.0625) + (floor(color_ldr_linear.x * 15.0) * 0.00390625), floor(color_ldr_linear.y * 15.0) * 0.0625)).xyz;
|
|
}
|
|
else
|
|
{
|
|
float _269 = color_ldr_linear.z * 15.0;
|
|
float _272 = floor(_269);
|
|
float _283 = ((color_ldr_linear.y * 15.0) + 0.5) * 0.0625;
|
|
float _289 = color_ldr_linear.x * 15.0;
|
|
color_ldr_linear = mix(texture(lut_lut_linear, vec2((((_272 * 16.0) + _289) + 0.5) * 0.00390625, _283)).xyz, texture(lut_lut_linear, vec2((((min(_272 + 1.0, 15.0) * 16.0) + _289) + 0.5) * 0.00390625, _283)).xyz, vec3(_269 - _272));
|
|
}
|
|
}
|
|
vec3 color_srgb = (pow(color_ldr_linear, vec3(1.0 / _75.gamma)) * (1.0 - (smoothstep(0.0, _75.vignette_radius, _67) * _75.vignette_intensity))) * (1.0 - (((sin(gl_FragCoord.y * _75.scanlines_density) * 0.5) + 0.5) * _75.scanlines_intensity));
|
|
vec2 param_1 = texcoord;
|
|
vec3 _387 = color_srgb;
|
|
vec3 _389 = _387 + vec3((rand(param_1) - 0.5) * _75.film_grain_intensity);
|
|
color_srgb = _389;
|
|
frag_color = vec4(clamp(_389, vec3(0.0), vec3(1.0)), 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_pp_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x73,0x74,
|
|
0x72,0x75,0x63,0x74,0x20,0x70,0x6f,0x73,0x74,0x5f,0x70,0x72,0x6f,0x63,0x65,0x73,
|
|
0x73,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x65,0x78,0x70,0x6f,0x73,0x75,0x72,0x65,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x63,0x6f,0x6e,0x74,0x72,0x61,0x73,
|
|
0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,0x61,0x74,
|
|
0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x67,0x61,0x6d,0x6d,0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x74,0x6f,0x6e,0x65,0x6d,0x61,0x70,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x69,0x67,0x6e,0x65,0x74,0x74,0x65,0x5f,
|
|
0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x76,0x69,0x67,0x6e,0x65,0x74,0x74,0x65,0x5f,0x72,0x61,
|
|
0x64,0x69,0x75,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x73,0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,0x73,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,
|
|
0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,
|
|
0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,0x73,0x5f,0x64,0x65,0x6e,0x73,0x69,0x74,0x79,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x63,0x68,0x72,0x6f,
|
|
0x6d,0x61,0x74,0x69,0x63,0x5f,0x61,0x62,0x65,0x72,0x72,0x61,0x74,0x69,0x6f,0x6e,
|
|
0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x66,0x69,0x6c,0x6d,0x5f,0x67,0x72,0x61,0x69,0x6e,
|
|
0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x61,0x72,0x72,0x65,0x6c,0x5f,0x64,0x69,0x73,
|
|
0x74,0x6f,0x72,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,
|
|
0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x6c,0x75,0x74,0x5f,0x6d,
|
|
0x6f,0x64,0x65,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,
|
|
0x20,0x70,0x6f,0x73,0x74,0x5f,0x70,0x72,0x6f,0x63,0x65,0x73,0x73,0x5f,0x63,0x6f,
|
|
0x6e,0x66,0x69,0x67,0x20,0x5f,0x37,0x35,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,
|
|
0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x36,0x29,0x20,
|
|
0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,
|
|
0x44,0x20,0x70,0x70,0x74,0x65,0x78,0x5f,0x70,0x70,0x73,0x6d,0x70,0x3b,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,
|
|
0x31,0x37,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x72,0x32,0x44,0x20,0x6c,0x75,0x74,0x5f,0x70,0x70,0x73,0x6d,0x70,0x3b,
|
|
0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,
|
|
0x3d,0x20,0x31,0x38,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x6c,0x75,0x74,0x5f,0x6c,0x75,0x74,0x5f,
|
|
0x6c,0x69,0x6e,0x65,0x61,0x72,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,
|
|
0x20,0x76,0x65,0x63,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x3b,0x0a,
|
|
0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
|
|
0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,
|
|
0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x65,0x63,0x33,0x20,
|
|
0x61,0x63,0x65,0x73,0x28,0x76,0x65,0x63,0x33,0x20,0x78,0x29,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63,0x6c,0x61,0x6d,0x70,0x28,
|
|
0x28,0x78,0x20,0x2a,0x20,0x28,0x28,0x78,0x20,0x2a,0x20,0x32,0x2e,0x35,0x30,0x39,
|
|
0x39,0x39,0x39,0x39,0x39,0x30,0x34,0x36,0x33,0x32,0x35,0x36,0x38,0x33,0x35,0x39,
|
|
0x33,0x37,0x35,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x32,
|
|
0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x33,0x32,0x39,0x34,0x34,0x37,0x37,0x34,0x36,
|
|
0x32,0x37,0x36,0x38,0x35,0x35,0x34,0x36,0x38,0x37,0x35,0x29,0x29,0x29,0x20,0x2f,
|
|
0x20,0x28,0x28,0x78,0x20,0x2a,0x20,0x28,0x28,0x78,0x20,0x2a,0x20,0x32,0x2e,0x34,
|
|
0x33,0x30,0x30,0x30,0x30,0x30,0x36,0x36,0x37,0x35,0x37,0x32,0x30,0x32,0x31,0x34,
|
|
0x38,0x34,0x33,0x37,0x35,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,
|
|
0x35,0x38,0x39,0x39,0x39,0x39,0x39,0x37,0x33,0x37,0x37,0x33,0x39,0x35,0x36,0x32,
|
|
0x39,0x38,0x38,0x32,0x38,0x31,0x32,0x35,0x29,0x29,0x29,0x20,0x2b,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x30,0x2e,0x31,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x35,0x39,
|
|
0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x29,
|
|
0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x72,0x61,0x6e,0x64,0x28,0x76,0x65,0x63,0x32,0x20,0x63,0x6f,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x72,
|
|
0x61,0x63,0x74,0x28,0x73,0x69,0x6e,0x28,0x64,0x6f,0x74,0x28,0x63,0x6f,0x2c,0x20,
|
|
0x76,0x65,0x63,0x32,0x28,0x31,0x32,0x2e,0x39,0x38,0x39,0x38,0x30,0x30,0x34,0x35,
|
|
0x33,0x31,0x38,0x36,0x30,0x33,0x35,0x31,0x35,0x36,0x32,0x35,0x2c,0x20,0x37,0x38,
|
|
0x2e,0x32,0x33,0x33,0x30,0x30,0x31,0x37,0x30,0x38,0x39,0x38,0x34,0x33,0x37,0x35,
|
|
0x29,0x29,0x29,0x20,0x2a,0x20,0x34,0x33,0x37,0x35,0x38,0x2e,0x35,0x34,0x36,0x38,
|
|
0x37,0x35,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,
|
|
0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,
|
|
0x36,0x36,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x20,0x2d,0x20,
|
|
0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x37,0x20,0x3d,0x20,0x6c,0x65,0x6e,0x67,0x74,
|
|
0x68,0x28,0x5f,0x36,0x36,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,
|
|
0x20,0x5f,0x38,0x36,0x20,0x3d,0x20,0x28,0x5f,0x36,0x36,0x20,0x2a,0x20,0x28,0x31,
|
|
0x2e,0x30,0x20,0x2b,0x20,0x28,0x5f,0x36,0x37,0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,
|
|
0x62,0x61,0x72,0x72,0x65,0x6c,0x5f,0x64,0x69,0x73,0x74,0x6f,0x72,0x74,0x69,0x6f,
|
|
0x6e,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x29,0x29,0x20,0x2b,
|
|
0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x5f,0x37,0x35,0x2e,0x62,0x61,0x72,0x72,0x65,0x6c,0x5f,0x64,
|
|
0x69,0x73,0x74,0x6f,0x72,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,
|
|
0x69,0x74,0x79,0x20,0x3e,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,
|
|
0x39,0x36,0x20,0x3d,0x20,0x5f,0x38,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x39,0x37,0x20,0x3d,0x20,0x5f,
|
|
0x39,0x36,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x34,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x39,0x37,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x34,0x20,0x3d,0x20,0x5f,0x39,0x36,0x20,
|
|
0x3e,0x20,0x31,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x34,0x20,0x3d,0x20,0x5f,0x39,0x37,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x32,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,0x30,0x34,0x29,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x32,0x20,0x3d,0x20,0x5f,0x38,0x36,
|
|
0x2e,0x79,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x32,0x20,0x3d,0x20,0x5f,0x31,
|
|
0x30,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x39,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,
|
|
0x31,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x39,0x20,0x3d,
|
|
0x20,0x5f,0x38,0x36,0x2e,0x79,0x20,0x3e,0x20,0x31,0x2e,0x30,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x39,0x20,
|
|
0x3d,0x20,0x5f,0x31,0x31,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,
|
|
0x31,0x39,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x2c,
|
|
0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x31,
|
|
0x34,0x32,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x5f,0x37,0x35,0x2e,0x63,0x68,
|
|
0x72,0x6f,0x6d,0x61,0x74,0x69,0x63,0x5f,0x61,0x62,0x65,0x72,0x72,0x61,0x74,0x69,
|
|
0x6f,0x6e,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x34,
|
|
0x34,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x70,0x70,0x74,0x65,
|
|
0x78,0x5f,0x70,0x70,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x38,0x36,0x20,0x2b,0x20,0x5f,
|
|
0x31,0x34,0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,
|
|
0x31,0x35,0x31,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x70,0x70,
|
|
0x74,0x65,0x78,0x5f,0x70,0x70,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x38,0x36,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x36,0x32,0x20,0x3d,
|
|
0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x70,0x70,0x74,0x65,0x78,0x5f,0x70,
|
|
0x70,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x38,0x36,0x20,0x2d,0x20,0x5f,0x31,0x34,0x32,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x37,0x36,
|
|
0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x31,0x34,0x34,0x2e,0x78,0x2c,0x20,
|
|
0x5f,0x31,0x35,0x31,0x2e,0x79,0x2c,0x20,0x5f,0x31,0x36,0x32,0x2e,0x7a,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,0x65,
|
|
0x78,0x70,0x6f,0x73,0x75,0x72,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,
|
|
0x61,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x35,0x2e,
|
|
0x74,0x6f,0x6e,0x65,0x6d,0x61,0x70,0x20,0x3e,0x20,0x30,0x2e,0x35,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x31,0x37,0x36,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,
|
|
0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x20,0x3d,0x20,0x61,0x63,0x65,0x73,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,
|
|
0x69,0x6e,0x65,0x61,0x72,0x20,0x3d,0x20,0x5f,0x31,0x37,0x36,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x39,
|
|
0x38,0x20,0x3d,0x20,0x28,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,
|
|
0x6c,0x69,0x6e,0x65,0x61,0x72,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,
|
|
0x35,0x29,0x29,0x20,0x2a,0x20,0x6d,0x61,0x78,0x28,0x5f,0x37,0x35,0x2e,0x63,0x6f,
|
|
0x6e,0x74,0x72,0x61,0x73,0x74,0x2c,0x20,0x30,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,
|
|
0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x20,
|
|
0x3d,0x20,0x63,0x6c,0x61,0x6d,0x70,0x28,0x6d,0x69,0x78,0x28,0x76,0x65,0x63,0x33,
|
|
0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x39,0x38,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,
|
|
0x30,0x2e,0x32,0x31,0x32,0x35,0x30,0x30,0x30,0x30,0x35,0x39,0x36,0x30,0x34,0x36,
|
|
0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x2c,0x20,0x30,0x2e,0x37,
|
|
0x31,0x35,0x33,0x39,0x39,0x39,0x38,0x30,0x35,0x34,0x35,0x30,0x34,0x33,0x39,0x34,
|
|
0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x30,0x37,0x32,0x30,0x39,0x39,0x39,
|
|
0x39,0x38,0x35,0x39,0x33,0x33,0x33,0x30,0x33,0x38,0x33,0x33,0x30,0x30,0x37,0x38,
|
|
0x31,0x32,0x35,0x29,0x29,0x29,0x2c,0x20,0x5f,0x31,0x39,0x38,0x2c,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x5f,0x37,0x35,0x2e,0x73,0x61,0x74,0x75,0x72,0x61,0x74,0x69,0x6f,
|
|
0x6e,0x29,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,
|
|
0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x5f,0x37,0x35,0x2e,0x6c,0x75,0x74,0x5f,0x6d,0x6f,0x64,0x65,
|
|
0x20,0x21,0x3d,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x35,0x2e,0x6c,0x75,0x74,
|
|
0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x3d,0x20,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,
|
|
0x61,0x72,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6c,0x75,0x74,
|
|
0x5f,0x70,0x70,0x73,0x6d,0x70,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x28,0x66,0x6c,
|
|
0x6f,0x6f,0x72,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,
|
|
0x6e,0x65,0x61,0x72,0x2e,0x7a,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,0x29,0x20,0x2a,
|
|
0x20,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x6f,
|
|
0x72,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,
|
|
0x61,0x72,0x2e,0x78,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,0x29,0x20,0x2a,0x20,0x30,
|
|
0x2e,0x30,0x30,0x33,0x39,0x30,0x36,0x32,0x35,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x6f,
|
|
0x72,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,
|
|
0x61,0x72,0x2e,0x79,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,0x29,0x20,0x2a,0x20,0x30,
|
|
0x2e,0x30,0x36,0x32,0x35,0x29,0x29,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
|
|
0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x5f,0x32,0x36,0x39,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,
|
|
0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2e,0x7a,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x5f,0x32,0x37,0x32,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x6f,0x72,
|
|
0x28,0x5f,0x32,0x36,0x39,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x38,0x33,0x20,0x3d,
|
|
0x20,0x28,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,
|
|
0x65,0x61,0x72,0x2e,0x79,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,0x29,0x20,0x2b,0x20,
|
|
0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x30,0x2e,0x30,0x36,0x32,0x35,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x5f,0x32,0x38,0x39,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,
|
|
0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2e,0x78,0x20,0x2a,0x20,0x31,0x35,0x2e,
|
|
0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x20,
|
|
0x3d,0x20,0x6d,0x69,0x78,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6c,0x75,
|
|
0x74,0x5f,0x6c,0x75,0x74,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2c,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x28,0x28,0x28,0x5f,0x32,0x37,0x32,0x20,0x2a,0x20,0x31,0x36,0x2e,
|
|
0x30,0x29,0x20,0x2b,0x20,0x5f,0x32,0x38,0x39,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,
|
|
0x29,0x20,0x2a,0x20,0x30,0x2e,0x30,0x30,0x33,0x39,0x30,0x36,0x32,0x35,0x2c,0x20,
|
|
0x5f,0x32,0x38,0x33,0x29,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x28,0x6c,0x75,0x74,0x5f,0x6c,0x75,0x74,0x5f,0x6c,0x69,0x6e,0x65,
|
|
0x61,0x72,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x28,0x28,0x28,0x6d,0x69,0x6e,0x28,
|
|
0x5f,0x32,0x37,0x32,0x20,0x2b,0x20,0x31,0x2e,0x30,0x2c,0x20,0x31,0x35,0x2e,0x30,
|
|
0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,0x5f,0x32,0x38,0x39,
|
|
0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x30,0x2e,0x30,0x30,0x33,
|
|
0x39,0x30,0x36,0x32,0x35,0x2c,0x20,0x5f,0x32,0x38,0x33,0x29,0x29,0x2e,0x78,0x79,
|
|
0x7a,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x32,0x36,0x39,0x20,0x2d,0x20,0x5f,
|
|
0x32,0x37,0x32,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x73,0x72,0x67,0x62,0x20,0x3d,0x20,0x28,0x70,0x6f,
|
|
0x77,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,
|
|
0x61,0x72,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x20,0x2f,0x20,0x5f,
|
|
0x37,0x35,0x2e,0x67,0x61,0x6d,0x6d,0x61,0x29,0x29,0x20,0x2a,0x20,0x28,0x31,0x2e,
|
|
0x30,0x20,0x2d,0x20,0x28,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,
|
|
0x30,0x2e,0x30,0x2c,0x20,0x5f,0x37,0x35,0x2e,0x76,0x69,0x67,0x6e,0x65,0x74,0x74,
|
|
0x65,0x5f,0x72,0x61,0x64,0x69,0x75,0x73,0x2c,0x20,0x5f,0x36,0x37,0x29,0x20,0x2a,
|
|
0x20,0x5f,0x37,0x35,0x2e,0x76,0x69,0x67,0x6e,0x65,0x74,0x74,0x65,0x5f,0x69,0x6e,
|
|
0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x29,0x29,0x20,0x2a,0x20,0x28,0x31,0x2e,
|
|
0x30,0x20,0x2d,0x20,0x28,0x28,0x28,0x73,0x69,0x6e,0x28,0x67,0x6c,0x5f,0x46,0x72,
|
|
0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x79,0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,
|
|
0x73,0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,0x73,0x5f,0x64,0x65,0x6e,0x73,0x69,0x74,
|
|
0x79,0x29,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,
|
|
0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,0x73,0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,0x73,
|
|
0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,
|
|
0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
|
|
0x65,0x63,0x33,0x20,0x5f,0x33,0x38,0x37,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x5f,0x73,0x72,0x67,0x62,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x5f,0x33,0x38,0x39,0x20,0x3d,0x20,0x5f,0x33,0x38,0x37,0x20,0x2b,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x28,0x72,0x61,0x6e,0x64,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
|
0x29,0x20,0x2d,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,0x66,
|
|
0x69,0x6c,0x6d,0x5f,0x67,0x72,0x61,0x69,0x6e,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,
|
|
0x69,0x74,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,
|
|
0x73,0x72,0x67,0x62,0x20,0x3d,0x20,0x5f,0x33,0x38,0x39,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x34,0x28,0x63,0x6c,0x61,0x6d,0x70,0x28,0x5f,0x33,0x38,0x39,0x2c,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x31,
|
|
0x2e,0x30,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
|
|
];
|
|
/*
|
|
#version 300 es
|
|
|
|
layout(location = 0) in vec2 position;
|
|
out vec2 texcoord;
|
|
layout(location = 1) in vec2 uv;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = vec4(position, 0.5, 1.0);
|
|
texcoord = uv;
|
|
}
|
|
|
|
*/
|
|
vs_pp_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
|
|
0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x6f,
|
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,
|
|
0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
|
|
0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,
|
|
0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x0a,0x76,0x6f,0x69,
|
|
0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,
|
|
0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,
|
|
0x34,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x30,0x2e,0x35,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x74,0x65,0x78,0x63,0x6f,
|
|
0x6f,0x72,0x64,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
struct post_process_config
|
|
{
|
|
highp float exposure;
|
|
highp float contrast;
|
|
highp float saturation;
|
|
highp float gamma;
|
|
highp float tonemap;
|
|
highp float vignette_intensity;
|
|
highp float vignette_radius;
|
|
highp float scanlines_intensity;
|
|
highp float scanlines_density;
|
|
highp float chromatic_aberration_intensity;
|
|
highp float film_grain_intensity;
|
|
highp float barrel_distortion_intensity;
|
|
int lut_mode;
|
|
};
|
|
|
|
uniform post_process_config _75;
|
|
|
|
uniform highp sampler2D pptex_ppsmp;
|
|
uniform highp sampler2D lut_ppsmp;
|
|
uniform highp sampler2D lut_lut_linear;
|
|
|
|
in highp vec2 texcoord;
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
|
|
highp vec3 aces(highp vec3 x)
|
|
{
|
|
return clamp((x * ((x * 2.5099999904632568359375) + vec3(0.02999999932944774627685546875))) / ((x * ((x * 2.4300000667572021484375) + vec3(0.589999973773956298828125))) + vec3(0.14000000059604644775390625)), vec3(0.0), vec3(1.0));
|
|
}
|
|
|
|
highp float rand(highp vec2 co)
|
|
{
|
|
return fract(sin(dot(co, vec2(12.98980045318603515625, 78.233001708984375))) * 43758.546875);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
highp vec2 _66 = texcoord - vec2(0.5);
|
|
highp float _67 = length(_66);
|
|
highp vec2 _86 = (_66 * (1.0 + (_67 * _75.barrel_distortion_intensity))) + vec2(0.5);
|
|
if (_75.barrel_distortion_intensity > 0.0)
|
|
{
|
|
highp float _96 = _86.x;
|
|
bool _97 = _96 < 0.0;
|
|
bool _104;
|
|
if (!_97)
|
|
{
|
|
_104 = _96 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_104 = _97;
|
|
}
|
|
bool _112;
|
|
if (!_104)
|
|
{
|
|
_112 = _86.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_112 = _104;
|
|
}
|
|
bool _119;
|
|
if (!_112)
|
|
{
|
|
_119 = _86.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_119 = _112;
|
|
}
|
|
if (_119)
|
|
{
|
|
frag_color = vec4(0.0, 0.0, 0.0, 1.0);
|
|
return;
|
|
}
|
|
}
|
|
highp vec2 _142 = vec2(_75.chromatic_aberration_intensity, 0.0);
|
|
highp vec4 _144 = texture(pptex_ppsmp, _86 + _142);
|
|
highp vec4 _151 = texture(pptex_ppsmp, _86);
|
|
highp vec4 _162 = texture(pptex_ppsmp, _86 - _142);
|
|
highp vec3 _176 = vec4(_144.x, _151.y, _162.z, 1.0).xyz * _75.exposure;
|
|
highp vec3 color_ldr_linear;
|
|
if (_75.tonemap > 0.5)
|
|
{
|
|
highp vec3 param = _176;
|
|
color_ldr_linear = aces(param);
|
|
}
|
|
else
|
|
{
|
|
color_ldr_linear = _176;
|
|
}
|
|
highp vec3 _198 = ((color_ldr_linear - vec3(0.5)) * max(_75.contrast, 0.0)) + vec3(0.5);
|
|
color_ldr_linear = clamp(mix(vec3(dot(_198, vec3(0.2125000059604644775390625, 0.7153999805450439453125, 0.07209999859333038330078125))), _198, vec3(_75.saturation)), vec3(0.0), vec3(1.0));
|
|
if (_75.lut_mode != 0)
|
|
{
|
|
if (_75.lut_mode == 2)
|
|
{
|
|
color_ldr_linear = texture(lut_ppsmp, vec2((floor(color_ldr_linear.z * 15.0) * 0.0625) + (floor(color_ldr_linear.x * 15.0) * 0.00390625), floor(color_ldr_linear.y * 15.0) * 0.0625)).xyz;
|
|
}
|
|
else
|
|
{
|
|
highp float _269 = color_ldr_linear.z * 15.0;
|
|
highp float _272 = floor(_269);
|
|
highp float _283 = ((color_ldr_linear.y * 15.0) + 0.5) * 0.0625;
|
|
highp float _289 = color_ldr_linear.x * 15.0;
|
|
color_ldr_linear = mix(texture(lut_lut_linear, vec2((((_272 * 16.0) + _289) + 0.5) * 0.00390625, _283)).xyz, texture(lut_lut_linear, vec2((((min(_272 + 1.0, 15.0) * 16.0) + _289) + 0.5) * 0.00390625, _283)).xyz, vec3(_269 - _272));
|
|
}
|
|
}
|
|
highp vec3 color_srgb = (pow(color_ldr_linear, vec3(1.0 / _75.gamma)) * (1.0 - (smoothstep(0.0, _75.vignette_radius, _67) * _75.vignette_intensity))) * (1.0 - (((sin(gl_FragCoord.y * _75.scanlines_density) * 0.5) + 0.5) * _75.scanlines_intensity));
|
|
highp vec2 param_1 = texcoord;
|
|
highp vec3 _387 = color_srgb;
|
|
highp vec3 _389 = _387 + vec3((rand(param_1) - 0.5) * _75.film_grain_intensity);
|
|
color_srgb = _389;
|
|
frag_color = vec4(clamp(_389, vec3(0.0), vec3(1.0)), 1.0);
|
|
}
|
|
|
|
*/
|
|
fs_pp_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
|
|
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x73,
|
|
0x74,0x72,0x75,0x63,0x74,0x20,0x70,0x6f,0x73,0x74,0x5f,0x70,0x72,0x6f,0x63,0x65,
|
|
0x73,0x73,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x65,0x78,0x70,0x6f,
|
|
0x73,0x75,0x72,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x63,0x6f,0x6e,0x74,0x72,0x61,0x73,0x74,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x73,0x61,0x74,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x61,0x6d,0x6d,
|
|
0x61,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x74,0x6f,0x6e,0x65,0x6d,0x61,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x69,0x67,0x6e,
|
|
0x65,0x74,0x74,0x65,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x76,0x69,0x67,0x6e,0x65,0x74,0x74,0x65,0x5f,0x72,0x61,0x64,0x69,0x75,0x73,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x73,0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,0x73,0x5f,0x69,0x6e,0x74,0x65,0x6e,
|
|
0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,0x73,0x5f,
|
|
0x64,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x63,0x68,0x72,0x6f,0x6d,0x61,0x74,
|
|
0x69,0x63,0x5f,0x61,0x62,0x65,0x72,0x72,0x61,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x6e,
|
|
0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x66,0x69,0x6c,0x6d,0x5f,0x67,0x72,
|
|
0x61,0x69,0x6e,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,
|
|
0x61,0x72,0x72,0x65,0x6c,0x5f,0x64,0x69,0x73,0x74,0x6f,0x72,0x74,0x69,0x6f,0x6e,
|
|
0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x6e,0x74,0x20,0x6c,0x75,0x74,0x5f,0x6d,0x6f,0x64,0x65,0x3b,0x0a,0x7d,0x3b,
|
|
0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x70,0x6f,0x73,0x74,0x5f,0x70,
|
|
0x72,0x6f,0x63,0x65,0x73,0x73,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x20,0x5f,0x37,
|
|
0x35,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x70,0x70,0x74,0x65,
|
|
0x78,0x5f,0x70,0x70,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,
|
|
0x20,0x6c,0x75,0x74,0x5f,0x70,0x70,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,
|
|
0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x72,0x32,0x44,0x20,0x6c,0x75,0x74,0x5f,0x6c,0x75,0x74,0x5f,0x6c,0x69,0x6e,0x65,
|
|
0x61,0x72,0x3b,0x0a,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x3b,0x0a,0x6c,0x61,0x79,
|
|
0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,
|
|
0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x61,0x63,0x65,0x73,0x28,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x63,0x6c,0x61,0x6d,0x70,0x28,0x28,
|
|
0x78,0x20,0x2a,0x20,0x28,0x28,0x78,0x20,0x2a,0x20,0x32,0x2e,0x35,0x30,0x39,0x39,
|
|
0x39,0x39,0x39,0x39,0x30,0x34,0x36,0x33,0x32,0x35,0x36,0x38,0x33,0x35,0x39,0x33,
|
|
0x37,0x35,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x32,0x39,
|
|
0x39,0x39,0x39,0x39,0x39,0x39,0x33,0x32,0x39,0x34,0x34,0x37,0x37,0x34,0x36,0x32,
|
|
0x37,0x36,0x38,0x35,0x35,0x34,0x36,0x38,0x37,0x35,0x29,0x29,0x29,0x20,0x2f,0x20,
|
|
0x28,0x28,0x78,0x20,0x2a,0x20,0x28,0x28,0x78,0x20,0x2a,0x20,0x32,0x2e,0x34,0x33,
|
|
0x30,0x30,0x30,0x30,0x30,0x36,0x36,0x37,0x35,0x37,0x32,0x30,0x32,0x31,0x34,0x38,
|
|
0x34,0x33,0x37,0x35,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,
|
|
0x38,0x39,0x39,0x39,0x39,0x39,0x37,0x33,0x37,0x37,0x33,0x39,0x35,0x36,0x32,0x39,
|
|
0x38,0x38,0x32,0x38,0x31,0x32,0x35,0x29,0x29,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x30,0x2e,0x31,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x35,0x39,0x36,
|
|
0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x29,0x29,
|
|
0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x72,0x61,0x6e,0x64,0x28,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x63,0x6f,0x29,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x72,0x61,0x63,0x74,0x28,0x73,
|
|
0x69,0x6e,0x28,0x64,0x6f,0x74,0x28,0x63,0x6f,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,
|
|
0x31,0x32,0x2e,0x39,0x38,0x39,0x38,0x30,0x30,0x34,0x35,0x33,0x31,0x38,0x36,0x30,
|
|
0x33,0x35,0x31,0x35,0x36,0x32,0x35,0x2c,0x20,0x37,0x38,0x2e,0x32,0x33,0x33,0x30,
|
|
0x30,0x31,0x37,0x30,0x38,0x39,0x38,0x34,0x33,0x37,0x35,0x29,0x29,0x29,0x20,0x2a,
|
|
0x20,0x34,0x33,0x37,0x35,0x38,0x2e,0x35,0x34,0x36,0x38,0x37,0x35,0x29,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,
|
|
0x5f,0x36,0x36,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x20,0x2d,
|
|
0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x37,0x20,
|
|
0x3d,0x20,0x6c,0x65,0x6e,0x67,0x74,0x68,0x28,0x5f,0x36,0x36,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x38,
|
|
0x36,0x20,0x3d,0x20,0x28,0x5f,0x36,0x36,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,
|
|
0x2b,0x20,0x28,0x5f,0x36,0x37,0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,0x62,0x61,0x72,
|
|
0x72,0x65,0x6c,0x5f,0x64,0x69,0x73,0x74,0x6f,0x72,0x74,0x69,0x6f,0x6e,0x5f,0x69,
|
|
0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x29,0x29,0x20,0x2b,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x5f,0x37,0x35,0x2e,0x62,0x61,0x72,0x72,0x65,0x6c,0x5f,0x64,0x69,0x73,0x74,
|
|
0x6f,0x72,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,
|
|
0x20,0x3e,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x5f,0x39,0x36,0x20,0x3d,0x20,0x5f,0x38,0x36,0x2e,0x78,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x39,0x37,0x20,
|
|
0x3d,0x20,0x5f,0x39,0x36,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x34,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x39,0x37,
|
|
0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x34,0x20,0x3d,0x20,0x5f,
|
|
0x39,0x36,0x20,0x3e,0x20,0x31,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x34,0x20,0x3d,0x20,0x5f,0x39,
|
|
0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x32,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,0x30,
|
|
0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x32,0x20,0x3d,0x20,
|
|
0x5f,0x38,0x36,0x2e,0x79,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
|
|
0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x32,0x20,0x3d,
|
|
0x20,0x5f,0x31,0x30,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,
|
|
0x31,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
|
0x21,0x5f,0x31,0x31,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,
|
|
0x39,0x20,0x3d,0x20,0x5f,0x38,0x36,0x2e,0x79,0x20,0x3e,0x20,0x31,0x2e,0x30,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,
|
|
0x31,0x39,0x20,0x3d,0x20,0x5f,0x31,0x31,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x5f,0x31,0x31,0x39,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x72,0x61,
|
|
0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x30,
|
|
0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x31,0x34,0x32,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x5f,0x37,0x35,0x2e,0x63,0x68,0x72,0x6f,0x6d,0x61,0x74,0x69,0x63,
|
|
0x5f,0x61,0x62,0x65,0x72,0x72,0x61,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x6e,0x74,0x65,
|
|
0x6e,0x73,0x69,0x74,0x79,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x34,0x34,
|
|
0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x70,0x70,0x74,0x65,0x78,
|
|
0x5f,0x70,0x70,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x38,0x36,0x20,0x2b,0x20,0x5f,0x31,
|
|
0x34,0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
|
0x65,0x63,0x34,0x20,0x5f,0x31,0x35,0x31,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x28,0x70,0x70,0x74,0x65,0x78,0x5f,0x70,0x70,0x73,0x6d,0x70,0x2c,0x20,
|
|
0x5f,0x38,0x36,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x36,0x32,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x28,0x70,0x70,0x74,0x65,0x78,0x5f,0x70,0x70,0x73,0x6d,0x70,0x2c,
|
|
0x20,0x5f,0x38,0x36,0x20,0x2d,0x20,0x5f,0x31,0x34,0x32,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x37,
|
|
0x36,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x31,0x34,0x34,0x2e,0x78,0x2c,
|
|
0x20,0x5f,0x31,0x35,0x31,0x2e,0x79,0x2c,0x20,0x5f,0x31,0x36,0x32,0x2e,0x7a,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,
|
|
0x65,0x78,0x70,0x6f,0x73,0x75,0x72,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,
|
|
0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x5f,0x37,0x35,0x2e,0x74,0x6f,0x6e,0x65,0x6d,0x61,0x70,0x20,0x3e,
|
|
0x20,0x30,0x2e,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x31,0x37,0x36,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,
|
|
0x69,0x6e,0x65,0x61,0x72,0x20,0x3d,0x20,0x61,0x63,0x65,0x73,0x28,0x70,0x61,0x72,
|
|
0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,
|
|
0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,
|
|
0x61,0x72,0x20,0x3d,0x20,0x5f,0x31,0x37,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x5f,0x31,0x39,0x38,0x20,0x3d,0x20,0x28,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,
|
|
0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,
|
|
0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2a,0x20,0x6d,0x61,0x78,0x28,0x5f,0x37,0x35,
|
|
0x2e,0x63,0x6f,0x6e,0x74,0x72,0x61,0x73,0x74,0x2c,0x20,0x30,0x2e,0x30,0x29,0x29,
|
|
0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,
|
|
0x61,0x72,0x20,0x3d,0x20,0x63,0x6c,0x61,0x6d,0x70,0x28,0x6d,0x69,0x78,0x28,0x76,
|
|
0x65,0x63,0x33,0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x39,0x38,0x2c,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x30,0x2e,0x32,0x31,0x32,0x35,0x30,0x30,0x30,0x30,0x35,0x39,0x36,
|
|
0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x2c,0x20,
|
|
0x30,0x2e,0x37,0x31,0x35,0x33,0x39,0x39,0x39,0x38,0x30,0x35,0x34,0x35,0x30,0x34,
|
|
0x33,0x39,0x34,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x30,0x37,0x32,0x30,
|
|
0x39,0x39,0x39,0x39,0x38,0x35,0x39,0x33,0x33,0x33,0x30,0x33,0x38,0x33,0x33,0x30,
|
|
0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x29,0x29,0x2c,0x20,0x5f,0x31,0x39,0x38,0x2c,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x37,0x35,0x2e,0x73,0x61,0x74,0x75,0x72,0x61,
|
|
0x74,0x69,0x6f,0x6e,0x29,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,
|
|
0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x35,0x2e,0x6c,0x75,0x74,0x5f,0x6d,
|
|
0x6f,0x64,0x65,0x20,0x21,0x3d,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x35,0x2e,
|
|
0x6c,0x75,0x74,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x3d,0x20,0x32,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,
|
|
0x69,0x6e,0x65,0x61,0x72,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,
|
|
0x6c,0x75,0x74,0x5f,0x70,0x70,0x73,0x6d,0x70,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,
|
|
0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,
|
|
0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2e,0x7a,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,
|
|
0x29,0x20,0x2a,0x20,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x20,0x2b,0x20,0x28,0x66,
|
|
0x6c,0x6f,0x6f,0x72,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,
|
|
0x69,0x6e,0x65,0x61,0x72,0x2e,0x78,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,0x29,0x20,
|
|
0x2a,0x20,0x30,0x2e,0x30,0x30,0x33,0x39,0x30,0x36,0x32,0x35,0x29,0x2c,0x20,0x66,
|
|
0x6c,0x6f,0x6f,0x72,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,
|
|
0x69,0x6e,0x65,0x61,0x72,0x2e,0x79,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,0x29,0x20,
|
|
0x2a,0x20,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x29,0x2e,0x78,0x79,0x7a,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x36,0x39,0x20,0x3d,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,
|
|
0x2e,0x7a,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x32,0x37,0x32,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,
|
|
0x5f,0x32,0x36,0x39,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,
|
|
0x32,0x38,0x33,0x20,0x3d,0x20,0x28,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,
|
|
0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2e,0x79,0x20,0x2a,0x20,0x31,0x35,0x2e,
|
|
0x30,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x30,0x2e,0x30,0x36,
|
|
0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x38,0x39,
|
|
0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,
|
|
0x65,0x61,0x72,0x2e,0x78,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,
|
|
0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x20,0x3d,0x20,0x6d,0x69,0x78,
|
|
0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6c,0x75,0x74,0x5f,0x6c,0x75,0x74,
|
|
0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x28,0x28,
|
|
0x28,0x5f,0x32,0x37,0x32,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,
|
|
0x5f,0x32,0x38,0x39,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x30,
|
|
0x2e,0x30,0x30,0x33,0x39,0x30,0x36,0x32,0x35,0x2c,0x20,0x5f,0x32,0x38,0x33,0x29,
|
|
0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6c,
|
|
0x75,0x74,0x5f,0x6c,0x75,0x74,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2c,0x20,0x76,
|
|
0x65,0x63,0x32,0x28,0x28,0x28,0x28,0x6d,0x69,0x6e,0x28,0x5f,0x32,0x37,0x32,0x20,
|
|
0x2b,0x20,0x31,0x2e,0x30,0x2c,0x20,0x31,0x35,0x2e,0x30,0x29,0x20,0x2a,0x20,0x31,
|
|
0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,0x5f,0x32,0x38,0x39,0x29,0x20,0x2b,0x20,0x30,
|
|
0x2e,0x35,0x29,0x20,0x2a,0x20,0x30,0x2e,0x30,0x30,0x33,0x39,0x30,0x36,0x32,0x35,
|
|
0x2c,0x20,0x5f,0x32,0x38,0x33,0x29,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x5f,0x32,0x36,0x39,0x20,0x2d,0x20,0x5f,0x32,0x37,0x32,0x29,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7d,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x73,0x72,0x67,0x62,0x20,0x3d,0x20,0x28,0x70,
|
|
0x6f,0x77,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,
|
|
0x65,0x61,0x72,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x20,0x2f,0x20,
|
|
0x5f,0x37,0x35,0x2e,0x67,0x61,0x6d,0x6d,0x61,0x29,0x29,0x20,0x2a,0x20,0x28,0x31,
|
|
0x2e,0x30,0x20,0x2d,0x20,0x28,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,
|
|
0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x37,0x35,0x2e,0x76,0x69,0x67,0x6e,0x65,0x74,
|
|
0x74,0x65,0x5f,0x72,0x61,0x64,0x69,0x75,0x73,0x2c,0x20,0x5f,0x36,0x37,0x29,0x20,
|
|
0x2a,0x20,0x5f,0x37,0x35,0x2e,0x76,0x69,0x67,0x6e,0x65,0x74,0x74,0x65,0x5f,0x69,
|
|
0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x29,0x29,0x20,0x2a,0x20,0x28,0x31,
|
|
0x2e,0x30,0x20,0x2d,0x20,0x28,0x28,0x28,0x73,0x69,0x6e,0x28,0x67,0x6c,0x5f,0x46,
|
|
0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x79,0x20,0x2a,0x20,0x5f,0x37,0x35,
|
|
0x2e,0x73,0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,0x73,0x5f,0x64,0x65,0x6e,0x73,0x69,
|
|
0x74,0x79,0x29,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,
|
|
0x29,0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,0x73,0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,
|
|
0x73,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x5f,0x33,0x38,0x37,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x73,0x72,
|
|
0x67,0x62,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x5f,0x33,0x38,0x39,0x20,0x3d,0x20,0x5f,0x33,0x38,0x37,0x20,0x2b,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x28,0x72,0x61,0x6e,0x64,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x29,0x20,0x2d,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x5f,0x37,
|
|
0x35,0x2e,0x66,0x69,0x6c,0x6d,0x5f,0x67,0x72,0x61,0x69,0x6e,0x5f,0x69,0x6e,0x74,
|
|
0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x5f,0x73,0x72,0x67,0x62,0x20,0x3d,0x20,0x5f,0x33,0x38,0x39,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x34,0x28,0x63,0x6c,0x61,0x6d,0x70,0x28,0x5f,0x33,0x38,0x39,
|
|
0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,
|
|
0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct main0_out
|
|
{
|
|
float2 texcoord [[user(locn0)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float2 position [[attribute(0)]];
|
|
float2 uv [[attribute(1)]];
|
|
};
|
|
|
|
vertex main0_out main0(main0_in in [[stage_in]])
|
|
{
|
|
main0_out out = {};
|
|
out.gl_Position = float4(in.position, 0.5, 1.0);
|
|
out.texcoord = in.uv;
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
vs_pp_source_metal_macos := u8.[
|
|
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
|
|
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
|
|
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
|
|
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
|
|
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
|
|
0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x20,0x5b,
|
|
0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,
|
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
|
0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
|
|
0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,
|
|
0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x30,0x29,0x5d,0x5d,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x5b,
|
|
0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x31,0x29,0x5d,0x5d,0x3b,
|
|
0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,
|
|
0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,
|
|
0x69,0x6e,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,
|
|
0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
|
|
0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x69,0x6e,0x2e,
|
|
0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,
|
|
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x74,0x65,0x78,
|
|
0x63,0x6f,0x6f,0x72,0x64,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x75,0x76,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,
|
|
0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
|
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct post_process_config
|
|
{
|
|
float exposure;
|
|
float contrast;
|
|
float saturation;
|
|
float gamma;
|
|
float tonemap;
|
|
float vignette_intensity;
|
|
float vignette_radius;
|
|
float scanlines_intensity;
|
|
float scanlines_density;
|
|
float chromatic_aberration_intensity;
|
|
float film_grain_intensity;
|
|
float barrel_distortion_intensity;
|
|
int lut_mode;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float2 texcoord [[user(locn0)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float3 aces(thread const float3& x)
|
|
{
|
|
return fast::clamp((x * ((x * 2.5099999904632568359375) + float3(0.02999999932944774627685546875))) / ((x * ((x * 2.4300000667572021484375) + float3(0.589999973773956298828125))) + float3(0.14000000059604644775390625)), float3(0.0), float3(1.0));
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float rand(thread const float2& co)
|
|
{
|
|
return fract(sin(dot(co, float2(12.98980045318603515625, 78.233001708984375))) * 43758.546875);
|
|
}
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant post_process_config& _75 [[buffer(0)]], texture2d<float> pptex [[texture(0)]], texture2d<float> lut [[texture(1)]], sampler ppsmp [[sampler(0)]], sampler lut_linear [[sampler(1)]], float4 gl_FragCoord [[position]])
|
|
{
|
|
main0_out out = {};
|
|
float2 _66 = in.texcoord - float2(0.5);
|
|
float _67 = length(_66);
|
|
float2 _86 = (_66 * (1.0 + (_67 * _75.barrel_distortion_intensity))) + float2(0.5);
|
|
if (_75.barrel_distortion_intensity > 0.0)
|
|
{
|
|
float _96 = _86.x;
|
|
bool _97 = _96 < 0.0;
|
|
bool _104;
|
|
if (!_97)
|
|
{
|
|
_104 = _96 > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_104 = _97;
|
|
}
|
|
bool _112;
|
|
if (!_104)
|
|
{
|
|
_112 = _86.y < 0.0;
|
|
}
|
|
else
|
|
{
|
|
_112 = _104;
|
|
}
|
|
bool _119;
|
|
if (!_112)
|
|
{
|
|
_119 = _86.y > 1.0;
|
|
}
|
|
else
|
|
{
|
|
_119 = _112;
|
|
}
|
|
if (_119)
|
|
{
|
|
out.frag_color = float4(0.0, 0.0, 0.0, 1.0);
|
|
return out;
|
|
}
|
|
}
|
|
float2 _142 = float2(_75.chromatic_aberration_intensity, 0.0);
|
|
float4 _144 = pptex.sample(ppsmp, (_86 + _142));
|
|
float4 _151 = pptex.sample(ppsmp, _86);
|
|
float4 _162 = pptex.sample(ppsmp, (_86 - _142));
|
|
float3 _176 = float4(_144.x, _151.y, _162.z, 1.0).xyz * _75.exposure;
|
|
float3 color_ldr_linear;
|
|
if (_75.tonemap > 0.5)
|
|
{
|
|
float3 param = _176;
|
|
color_ldr_linear = aces(param);
|
|
}
|
|
else
|
|
{
|
|
color_ldr_linear = _176;
|
|
}
|
|
float3 _198 = ((color_ldr_linear - float3(0.5)) * fast::max(_75.contrast, 0.0)) + float3(0.5);
|
|
color_ldr_linear = fast::clamp(mix(float3(dot(_198, float3(0.2125000059604644775390625, 0.7153999805450439453125, 0.07209999859333038330078125))), _198, float3(_75.saturation)), float3(0.0), float3(1.0));
|
|
if (_75.lut_mode != 0)
|
|
{
|
|
if (_75.lut_mode == 2)
|
|
{
|
|
color_ldr_linear = lut.sample(ppsmp, float2((floor(color_ldr_linear.z * 15.0) * 0.0625) + (floor(color_ldr_linear.x * 15.0) * 0.00390625), floor(color_ldr_linear.y * 15.0) * 0.0625)).xyz;
|
|
}
|
|
else
|
|
{
|
|
float _269 = color_ldr_linear.z * 15.0;
|
|
float _272 = floor(_269);
|
|
float _283 = ((color_ldr_linear.y * 15.0) + 0.5) * 0.0625;
|
|
float _289 = color_ldr_linear.x * 15.0;
|
|
color_ldr_linear = mix(lut.sample(lut_linear, float2((((_272 * 16.0) + _289) + 0.5) * 0.00390625, _283)).xyz, lut.sample(lut_linear, float2((((fast::min(_272 + 1.0, 15.0) * 16.0) + _289) + 0.5) * 0.00390625, _283)).xyz, float3(_269 - _272));
|
|
}
|
|
}
|
|
float3 color_srgb = (powr(color_ldr_linear, float3(1.0 / _75.gamma)) * (1.0 - (smoothstep(0.0, _75.vignette_radius, _67) * _75.vignette_intensity))) * (1.0 - (((sin(gl_FragCoord.y * _75.scanlines_density) * 0.5) + 0.5) * _75.scanlines_intensity));
|
|
float2 param_1 = in.texcoord;
|
|
float3 _387 = color_srgb;
|
|
float3 _389 = _387 + float3((rand(param_1) - 0.5) * _75.film_grain_intensity);
|
|
color_srgb = _389;
|
|
out.frag_color = float4(fast::clamp(_389, float3(0.0), float3(1.0)), 1.0);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_pp_source_metal_macos := u8.[
|
|
0x23,0x70,0x72,0x61,0x67,0x6d,0x61,0x20,0x63,0x6c,0x61,0x6e,0x67,0x20,0x64,0x69,
|
|
0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x20,0x69,0x67,0x6e,0x6f,0x72,0x65,0x64,
|
|
0x20,0x22,0x2d,0x57,0x6d,0x69,0x73,0x73,0x69,0x6e,0x67,0x2d,0x70,0x72,0x6f,0x74,
|
|
0x6f,0x74,0x79,0x70,0x65,0x73,0x22,0x0a,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,
|
|
0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,
|
|
0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,
|
|
0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,
|
|
0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,
|
|
0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x70,0x6f,0x73,0x74,0x5f,0x70,0x72,0x6f,
|
|
0x63,0x65,0x73,0x73,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x0a,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x65,0x78,0x70,0x6f,0x73,0x75,0x72,0x65,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x63,0x6f,0x6e,0x74,
|
|
0x72,0x61,0x73,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x73,0x61,0x74,0x75,0x72,0x61,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x61,0x6d,0x6d,0x61,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x74,0x6f,0x6e,0x65,0x6d,0x61,0x70,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x69,0x67,0x6e,0x65,0x74,
|
|
0x74,0x65,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x69,0x67,0x6e,0x65,0x74,0x74,0x65,
|
|
0x5f,0x72,0x61,0x64,0x69,0x75,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x73,0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,0x73,0x5f,0x69,0x6e,0x74,
|
|
0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x73,0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,0x73,0x5f,0x64,0x65,0x6e,0x73,
|
|
0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x63,
|
|
0x68,0x72,0x6f,0x6d,0x61,0x74,0x69,0x63,0x5f,0x61,0x62,0x65,0x72,0x72,0x61,0x74,
|
|
0x69,0x6f,0x6e,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x66,0x69,0x6c,0x6d,0x5f,0x67,0x72,
|
|
0x61,0x69,0x6e,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x62,0x61,0x72,0x72,0x65,0x6c,0x5f,
|
|
0x64,0x69,0x73,0x74,0x6f,0x72,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x6e,0x74,0x65,0x6e,
|
|
0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x6c,0x75,
|
|
0x74,0x5f,0x6d,0x6f,0x64,0x65,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,
|
|
0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
|
|
0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,
|
|
0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,
|
|
0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x20,0x5b,0x5b,0x75,
|
|
0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,
|
|
0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,
|
|
0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,
|
|
0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x20,0x61,0x63,0x65,0x73,0x28,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,
|
|
0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x66,0x61,0x73,0x74,0x3a,0x3a,0x63,0x6c,0x61,0x6d,0x70,0x28,0x28,0x78,0x20,0x2a,
|
|
0x20,0x28,0x28,0x78,0x20,0x2a,0x20,0x32,0x2e,0x35,0x30,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x30,0x34,0x36,0x33,0x32,0x35,0x36,0x38,0x33,0x35,0x39,0x33,0x37,0x35,0x29,
|
|
0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x32,0x39,0x39,
|
|
0x39,0x39,0x39,0x39,0x39,0x33,0x32,0x39,0x34,0x34,0x37,0x37,0x34,0x36,0x32,0x37,
|
|
0x36,0x38,0x35,0x35,0x34,0x36,0x38,0x37,0x35,0x29,0x29,0x29,0x20,0x2f,0x20,0x28,
|
|
0x28,0x78,0x20,0x2a,0x20,0x28,0x28,0x78,0x20,0x2a,0x20,0x32,0x2e,0x34,0x33,0x30,
|
|
0x30,0x30,0x30,0x30,0x36,0x36,0x37,0x35,0x37,0x32,0x30,0x32,0x31,0x34,0x38,0x34,
|
|
0x33,0x37,0x35,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,
|
|
0x35,0x38,0x39,0x39,0x39,0x39,0x39,0x37,0x33,0x37,0x37,0x33,0x39,0x35,0x36,0x32,
|
|
0x39,0x38,0x38,0x32,0x38,0x31,0x32,0x35,0x29,0x29,0x29,0x20,0x2b,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x31,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
|
|
0x35,0x39,0x36,0x30,0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,
|
|
0x35,0x29,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x29,
|
|
0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,
|
|
0x7d,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,
|
|
0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,
|
|
0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x72,0x61,0x6e,0x64,0x28,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x26,0x20,
|
|
0x63,0x6f,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x66,0x72,0x61,0x63,0x74,0x28,0x73,0x69,0x6e,0x28,0x64,0x6f,0x74,0x28,0x63,
|
|
0x6f,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,0x32,0x2e,0x39,0x38,0x39,
|
|
0x38,0x30,0x30,0x34,0x35,0x33,0x31,0x38,0x36,0x30,0x33,0x35,0x31,0x35,0x36,0x32,
|
|
0x35,0x2c,0x20,0x37,0x38,0x2e,0x32,0x33,0x33,0x30,0x30,0x31,0x37,0x30,0x38,0x39,
|
|
0x38,0x34,0x33,0x37,0x35,0x29,0x29,0x29,0x20,0x2a,0x20,0x34,0x33,0x37,0x35,0x38,
|
|
0x2e,0x35,0x34,0x36,0x38,0x37,0x35,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x72,0x61,
|
|
0x67,0x6d,0x65,0x6e,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,
|
|
0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,
|
|
0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,
|
|
0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x70,0x6f,0x73,0x74,0x5f,0x70,0x72,
|
|
0x6f,0x63,0x65,0x73,0x73,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x26,0x20,0x5f,0x37,
|
|
0x35,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c,
|
|
0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x3e,0x20,0x70,0x70,0x74,0x65,0x78,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,
|
|
0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,
|
|
0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x6c,0x75,0x74,0x20,0x5b,0x5b,0x74,
|
|
0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x20,0x70,0x70,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x72,0x20,0x6c,0x75,0x74,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x20,0x5b,0x5b,
|
|
0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,
|
|
0x64,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,0x5d,0x29,0x0a,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,
|
|
0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x20,0x5f,0x36,0x36,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x65,
|
|
0x78,0x63,0x6f,0x6f,0x72,0x64,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,
|
|
0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x5f,0x36,0x37,0x20,0x3d,0x20,0x6c,0x65,0x6e,0x67,0x74,0x68,0x28,0x5f,0x36,0x36,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x38,
|
|
0x36,0x20,0x3d,0x20,0x28,0x5f,0x36,0x36,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,
|
|
0x2b,0x20,0x28,0x5f,0x36,0x37,0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,0x62,0x61,0x72,
|
|
0x72,0x65,0x6c,0x5f,0x64,0x69,0x73,0x74,0x6f,0x72,0x74,0x69,0x6f,0x6e,0x5f,0x69,
|
|
0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x29,0x29,0x20,0x2b,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x28,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
|
0x66,0x20,0x28,0x5f,0x37,0x35,0x2e,0x62,0x61,0x72,0x72,0x65,0x6c,0x5f,0x64,0x69,
|
|
0x73,0x74,0x6f,0x72,0x74,0x69,0x6f,0x6e,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,
|
|
0x74,0x79,0x20,0x3e,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x39,
|
|
0x36,0x20,0x3d,0x20,0x5f,0x38,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x39,0x37,0x20,0x3d,0x20,0x5f,0x39,
|
|
0x36,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x30,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x39,0x37,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x5f,0x31,0x30,0x34,0x20,0x3d,0x20,0x5f,0x39,0x36,0x20,0x3e,
|
|
0x20,0x31,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x5f,0x31,0x30,0x34,0x20,0x3d,0x20,0x5f,0x39,0x37,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,0x30,0x34,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x32,0x20,0x3d,0x20,0x5f,0x38,0x36,0x2e,
|
|
0x79,0x20,0x3c,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x32,0x20,0x3d,0x20,0x5f,0x31,0x30,
|
|
0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x62,0x6f,0x6f,0x6c,0x20,0x5f,0x31,0x31,0x39,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x21,0x5f,0x31,0x31,
|
|
0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x39,0x20,0x3d,0x20,
|
|
0x5f,0x38,0x36,0x2e,0x79,0x20,0x3e,0x20,0x31,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,
|
|
0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x39,0x20,0x3d,
|
|
0x20,0x5f,0x31,0x31,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x31,
|
|
0x39,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,
|
|
0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x28,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,
|
|
0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x31,0x34,0x32,0x20,0x3d,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x5f,0x37,0x35,0x2e,0x63,0x68,0x72,0x6f,0x6d,
|
|
0x61,0x74,0x69,0x63,0x5f,0x61,0x62,0x65,0x72,0x72,0x61,0x74,0x69,0x6f,0x6e,0x5f,
|
|
0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x34,0x34,
|
|
0x20,0x3d,0x20,0x70,0x70,0x74,0x65,0x78,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,
|
|
0x70,0x70,0x73,0x6d,0x70,0x2c,0x20,0x28,0x5f,0x38,0x36,0x20,0x2b,0x20,0x5f,0x31,
|
|
0x34,0x32,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x20,0x5f,0x31,0x35,0x31,0x20,0x3d,0x20,0x70,0x70,0x74,0x65,0x78,0x2e,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x28,0x70,0x70,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x38,0x36,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x36,
|
|
0x32,0x20,0x3d,0x20,0x70,0x70,0x74,0x65,0x78,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x28,0x70,0x70,0x73,0x6d,0x70,0x2c,0x20,0x28,0x5f,0x38,0x36,0x20,0x2d,0x20,0x5f,
|
|
0x31,0x34,0x32,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x20,0x5f,0x31,0x37,0x36,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,
|
|
0x5f,0x31,0x34,0x34,0x2e,0x78,0x2c,0x20,0x5f,0x31,0x35,0x31,0x2e,0x79,0x2c,0x20,
|
|
0x5f,0x31,0x36,0x32,0x2e,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x2e,0x78,0x79,0x7a,
|
|
0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,0x65,0x78,0x70,0x6f,0x73,0x75,0x72,0x65,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x35,0x2e,0x74,0x6f,0x6e,0x65,0x6d,0x61,
|
|
0x70,0x20,0x3e,0x20,0x30,0x2e,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x31,0x37,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,
|
|
0x6e,0x65,0x61,0x72,0x20,0x3d,0x20,0x61,0x63,0x65,0x73,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,
|
|
0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,
|
|
0x72,0x20,0x3d,0x20,0x5f,0x31,0x37,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x31,0x39,0x38,0x20,
|
|
0x3d,0x20,0x28,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,
|
|
0x6e,0x65,0x61,0x72,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,
|
|
0x35,0x29,0x29,0x20,0x2a,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,
|
|
0x5f,0x37,0x35,0x2e,0x63,0x6f,0x6e,0x74,0x72,0x61,0x73,0x74,0x2c,0x20,0x30,0x2e,
|
|
0x30,0x29,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x35,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,
|
|
0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,
|
|
0x63,0x6c,0x61,0x6d,0x70,0x28,0x6d,0x69,0x78,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x39,0x38,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x28,0x30,0x2e,0x32,0x31,0x32,0x35,0x30,0x30,0x30,0x30,0x35,0x39,0x36,0x30,
|
|
0x34,0x36,0x34,0x34,0x37,0x37,0x35,0x33,0x39,0x30,0x36,0x32,0x35,0x2c,0x20,0x30,
|
|
0x2e,0x37,0x31,0x35,0x33,0x39,0x39,0x39,0x38,0x30,0x35,0x34,0x35,0x30,0x34,0x33,
|
|
0x39,0x34,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x30,0x37,0x32,0x30,0x39,
|
|
0x39,0x39,0x39,0x38,0x35,0x39,0x33,0x33,0x33,0x30,0x33,0x38,0x33,0x33,0x30,0x30,
|
|
0x37,0x38,0x31,0x32,0x35,0x29,0x29,0x29,0x2c,0x20,0x5f,0x31,0x39,0x38,0x2c,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x37,0x35,0x2e,0x73,0x61,0x74,0x75,0x72,
|
|
0x61,0x74,0x69,0x6f,0x6e,0x29,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,
|
|
0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,
|
|
0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x37,0x35,0x2e,
|
|
0x6c,0x75,0x74,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x21,0x3d,0x20,0x30,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,
|
|
0x28,0x5f,0x37,0x35,0x2e,0x6c,0x75,0x74,0x5f,0x6d,0x6f,0x64,0x65,0x20,0x3d,0x3d,
|
|
0x20,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,
|
|
0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x20,0x3d,0x20,0x6c,0x75,0x74,
|
|
0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x70,0x70,0x73,0x6d,0x70,0x2c,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x28,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2e,0x7a,0x20,
|
|
0x2a,0x20,0x31,0x35,0x2e,0x30,0x29,0x20,0x2a,0x20,0x30,0x2e,0x30,0x36,0x32,0x35,
|
|
0x29,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2e,0x78,0x20,0x2a,0x20,
|
|
0x31,0x35,0x2e,0x30,0x29,0x20,0x2a,0x20,0x30,0x2e,0x30,0x30,0x33,0x39,0x30,0x36,
|
|
0x32,0x35,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x63,0x6f,0x6c,0x6f,0x72,
|
|
0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2e,0x79,0x20,0x2a,0x20,
|
|
0x31,0x35,0x2e,0x30,0x29,0x20,0x2a,0x20,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x29,
|
|
0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x36,0x39,0x20,0x3d,0x20,
|
|
0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,
|
|
0x2e,0x7a,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x37,
|
|
0x32,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x5f,0x32,0x36,0x39,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x5f,0x32,0x38,0x33,0x20,0x3d,0x20,0x28,0x28,0x63,0x6f,0x6c,0x6f,
|
|
0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2e,0x79,0x20,0x2a,
|
|
0x20,0x31,0x35,0x2e,0x30,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,
|
|
0x30,0x2e,0x30,0x36,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x38,0x39,0x20,0x3d,
|
|
0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,
|
|
0x72,0x2e,0x78,0x20,0x2a,0x20,0x31,0x35,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,
|
|
0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x6c,
|
|
0x75,0x74,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x6c,0x75,0x74,0x5f,0x6c,0x69,
|
|
0x6e,0x65,0x61,0x72,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x28,0x28,0x28,
|
|
0x5f,0x32,0x37,0x32,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,0x5f,
|
|
0x32,0x38,0x39,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x30,0x2e,
|
|
0x30,0x30,0x33,0x39,0x30,0x36,0x32,0x35,0x2c,0x20,0x5f,0x32,0x38,0x33,0x29,0x29,
|
|
0x2e,0x78,0x79,0x7a,0x2c,0x20,0x6c,0x75,0x74,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x28,0x6c,0x75,0x74,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2c,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x32,0x28,0x28,0x28,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x69,0x6e,
|
|
0x28,0x5f,0x32,0x37,0x32,0x20,0x2b,0x20,0x31,0x2e,0x30,0x2c,0x20,0x31,0x35,0x2e,
|
|
0x30,0x29,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2b,0x20,0x5f,0x32,0x38,
|
|
0x39,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x30,0x2e,0x30,0x30,
|
|
0x33,0x39,0x30,0x36,0x32,0x35,0x2c,0x20,0x5f,0x32,0x38,0x33,0x29,0x29,0x2e,0x78,
|
|
0x79,0x7a,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x32,0x36,0x39,0x20,
|
|
0x2d,0x20,0x5f,0x32,0x37,0x32,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x73,0x72,0x67,0x62,0x20,
|
|
0x3d,0x20,0x28,0x70,0x6f,0x77,0x72,0x28,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6c,0x64,
|
|
0x72,0x5f,0x6c,0x69,0x6e,0x65,0x61,0x72,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x31,0x2e,0x30,0x20,0x2f,0x20,0x5f,0x37,0x35,0x2e,0x67,0x61,0x6d,0x6d,0x61,
|
|
0x29,0x29,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x28,0x73,0x6d,0x6f,
|
|
0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x37,0x35,
|
|
0x2e,0x76,0x69,0x67,0x6e,0x65,0x74,0x74,0x65,0x5f,0x72,0x61,0x64,0x69,0x75,0x73,
|
|
0x2c,0x20,0x5f,0x36,0x37,0x29,0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,0x76,0x69,0x67,
|
|
0x6e,0x65,0x74,0x74,0x65,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,
|
|
0x29,0x29,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x28,0x28,0x28,0x73,
|
|
0x69,0x6e,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,
|
|
0x79,0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,0x73,0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,
|
|
0x73,0x5f,0x64,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x20,0x2a,0x20,0x30,0x2e,0x35,
|
|
0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x5f,0x37,0x35,0x2e,0x73,
|
|
0x63,0x61,0x6e,0x6c,0x69,0x6e,0x65,0x73,0x5f,0x69,0x6e,0x74,0x65,0x6e,0x73,0x69,
|
|
0x74,0x79,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x65,
|
|
0x78,0x63,0x6f,0x6f,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x20,0x5f,0x33,0x38,0x37,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,
|
|
0x73,0x72,0x67,0x62,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x20,0x5f,0x33,0x38,0x39,0x20,0x3d,0x20,0x5f,0x33,0x38,0x37,0x20,0x2b,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x28,0x28,0x72,0x61,0x6e,0x64,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x29,0x20,0x2d,0x20,0x30,0x2e,0x35,0x29,0x20,0x2a,0x20,0x5f,0x37,
|
|
0x35,0x2e,0x66,0x69,0x6c,0x6d,0x5f,0x67,0x72,0x61,0x69,0x6e,0x5f,0x69,0x6e,0x74,
|
|
0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x5f,0x73,0x72,0x67,0x62,0x20,0x3d,0x20,0x5f,0x33,0x38,0x39,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
|
|
0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x66,0x61,0x73,0x74,
|
|
0x3a,0x3a,0x63,0x6c,0x61,0x6d,0x70,0x28,0x5f,0x33,0x38,0x39,0x2c,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,
|
|
0x0a,0x0a,0x00,
|
|
];
|
|
postprocess_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "postprocess_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_pp_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_pp_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "uv";
|
|
desc.uniform_blocks[0].stage = .FRAGMENT;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 64;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "_75.exposure";
|
|
desc.uniform_blocks[0].glsl_uniforms[1].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[1].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[1].glsl_name = "_75.contrast";
|
|
desc.uniform_blocks[0].glsl_uniforms[2].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[2].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[2].glsl_name = "_75.saturation";
|
|
desc.uniform_blocks[0].glsl_uniforms[3].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[3].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[3].glsl_name = "_75.gamma";
|
|
desc.uniform_blocks[0].glsl_uniforms[4].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[4].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[4].glsl_name = "_75.tonemap";
|
|
desc.uniform_blocks[0].glsl_uniforms[5].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[5].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[5].glsl_name = "_75.vignette_intensity";
|
|
desc.uniform_blocks[0].glsl_uniforms[6].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[6].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[6].glsl_name = "_75.vignette_radius";
|
|
desc.uniform_blocks[0].glsl_uniforms[7].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[7].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[7].glsl_name = "_75.scanlines_intensity";
|
|
desc.uniform_blocks[0].glsl_uniforms[8].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[8].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[8].glsl_name = "_75.scanlines_density";
|
|
desc.uniform_blocks[0].glsl_uniforms[9].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[9].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[9].glsl_name = "_75.chromatic_aberration_intensity";
|
|
desc.uniform_blocks[0].glsl_uniforms[10].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[10].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[10].glsl_name = "_75.film_grain_intensity";
|
|
desc.uniform_blocks[0].glsl_uniforms[11].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[11].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[11].glsl_name = "_75.barrel_distortion_intensity";
|
|
desc.uniform_blocks[0].glsl_uniforms[12].type = .INT;
|
|
desc.uniform_blocks[0].glsl_uniforms[12].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[12].glsl_name = "_75.lut_mode";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "pptex_ppsmp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].glsl_name = "lut_ppsmp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 1;
|
|
desc.image_sampler_pairs[2].sampler_slot = 1;
|
|
desc.image_sampler_pairs[2].glsl_name = "lut_lut_linear";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_pp_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_pp_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.attrs[1].glsl_name = "uv";
|
|
desc.uniform_blocks[0].stage = .FRAGMENT;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 64;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "_75.exposure";
|
|
desc.uniform_blocks[0].glsl_uniforms[1].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[1].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[1].glsl_name = "_75.contrast";
|
|
desc.uniform_blocks[0].glsl_uniforms[2].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[2].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[2].glsl_name = "_75.saturation";
|
|
desc.uniform_blocks[0].glsl_uniforms[3].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[3].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[3].glsl_name = "_75.gamma";
|
|
desc.uniform_blocks[0].glsl_uniforms[4].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[4].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[4].glsl_name = "_75.tonemap";
|
|
desc.uniform_blocks[0].glsl_uniforms[5].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[5].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[5].glsl_name = "_75.vignette_intensity";
|
|
desc.uniform_blocks[0].glsl_uniforms[6].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[6].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[6].glsl_name = "_75.vignette_radius";
|
|
desc.uniform_blocks[0].glsl_uniforms[7].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[7].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[7].glsl_name = "_75.scanlines_intensity";
|
|
desc.uniform_blocks[0].glsl_uniforms[8].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[8].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[8].glsl_name = "_75.scanlines_density";
|
|
desc.uniform_blocks[0].glsl_uniforms[9].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[9].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[9].glsl_name = "_75.chromatic_aberration_intensity";
|
|
desc.uniform_blocks[0].glsl_uniforms[10].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[10].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[10].glsl_name = "_75.film_grain_intensity";
|
|
desc.uniform_blocks[0].glsl_uniforms[11].type = .FLOAT;
|
|
desc.uniform_blocks[0].glsl_uniforms[11].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[11].glsl_name = "_75.barrel_distortion_intensity";
|
|
desc.uniform_blocks[0].glsl_uniforms[12].type = .INT;
|
|
desc.uniform_blocks[0].glsl_uniforms[12].array_count = 0;
|
|
desc.uniform_blocks[0].glsl_uniforms[12].glsl_name = "_75.lut_mode";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "pptex_ppsmp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].glsl_name = "lut_ppsmp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 1;
|
|
desc.image_sampler_pairs[2].sampler_slot = 1;
|
|
desc.image_sampler_pairs[2].glsl_name = "lut_lut_linear";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_pp_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_pp_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[1].base_type = .FLOAT;
|
|
desc.uniform_blocks[0].stage = .FRAGMENT;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 64;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[1].msl_texture_n = 1;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.samplers[1].msl_sampler_n = 1;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 1;
|
|
desc.image_sampler_pairs[2].sampler_slot = 1;
|
|
}
|
|
return desc;
|
|
}
|