1639 lines
102 KiB
Plaintext
1639 lines
102 KiB
Plaintext
/*
|
|
#version:1# (machine generated, don't edit!)
|
|
|
|
Generated by sokol-shdc (https://github.com/floooh/sokol-tools)
|
|
|
|
Cmdline:
|
|
sokol-shdc -i shader_plane.glsl -o ./jai/shader_plane.jai -l glsl430:glsl300es:metal_macos -f sokol_jai
|
|
|
|
Overview:
|
|
=========
|
|
Shader program: 'plane':
|
|
Get shader desc: plane_shader_desc(sg_query_backend())
|
|
Vertex Shader: vs_plane
|
|
Fragment Shader: fs_plane
|
|
Attributes:
|
|
ATTR_plane_position => 0
|
|
Bindings:
|
|
Uniform block 'plane_vs_params':
|
|
Jai struct: Plane_Vs_Params
|
|
Bind slot: UB_plane_vs_params => 0
|
|
Uniform block 'plane_world_config':
|
|
Jai struct: Plane_World_Config
|
|
Bind slot: UB_plane_world_config => 1
|
|
Uniform block 'plane_data':
|
|
Jai struct: Plane_Data
|
|
Bind slot: UB_plane_data => 2
|
|
Uniform block 'plane_fs_params':
|
|
Jai struct: Plane_Fs_Params
|
|
Bind slot: UB_plane_fs_params => 3
|
|
Image 'normal_map':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_normal_map => 3
|
|
Image 'reftex':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_reftex => 0
|
|
Sampler 'normalsmp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_normalsmp => 3
|
|
Sampler 'refsmp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_refsmp => 0
|
|
*/
|
|
ATTR_plane_position :: 0;
|
|
UB_plane_vs_params :: 0;
|
|
UB_plane_world_config :: 1;
|
|
UB_plane_data :: 2;
|
|
UB_plane_fs_params :: 3;
|
|
IMG_normal_map :: 3;
|
|
IMG_reftex :: 0;
|
|
SMP_normalsmp :: 3;
|
|
SMP_refsmp :: 0;
|
|
Plane_Vs_Params :: struct {
|
|
mvp: [16]float;
|
|
planeHeight: float;
|
|
_: [12]u8;
|
|
};
|
|
Plane_World_Config :: struct {
|
|
skyBase: [3]float;
|
|
_: [4]u8;
|
|
skyTop: [3]float;
|
|
_: [4]u8;
|
|
sunDisk: [3]float;
|
|
_: [4]u8;
|
|
horizonHalo: [3]float;
|
|
_: [4]u8;
|
|
sunHalo: [3]float;
|
|
_: [4]u8;
|
|
sunLightColor: [3]float;
|
|
_: [4]u8;
|
|
sunPosition: [3]float;
|
|
sunIntensity: float;
|
|
skyIntensity: float;
|
|
hasClouds: s32;
|
|
planeHeight: float;
|
|
planeType: s32;
|
|
waterColor: [3]float;
|
|
_: [4]u8;
|
|
deepColor: [3]float;
|
|
time: float;
|
|
};
|
|
Plane_Data :: struct {
|
|
screen_w: s32;
|
|
screen_h: s32;
|
|
is_reflection_pass: s32;
|
|
_: [4]u8;
|
|
cameraPosition: [3]float;
|
|
shininess: float;
|
|
reflectionDistortion: float;
|
|
_: [12]u8;
|
|
};
|
|
Plane_Fs_Params :: struct {
|
|
mvp_shadow: [16]float;
|
|
is_reflection: s32;
|
|
_: [12]u8;
|
|
};
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 plane_vs_params[5];
|
|
layout(location = 0) in vec4 position;
|
|
layout(location = 0) out vec4 pos;
|
|
layout(location = 1) flat out int idx;
|
|
|
|
void main()
|
|
{
|
|
vec3 _16 = position.xyz * 1000.0;
|
|
vec4 _51 = vec4(_16.x, _16.y + (float(gl_InstanceID) * plane_vs_params[4].x), _16.z, 1.0);
|
|
gl_Position = mat4(plane_vs_params[0], plane_vs_params[1], plane_vs_params[2], plane_vs_params[3]) * _51;
|
|
pos = _51;
|
|
idx = gl_InstanceID;
|
|
}
|
|
|
|
*/
|
|
vs_plane_source_glsl430 := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6c,0x61,0x6e,0x65,
|
|
0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x3b,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,0x34,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,0x34,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
|
|
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x66,0x6c,
|
|
0x61,0x74,0x20,0x6f,0x75,0x74,0x20,0x69,0x6e,0x74,0x20,0x69,0x64,0x78,0x3b,0x0a,
|
|
0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x36,0x20,0x3d,0x20,0x70,0x6f,
|
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x31,0x30,0x30,
|
|
0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x35,
|
|
0x31,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x31,0x36,0x2e,0x78,0x2c,0x20,
|
|
0x5f,0x31,0x36,0x2e,0x79,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x67,
|
|
0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x44,0x29,0x20,0x2a,0x20,
|
|
0x70,0x6c,0x61,0x6e,0x65,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x34,0x5d,0x2e,0x78,0x29,0x2c,0x20,0x5f,0x31,0x36,0x2e,0x7a,0x2c,0x20,0x31,0x2e,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
|
|
0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x70,0x6c,0x61,0x6e,0x65,
|
|
0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x70,
|
|
0x6c,0x61,0x6e,0x65,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,
|
|
0x5d,0x2c,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,
|
|
0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x76,0x73,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x5f,0x35,0x31,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,0x5f,0x35,0x31,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x64,0x78,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x49,0x6e,
|
|
0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x44,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 430
|
|
|
|
struct plane_world_config
|
|
{
|
|
vec3 skyBase;
|
|
vec3 skyTop;
|
|
vec3 sunDisk;
|
|
vec3 horizonHalo;
|
|
vec3 sunHalo;
|
|
vec3 sunLightColor;
|
|
vec3 sunPosition;
|
|
float sunIntensity;
|
|
float skyIntensity;
|
|
int hasClouds;
|
|
float planeHeight;
|
|
int planeType;
|
|
vec3 waterColor;
|
|
vec3 deepColor;
|
|
float time;
|
|
};
|
|
|
|
uniform plane_world_config _154;
|
|
|
|
struct plane_data
|
|
{
|
|
int screen_w;
|
|
int screen_h;
|
|
int is_reflection_pass;
|
|
vec3 cameraPosition;
|
|
float shininess;
|
|
float reflectionDistortion;
|
|
};
|
|
|
|
uniform plane_data _255;
|
|
|
|
struct plane_fs_params
|
|
{
|
|
mat4 mvp_shadow;
|
|
int is_reflection;
|
|
};
|
|
|
|
uniform plane_fs_params _287;
|
|
|
|
layout(binding = 16) uniform sampler2D normal_map_normalsmp;
|
|
layout(binding = 17) uniform sampler2D reftex_refsmp;
|
|
|
|
layout(location = 1) flat in int idx;
|
|
layout(location = 0) in vec4 pos;
|
|
layout(location = 0) out vec4 frag_color;
|
|
|
|
vec3 fresnelSchlick(float cosTheta)
|
|
{
|
|
return vec3(0.0199999995529651641845703125) + (vec3(0.980000019073486328125) * pow(1.0 - cosTheta, 5.0));
|
|
}
|
|
|
|
float hash(vec2 p)
|
|
{
|
|
return fract(sin(dot(p, vec2(127.09999847412109375, 311.70001220703125))) * 43758.546875);
|
|
}
|
|
|
|
float _noise(vec2 p)
|
|
{
|
|
vec2 _55 = floor(p);
|
|
vec2 _58 = fract(p);
|
|
vec2 _69 = (_58 * _58) * (vec2(3.0) - (_58 * 2.0));
|
|
vec2 param = _55;
|
|
vec2 param_1 = _55 + vec2(1.0, 0.0);
|
|
float _84 = _69.x;
|
|
vec2 param_2 = _55 + vec2(0.0, 1.0);
|
|
vec2 param_3 = _55 + vec2(1.0);
|
|
return mix(mix(hash(param), hash(param_1), _84), mix(hash(param_2), hash(param_3), _84), _69.y);
|
|
}
|
|
|
|
float fbm(inout vec2 p)
|
|
{
|
|
float value = 0.0;
|
|
float amplitude = 0.5;
|
|
for (int i = 0; i < 4; i++)
|
|
{
|
|
vec2 param = p;
|
|
value += (amplitude * _noise(param));
|
|
p *= 2.0;
|
|
amplitude *= 0.5;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
if (idx == 1)
|
|
{
|
|
vec2 _162 = vec2(-0.004999999888241291046142578125, -0.01200000010430812835693359375) * _154.time;
|
|
vec3 _251 = normalize(((((texture(normal_map_normalsmp, (pos.xz * 0.4000000059604644775390625) + (_162 * 1.5)).xzy * 2.0) - vec3(1.0)) + ((texture(normal_map_normalsmp, (pos.xz * 0.100000001490116119384765625) + (_162 * 1.7000000476837158203125)).xzy * 2.0) - vec3(1.0))) + ((texture(normal_map_normalsmp, (pos.xz * 1.0) + (_162 * 2.7000000476837158203125)).xzy * 2.0) - vec3(1.0))) + ((texture(normal_map_normalsmp, (pos.xz * 0.0199999995529651641845703125) + (_162 * 0.100000001490116119384765625)).xzy * 2.0) - vec3(1.0)));
|
|
vec3 _263 = normalize(_255.cameraPosition - pos.xyz);
|
|
vec3 _268 = normalize(_154.sunPosition);
|
|
float param = _263.y;
|
|
float _313 = min(1.0, fresnelSchlick(param).x + 0.300000011920928955078125);
|
|
vec2 _345 = gl_FragCoord.xy / vec2(float(_255.screen_w), float(_255.screen_h));
|
|
_345.y = 1.0 - _345.y;
|
|
frag_color = vec4((mix(((_154.waterColor * (dot(_251, _268) + ((9.9999999747524270787835121154785e-07 * float(_287.is_reflection)) * _255.shininess))) * _154.sunLightColor) * _154.sunIntensity, texture(reftex_refsmp, _345).xyz, vec3(_313)) + ((_154.sunLightColor * _154.sunIntensity) * pow(max(0.0, dot(normalize(_268 + _263), _251)), 32.0))) * 1.0, mix(0.300000011920928955078125, 0.5, _313));
|
|
}
|
|
else
|
|
{
|
|
vec2 param_1 = (pos.xz * 0.0500000007450580596923828125) + vec2(_154.time * 0.00999999977648258209228515625);
|
|
float _401 = fbm(param_1);
|
|
frag_color = vec4(_154.deepColor * mix(0.800000011920928955078125, 1.2000000476837158203125, _401), 1.0);
|
|
}
|
|
}
|
|
|
|
*/
|
|
fs_plane_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,0x6c,0x61,0x6e,0x65,0x5f,0x77,0x6f,0x72,0x6c,0x64,
|
|
0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x73,0x6b,0x79,0x42,0x61,0x73,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x73,0x6b,0x79,0x54,0x6f,0x70,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x6e,0x44,0x69,0x73,0x6b,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x68,0x6f,0x72,0x69,0x7a,0x6f,0x6e,0x48,
|
|
0x61,0x6c,0x6f,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,
|
|
0x6e,0x48,0x61,0x6c,0x6f,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,
|
|
0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,
|
|
0x75,0x6e,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,0x6b,0x79,0x49,0x6e,0x74,0x65,0x6e,0x73,
|
|
0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x68,0x61,0x73,
|
|
0x43,0x6c,0x6f,0x75,0x64,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x48,0x65,0x69,0x67,0x68,0x74,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x54,0x79,0x70,0x65,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x77,0x61,0x74,0x65,0x72,
|
|
0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x64,0x65,0x65,0x70,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x77,0x6f,0x72,
|
|
0x6c,0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x20,0x5f,0x31,0x35,0x34,0x3b,0x0a,
|
|
0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x64,0x61,
|
|
0x74,0x61,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x73,0x63,0x72,
|
|
0x65,0x65,0x6e,0x5f,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x73,
|
|
0x63,0x72,0x65,0x65,0x6e,0x5f,0x68,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,
|
|
0x20,0x69,0x73,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x70,
|
|
0x61,0x73,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x61,
|
|
0x6d,0x65,0x72,0x61,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,0x68,0x69,0x6e,0x69,0x6e,0x65,0x73,
|
|
0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x72,0x65,0x66,
|
|
0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x44,0x69,0x73,0x74,0x6f,0x72,0x74,0x69,0x6f,
|
|
0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x70,
|
|
0x6c,0x61,0x6e,0x65,0x5f,0x64,0x61,0x74,0x61,0x20,0x5f,0x32,0x35,0x35,0x3b,0x0a,
|
|
0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x66,0x73,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,
|
|
0x74,0x34,0x20,0x6d,0x76,0x70,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x69,0x73,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,
|
|
0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,
|
|
0x6d,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
|
|
0x73,0x20,0x5f,0x32,0x38,0x37,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,
|
|
0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x6d,0x61,0x70,0x5f,0x6e,0x6f,0x72,0x6d,0x61,
|
|
0x6c,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,0x72,0x65,0x66,
|
|
0x74,0x65,0x78,0x5f,0x72,0x65,0x66,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,0x79,
|
|
0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,
|
|
0x29,0x20,0x66,0x6c,0x61,0x74,0x20,0x69,0x6e,0x20,0x69,0x6e,0x74,0x20,0x69,0x64,
|
|
0x78,0x3b,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,0x34,0x20,
|
|
0x70,0x6f,0x73,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,0x66,0x72,0x65,0x73,0x6e,0x65,0x6c,0x53,0x63,0x68,0x6c,
|
|
0x69,0x63,0x6b,0x28,0x66,0x6c,0x6f,0x61,0x74,0x20,0x63,0x6f,0x73,0x54,0x68,0x65,
|
|
0x74,0x61,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,0x37,0x30,
|
|
0x33,0x31,0x32,0x35,0x29,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,
|
|
0x39,0x38,0x30,0x30,0x30,0x30,0x30,0x31,0x39,0x30,0x37,0x33,0x34,0x38,0x36,0x33,
|
|
0x32,0x38,0x31,0x32,0x35,0x29,0x20,0x2a,0x20,0x70,0x6f,0x77,0x28,0x31,0x2e,0x30,
|
|
0x20,0x2d,0x20,0x63,0x6f,0x73,0x54,0x68,0x65,0x74,0x61,0x2c,0x20,0x35,0x2e,0x30,
|
|
0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x20,0x68,0x61,0x73,
|
|
0x68,0x28,0x76,0x65,0x63,0x32,0x20,0x70,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,0x70,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x32,0x37,
|
|
0x2e,0x30,0x39,0x39,0x39,0x39,0x38,0x34,0x37,0x34,0x31,0x32,0x31,0x30,0x39,0x33,
|
|
0x37,0x35,0x2c,0x20,0x33,0x31,0x31,0x2e,0x37,0x30,0x30,0x30,0x31,0x32,0x32,0x30,
|
|
0x37,0x30,0x33,0x31,0x32,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,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x5f,0x6e,0x6f,0x69,0x73,0x65,0x28,0x76,0x65,0x63,0x32,0x20,
|
|
0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x35,
|
|
0x35,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x70,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x35,0x38,0x20,0x3d,0x20,0x66,0x72,0x61,
|
|
0x63,0x74,0x28,0x70,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,
|
|
0x5f,0x36,0x39,0x20,0x3d,0x20,0x28,0x5f,0x35,0x38,0x20,0x2a,0x20,0x5f,0x35,0x38,
|
|
0x29,0x20,0x2a,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x33,0x2e,0x30,0x29,0x20,0x2d,
|
|
0x20,0x28,0x5f,0x35,0x38,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,
|
|
0x5f,0x35,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x35,0x35,0x20,0x2b,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x38,0x34,0x20,0x3d,0x20,0x5f,0x36,
|
|
0x39,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,0x35,0x35,0x20,0x2b,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,
|
|
0x20,0x5f,0x35,0x35,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x69,0x78,
|
|
0x28,0x6d,0x69,0x78,0x28,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,
|
|
0x2c,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x2c,
|
|
0x20,0x5f,0x38,0x34,0x29,0x2c,0x20,0x6d,0x69,0x78,0x28,0x68,0x61,0x73,0x68,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x2c,0x20,0x68,0x61,0x73,0x68,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,0x2c,0x20,0x5f,0x38,0x34,0x29,0x2c,0x20,0x5f,
|
|
0x36,0x39,0x2e,0x79,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x66,0x62,0x6d,0x28,0x69,0x6e,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x70,
|
|
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,0x61,
|
|
0x6c,0x75,0x65,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x61,0x6d,0x70,0x6c,0x69,0x74,0x75,0x64,0x65,0x20,0x3d,
|
|
0x20,0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6f,0x72,0x20,0x28,0x69,
|
|
0x6e,0x74,0x20,0x69,0x20,0x3d,0x20,0x30,0x3b,0x20,0x69,0x20,0x3c,0x20,0x34,0x3b,
|
|
0x20,0x69,0x2b,0x2b,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,
|
|
0x20,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x61,0x6c,0x75,
|
|
0x65,0x20,0x2b,0x3d,0x20,0x28,0x61,0x6d,0x70,0x6c,0x69,0x74,0x75,0x64,0x65,0x20,
|
|
0x2a,0x20,0x5f,0x6e,0x6f,0x69,0x73,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x20,0x2a,0x3d,0x20,0x32,
|
|
0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6d,0x70,0x6c,
|
|
0x69,0x74,0x75,0x64,0x65,0x20,0x2a,0x3d,0x20,0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,
|
|
0x61,0x6c,0x75,0x65,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,
|
|
0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x69,
|
|
0x64,0x78,0x20,0x3d,0x3d,0x20,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x31,0x36,0x32,
|
|
0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x2d,0x30,0x2e,0x30,0x30,0x34,0x39,0x39,
|
|
0x39,0x39,0x39,0x39,0x38,0x38,0x38,0x32,0x34,0x31,0x32,0x39,0x31,0x30,0x34,0x36,
|
|
0x31,0x34,0x32,0x35,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x2d,0x30,0x2e,0x30,0x31,
|
|
0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x30,0x34,0x33,0x30,0x38,0x31,0x32,0x38,
|
|
0x33,0x35,0x36,0x39,0x33,0x33,0x35,0x39,0x33,0x37,0x35,0x29,0x20,0x2a,0x20,0x5f,
|
|
0x31,0x35,0x34,0x2e,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x35,0x31,0x20,0x3d,0x20,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x28,0x28,0x28,0x28,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x6d,0x61,0x70,0x5f,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x73,0x6d,0x70,0x2c,0x20,0x28,0x70,0x6f,0x73,0x2e,0x78,
|
|
0x7a,0x20,0x2a,0x20,0x30,0x2e,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,
|
|
0x20,0x2b,0x20,0x28,0x5f,0x31,0x36,0x32,0x20,0x2a,0x20,0x31,0x2e,0x35,0x29,0x29,
|
|
0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x74,0x65,0x78,
|
|
0x74,0x75,0x72,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x6d,0x61,0x70,0x5f,
|
|
0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x6d,0x70,0x2c,0x20,0x28,0x70,0x6f,0x73,0x2e,
|
|
0x78,0x7a,0x20,0x2a,0x20,0x30,0x2e,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31,
|
|
0x34,0x39,0x30,0x31,0x31,0x36,0x31,0x31,0x39,0x33,0x38,0x34,0x37,0x36,0x35,0x36,
|
|
0x32,0x35,0x29,0x20,0x2b,0x20,0x28,0x5f,0x31,0x36,0x32,0x20,0x2a,0x20,0x31,0x2e,
|
|
0x37,0x30,0x30,0x30,0x30,0x30,0x30,0x34,0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,
|
|
0x32,0x30,0x33,0x31,0x32,0x35,0x29,0x29,0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,
|
|
0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,
|
|
0x29,0x20,0x2b,0x20,0x28,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x5f,0x6d,0x61,0x70,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x28,0x70,0x6f,0x73,0x2e,0x78,0x7a,0x20,0x2a,0x20,0x31,0x2e,
|
|
0x30,0x29,0x20,0x2b,0x20,0x28,0x5f,0x31,0x36,0x32,0x20,0x2a,0x20,0x32,0x2e,0x37,
|
|
0x30,0x30,0x30,0x30,0x30,0x30,0x34,0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,0x32,
|
|
0x30,0x33,0x31,0x32,0x35,0x29,0x29,0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,
|
|
0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x29,
|
|
0x20,0x2b,0x20,0x28,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,0x5f,0x6d,0x61,0x70,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x6d,
|
|
0x70,0x2c,0x20,0x28,0x70,0x6f,0x73,0x2e,0x78,0x7a,0x20,0x2a,0x20,0x30,0x2e,0x30,
|
|
0x31,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,
|
|
0x34,0x31,0x38,0x34,0x35,0x37,0x30,0x33,0x31,0x32,0x35,0x29,0x20,0x2b,0x20,0x28,
|
|
0x5f,0x31,0x36,0x32,0x20,0x2a,0x20,0x30,0x2e,0x31,0x30,0x30,0x30,0x30,0x30,0x30,
|
|
0x30,0x31,0x34,0x39,0x30,0x31,0x31,0x36,0x31,0x31,0x39,0x33,0x38,0x34,0x37,0x36,
|
|
0x35,0x36,0x32,0x35,0x29,0x29,0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,
|
|
0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,
|
|
0x36,0x33,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,
|
|
0x32,0x35,0x35,0x2e,0x63,0x61,0x6d,0x65,0x72,0x61,0x50,0x6f,0x73,0x69,0x74,0x69,
|
|
0x6f,0x6e,0x20,0x2d,0x20,0x70,0x6f,0x73,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x36,0x38,
|
|
0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,0x31,0x35,
|
|
0x34,0x2e,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x32,0x36,0x33,0x2e,0x79,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x31,0x33,
|
|
0x20,0x3d,0x20,0x6d,0x69,0x6e,0x28,0x31,0x2e,0x30,0x2c,0x20,0x66,0x72,0x65,0x73,
|
|
0x6e,0x65,0x6c,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,0x28,0x70,0x61,0x72,0x61,0x6d,
|
|
0x29,0x2e,0x78,0x20,0x2b,0x20,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,
|
|
0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,
|
|
0x5f,0x33,0x34,0x35,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,
|
|
0x6f,0x72,0x64,0x2e,0x78,0x79,0x20,0x2f,0x20,0x76,0x65,0x63,0x32,0x28,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x28,0x5f,0x32,0x35,0x35,0x2e,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,
|
|
0x77,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x5f,0x32,0x35,0x35,0x2e,0x73,
|
|
0x63,0x72,0x65,0x65,0x6e,0x5f,0x68,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x5f,0x33,0x34,0x35,0x2e,0x79,0x20,0x3d,0x20,0x31,0x2e,0x30,0x20,
|
|
0x2d,0x20,0x5f,0x33,0x34,0x35,0x2e,0x79,0x3b,0x0a,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,0x28,0x6d,0x69,0x78,0x28,0x28,0x28,0x5f,0x31,0x35,0x34,0x2e,
|
|
0x77,0x61,0x74,0x65,0x72,0x43,0x6f,0x6c,0x6f,0x72,0x20,0x2a,0x20,0x28,0x64,0x6f,
|
|
0x74,0x28,0x5f,0x32,0x35,0x31,0x2c,0x20,0x5f,0x32,0x36,0x38,0x29,0x20,0x2b,0x20,
|
|
0x28,0x28,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x35,0x32,
|
|
0x34,0x32,0x37,0x30,0x37,0x38,0x37,0x38,0x33,0x35,0x31,0x32,0x31,0x31,0x35,0x34,
|
|
0x37,0x38,0x35,0x65,0x2d,0x30,0x37,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,
|
|
0x5f,0x32,0x38,0x37,0x2e,0x69,0x73,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,
|
|
0x6f,0x6e,0x29,0x29,0x20,0x2a,0x20,0x5f,0x32,0x35,0x35,0x2e,0x73,0x68,0x69,0x6e,
|
|
0x69,0x6e,0x65,0x73,0x73,0x29,0x29,0x29,0x20,0x2a,0x20,0x5f,0x31,0x35,0x34,0x2e,
|
|
0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x43,0x6f,0x6c,0x6f,0x72,0x29,0x20,0x2a,
|
|
0x20,0x5f,0x31,0x35,0x34,0x2e,0x73,0x75,0x6e,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,
|
|
0x74,0x79,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x72,0x65,0x66,0x74,
|
|
0x65,0x78,0x5f,0x72,0x65,0x66,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x34,0x35,0x29,
|
|
0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x33,0x31,0x33,0x29,
|
|
0x29,0x20,0x2b,0x20,0x28,0x28,0x5f,0x31,0x35,0x34,0x2e,0x73,0x75,0x6e,0x4c,0x69,
|
|
0x67,0x68,0x74,0x43,0x6f,0x6c,0x6f,0x72,0x20,0x2a,0x20,0x5f,0x31,0x35,0x34,0x2e,
|
|
0x73,0x75,0x6e,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x20,0x2a,0x20,
|
|
0x70,0x6f,0x77,0x28,0x6d,0x61,0x78,0x28,0x30,0x2e,0x30,0x2c,0x20,0x64,0x6f,0x74,
|
|
0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,0x32,0x36,0x38,0x20,
|
|
0x2b,0x20,0x5f,0x32,0x36,0x33,0x29,0x2c,0x20,0x5f,0x32,0x35,0x31,0x29,0x29,0x2c,
|
|
0x20,0x33,0x32,0x2e,0x30,0x29,0x29,0x29,0x20,0x2a,0x20,0x31,0x2e,0x30,0x2c,0x20,
|
|
0x6d,0x69,0x78,0x28,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,
|
|
0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,
|
|
0x30,0x2e,0x35,0x2c,0x20,0x5f,0x33,0x31,0x33,0x29,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,0x76,0x65,0x63,0x32,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x28,0x70,0x6f,0x73,0x2e,0x78,0x7a,
|
|
0x20,0x2a,0x20,0x30,0x2e,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x37,0x34,
|
|
0x35,0x30,0x35,0x38,0x30,0x35,0x39,0x36,0x39,0x32,0x33,0x38,0x32,0x38,0x31,0x32,
|
|
0x35,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,0x5f,0x31,0x35,0x34,0x2e,0x74,
|
|
0x69,0x6d,0x65,0x20,0x2a,0x20,0x30,0x2e,0x30,0x30,0x39,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x37,0x37,0x36,0x34,0x38,0x32,0x35,0x38,0x32,0x30,0x39,0x32,0x32,0x38,0x35,
|
|
0x31,0x35,0x36,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x30,0x31,0x20,0x3d,0x20,0x66,0x62,0x6d,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,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,0x5f,0x31,0x35,0x34,0x2e,0x64,0x65,0x65,0x70,0x43,0x6f,
|
|
0x6c,0x6f,0x72,0x20,0x2a,0x20,0x6d,0x69,0x78,0x28,0x30,0x2e,0x38,0x30,0x30,0x30,
|
|
0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,
|
|
0x38,0x31,0x32,0x35,0x2c,0x20,0x31,0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x34,
|
|
0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,0x32,0x30,0x33,0x31,0x32,0x35,0x2c,0x20,
|
|
0x5f,0x34,0x30,0x31,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
|
|
uniform vec4 plane_vs_params[5];
|
|
layout(location = 0) in vec4 position;
|
|
out vec4 pos;
|
|
flat out int idx;
|
|
|
|
void main()
|
|
{
|
|
vec3 _16 = position.xyz * 1000.0;
|
|
vec4 _51 = vec4(_16.x, _16.y + (float(gl_InstanceID) * plane_vs_params[4].x), _16.z, 1.0);
|
|
gl_Position = mat4(plane_vs_params[0], plane_vs_params[1], plane_vs_params[2], plane_vs_params[3]) * _51;
|
|
pos = _51;
|
|
idx = gl_InstanceID;
|
|
}
|
|
|
|
*/
|
|
vs_plane_source_glsl300es := u8.[
|
|
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
|
|
0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6c,
|
|
0x61,0x6e,0x65,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,
|
|
0x3b,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,0x34,0x20,0x70,
|
|
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x66,0x6c,0x61,0x74,0x20,0x6f,0x75,0x74,0x20,
|
|
0x69,0x6e,0x74,0x20,0x69,0x64,0x78,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,
|
|
0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x5f,0x31,0x36,0x20,0x3d,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,
|
|
0x78,0x79,0x7a,0x20,0x2a,0x20,0x31,0x30,0x30,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x35,0x31,0x20,0x3d,0x20,0x76,0x65,0x63,
|
|
0x34,0x28,0x5f,0x31,0x36,0x2e,0x78,0x2c,0x20,0x5f,0x31,0x36,0x2e,0x79,0x20,0x2b,
|
|
0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,
|
|
0x6e,0x63,0x65,0x49,0x44,0x29,0x20,0x2a,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x76,
|
|
0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x2e,0x78,0x29,0x2c,0x20,
|
|
0x5f,0x31,0x36,0x2e,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,
|
|
0x61,0x74,0x34,0x28,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,
|
|
0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x76,0x73,
|
|
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x70,0x6c,0x61,0x6e,
|
|
0x65,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,
|
|
0x70,0x6c,0x61,0x6e,0x65,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
|
|
0x33,0x5d,0x29,0x20,0x2a,0x20,0x5f,0x35,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x70,
|
|
0x6f,0x73,0x20,0x3d,0x20,0x5f,0x35,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x64,
|
|
0x78,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,
|
|
0x44,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#version 300 es
|
|
precision mediump float;
|
|
precision highp int;
|
|
|
|
struct plane_world_config
|
|
{
|
|
highp vec3 skyBase;
|
|
highp vec3 skyTop;
|
|
highp vec3 sunDisk;
|
|
highp vec3 horizonHalo;
|
|
highp vec3 sunHalo;
|
|
highp vec3 sunLightColor;
|
|
highp vec3 sunPosition;
|
|
highp float sunIntensity;
|
|
highp float skyIntensity;
|
|
int hasClouds;
|
|
highp float planeHeight;
|
|
int planeType;
|
|
highp vec3 waterColor;
|
|
highp vec3 deepColor;
|
|
highp float time;
|
|
};
|
|
|
|
uniform plane_world_config _154;
|
|
|
|
struct plane_data
|
|
{
|
|
int screen_w;
|
|
int screen_h;
|
|
int is_reflection_pass;
|
|
highp vec3 cameraPosition;
|
|
highp float shininess;
|
|
highp float reflectionDistortion;
|
|
};
|
|
|
|
uniform plane_data _255;
|
|
|
|
struct plane_fs_params
|
|
{
|
|
highp mat4 mvp_shadow;
|
|
int is_reflection;
|
|
};
|
|
|
|
uniform plane_fs_params _287;
|
|
|
|
uniform highp sampler2D normal_map_normalsmp;
|
|
uniform highp sampler2D reftex_refsmp;
|
|
|
|
flat in int idx;
|
|
in highp vec4 pos;
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
|
|
highp vec3 fresnelSchlick(highp float cosTheta)
|
|
{
|
|
return vec3(0.0199999995529651641845703125) + (vec3(0.980000019073486328125) * pow(1.0 - cosTheta, 5.0));
|
|
}
|
|
|
|
highp float hash(highp vec2 p)
|
|
{
|
|
return fract(sin(dot(p, vec2(127.09999847412109375, 311.70001220703125))) * 43758.546875);
|
|
}
|
|
|
|
highp float _noise(highp vec2 p)
|
|
{
|
|
highp vec2 _55 = floor(p);
|
|
highp vec2 _58 = fract(p);
|
|
highp vec2 _69 = (_58 * _58) * (vec2(3.0) - (_58 * 2.0));
|
|
highp vec2 param = _55;
|
|
highp vec2 param_1 = _55 + vec2(1.0, 0.0);
|
|
highp float _84 = _69.x;
|
|
highp vec2 param_2 = _55 + vec2(0.0, 1.0);
|
|
highp vec2 param_3 = _55 + vec2(1.0);
|
|
return mix(mix(hash(param), hash(param_1), _84), mix(hash(param_2), hash(param_3), _84), _69.y);
|
|
}
|
|
|
|
highp float fbm(inout highp vec2 p)
|
|
{
|
|
highp float value = 0.0;
|
|
highp float amplitude = 0.5;
|
|
for (int i = 0; i < 4; i++)
|
|
{
|
|
highp vec2 param = p;
|
|
value += (amplitude * _noise(param));
|
|
p *= 2.0;
|
|
amplitude *= 0.5;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
if (idx == 1)
|
|
{
|
|
highp vec2 _162 = vec2(-0.004999999888241291046142578125, -0.01200000010430812835693359375) * _154.time;
|
|
highp vec3 _251 = normalize(((((texture(normal_map_normalsmp, (pos.xz * 0.4000000059604644775390625) + (_162 * 1.5)).xzy * 2.0) - vec3(1.0)) + ((texture(normal_map_normalsmp, (pos.xz * 0.100000001490116119384765625) + (_162 * 1.7000000476837158203125)).xzy * 2.0) - vec3(1.0))) + ((texture(normal_map_normalsmp, (pos.xz * 1.0) + (_162 * 2.7000000476837158203125)).xzy * 2.0) - vec3(1.0))) + ((texture(normal_map_normalsmp, (pos.xz * 0.0199999995529651641845703125) + (_162 * 0.100000001490116119384765625)).xzy * 2.0) - vec3(1.0)));
|
|
highp vec3 _263 = normalize(_255.cameraPosition - pos.xyz);
|
|
highp vec3 _268 = normalize(_154.sunPosition);
|
|
highp float param = _263.y;
|
|
highp float _313 = min(1.0, fresnelSchlick(param).x + 0.300000011920928955078125);
|
|
highp vec2 _345 = gl_FragCoord.xy / vec2(float(_255.screen_w), float(_255.screen_h));
|
|
_345.y = 1.0 - _345.y;
|
|
frag_color = vec4((mix(((_154.waterColor * (dot(_251, _268) + ((9.9999999747524270787835121154785e-07 * float(_287.is_reflection)) * _255.shininess))) * _154.sunLightColor) * _154.sunIntensity, texture(reftex_refsmp, _345).xyz, vec3(_313)) + ((_154.sunLightColor * _154.sunIntensity) * pow(max(0.0, dot(normalize(_268 + _263), _251)), 32.0))) * 1.0, mix(0.300000011920928955078125, 0.5, _313));
|
|
}
|
|
else
|
|
{
|
|
highp vec2 param_1 = (pos.xz * 0.0500000007450580596923828125) + vec2(_154.time * 0.00999999977648258209228515625);
|
|
highp float _401 = fbm(param_1);
|
|
frag_color = vec4(_154.deepColor * mix(0.800000011920928955078125, 1.2000000476837158203125, _401), 1.0);
|
|
}
|
|
}
|
|
|
|
*/
|
|
fs_plane_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,0x6c,0x61,0x6e,0x65,0x5f,0x77,0x6f,0x72,0x6c,
|
|
0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x6b,0x79,0x42,0x61,0x73,
|
|
0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x33,0x20,0x73,0x6b,0x79,0x54,0x6f,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x6e,0x44,0x69,0x73,0x6b,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x68,0x6f,0x72,0x69,0x7a,0x6f,0x6e,0x48,0x61,0x6c,0x6f,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x6e,
|
|
0x48,0x61,0x6c,0x6f,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x43,0x6f,0x6c,
|
|
0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x73,0x75,0x6e,0x49,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,0x6b,
|
|
0x79,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x6e,0x74,0x20,0x68,0x61,0x73,0x43,0x6c,0x6f,0x75,0x64,0x73,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,
|
|
0x6c,0x61,0x6e,0x65,0x48,0x65,0x69,0x67,0x68,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x6e,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x54,0x79,0x70,0x65,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x77,0x61,
|
|
0x74,0x65,0x72,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x64,0x65,0x65,0x70,0x43,0x6f,0x6c,
|
|
0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x75,0x6e,
|
|
0x69,0x66,0x6f,0x72,0x6d,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x77,0x6f,0x72,0x6c,
|
|
0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x20,0x5f,0x31,0x35,0x34,0x3b,0x0a,0x0a,
|
|
0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x64,0x61,0x74,
|
|
0x61,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x73,0x63,0x72,0x65,
|
|
0x65,0x6e,0x5f,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x73,0x63,
|
|
0x72,0x65,0x65,0x6e,0x5f,0x68,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,
|
|
0x69,0x73,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,0x70,0x61,
|
|
0x73,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x33,0x20,0x63,0x61,0x6d,0x65,0x72,0x61,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
|
0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x20,0x73,0x68,0x69,0x6e,0x69,0x6e,0x65,0x73,0x73,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x72,0x65,
|
|
0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x44,0x69,0x73,0x74,0x6f,0x72,0x74,0x69,
|
|
0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,
|
|
0x70,0x6c,0x61,0x6e,0x65,0x5f,0x64,0x61,0x74,0x61,0x20,0x5f,0x32,0x35,0x35,0x3b,
|
|
0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x66,
|
|
0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x6d,0x61,0x74,0x34,0x20,0x6d,0x76,0x70,0x5f,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x69,0x73,
|
|
0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,
|
|
0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x66,
|
|
0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x5f,0x32,0x38,0x37,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,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x6d,
|
|
0x61,0x70,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,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,0x72,0x65,0x66,0x74,0x65,0x78,0x5f,0x72,0x65,0x66,
|
|
0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x66,0x6c,0x61,0x74,0x20,0x69,0x6e,0x20,0x69,0x6e,
|
|
0x74,0x20,0x69,0x64,0x78,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,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,0x66,0x72,0x65,0x73,0x6e,0x65,0x6c,0x53,0x63,0x68,
|
|
0x6c,0x69,0x63,0x6b,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x20,0x63,0x6f,0x73,0x54,0x68,0x65,0x74,0x61,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,
|
|
0x31,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,
|
|
0x34,0x31,0x38,0x34,0x35,0x37,0x30,0x33,0x31,0x32,0x35,0x29,0x20,0x2b,0x20,0x28,
|
|
0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x39,0x38,0x30,0x30,0x30,0x30,0x30,0x31,0x39,
|
|
0x30,0x37,0x33,0x34,0x38,0x36,0x33,0x32,0x38,0x31,0x32,0x35,0x29,0x20,0x2a,0x20,
|
|
0x70,0x6f,0x77,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x63,0x6f,0x73,0x54,0x68,0x65,
|
|
0x74,0x61,0x2c,0x20,0x35,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x68,0x61,0x73,0x68,0x28,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,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,0x70,0x2c,0x20,0x76,0x65,0x63,0x32,0x28,
|
|
0x31,0x32,0x37,0x2e,0x30,0x39,0x39,0x39,0x39,0x38,0x34,0x37,0x34,0x31,0x32,0x31,
|
|
0x30,0x39,0x33,0x37,0x35,0x2c,0x20,0x33,0x31,0x31,0x2e,0x37,0x30,0x30,0x30,0x31,
|
|
0x32,0x32,0x30,0x37,0x30,0x33,0x31,0x32,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,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x6e,0x6f,
|
|
0x69,0x73,0x65,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,
|
|
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
|
|
0x63,0x32,0x20,0x5f,0x35,0x35,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x70,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x32,0x20,0x5f,0x35,0x38,0x20,0x3d,0x20,0x66,0x72,0x61,0x63,0x74,0x28,0x70,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,
|
|
0x20,0x5f,0x36,0x39,0x20,0x3d,0x20,0x28,0x5f,0x35,0x38,0x20,0x2a,0x20,0x5f,0x35,
|
|
0x38,0x29,0x20,0x2a,0x20,0x28,0x76,0x65,0x63,0x32,0x28,0x33,0x2e,0x30,0x29,0x20,
|
|
0x2d,0x20,0x28,0x5f,0x35,0x38,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x35,0x35,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,0x5f,0x35,0x35,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,
|
|
0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x38,0x34,0x20,0x3d,
|
|
0x20,0x5f,0x36,0x39,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,
|
|
0x20,0x5f,0x35,0x35,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,0x30,0x2e,0x30,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,
|
|
0x5f,0x35,0x35,0x20,0x2b,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x69,0x78,0x28,
|
|
0x6d,0x69,0x78,0x28,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x2c,
|
|
0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x2c,0x20,
|
|
0x5f,0x38,0x34,0x29,0x2c,0x20,0x6d,0x69,0x78,0x28,0x68,0x61,0x73,0x68,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x2c,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x33,0x29,0x2c,0x20,0x5f,0x38,0x34,0x29,0x2c,0x20,0x5f,0x36,
|
|
0x39,0x2e,0x79,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x66,0x62,0x6d,0x28,0x69,0x6e,0x6f,0x75,0x74,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x29,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x76,
|
|
0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x61,0x6d,0x70,0x6c,
|
|
0x69,0x74,0x75,0x64,0x65,0x20,0x3d,0x20,0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6f,0x72,0x20,0x28,0x69,0x6e,0x74,0x20,0x69,0x20,0x3d,0x20,0x30,0x3b,
|
|
0x20,0x69,0x20,0x3c,0x20,0x34,0x3b,0x20,0x69,0x2b,0x2b,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,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x70,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x2b,
|
|
0x3d,0x20,0x28,0x61,0x6d,0x70,0x6c,0x69,0x74,0x75,0x64,0x65,0x20,0x2a,0x20,0x5f,
|
|
0x6e,0x6f,0x69,0x73,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x70,0x20,0x2a,0x3d,0x20,0x32,0x2e,0x30,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x6d,0x70,0x6c,0x69,0x74,0x75,
|
|
0x64,0x65,0x20,0x2a,0x3d,0x20,0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,
|
|
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x61,0x6c,0x75,
|
|
0x65,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,
|
|
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x69,0x64,0x78,0x20,
|
|
0x3d,0x3d,0x20,0x31,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,0x32,0x20,0x5f,
|
|
0x31,0x36,0x32,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x2d,0x30,0x2e,0x30,0x30,
|
|
0x34,0x39,0x39,0x39,0x39,0x39,0x39,0x38,0x38,0x38,0x32,0x34,0x31,0x32,0x39,0x31,
|
|
0x30,0x34,0x36,0x31,0x34,0x32,0x35,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x2d,0x30,
|
|
0x2e,0x30,0x31,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x30,0x34,0x33,0x30,0x38,
|
|
0x31,0x32,0x38,0x33,0x35,0x36,0x39,0x33,0x33,0x35,0x39,0x33,0x37,0x35,0x29,0x20,
|
|
0x2a,0x20,0x5f,0x31,0x35,0x34,0x2e,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
|
|
0x5f,0x32,0x35,0x31,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,
|
|
0x28,0x28,0x28,0x28,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,0x5f,0x6d,0x61,0x70,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x6d,
|
|
0x70,0x2c,0x20,0x28,0x70,0x6f,0x73,0x2e,0x78,0x7a,0x20,0x2a,0x20,0x30,0x2e,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,0x20,0x2b,0x20,0x28,0x5f,0x31,0x36,
|
|
0x32,0x20,0x2a,0x20,0x31,0x2e,0x35,0x29,0x29,0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,
|
|
0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,
|
|
0x29,0x20,0x2b,0x20,0x28,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x5f,0x6d,0x61,0x70,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x28,0x70,0x6f,0x73,0x2e,0x78,0x7a,0x20,0x2a,0x20,0x30,0x2e,
|
|
0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,0x30,0x31,0x31,0x36,0x31,
|
|
0x31,0x39,0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,0x29,0x20,0x2b,0x20,0x28,
|
|
0x5f,0x31,0x36,0x32,0x20,0x2a,0x20,0x31,0x2e,0x37,0x30,0x30,0x30,0x30,0x30,0x30,
|
|
0x34,0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,0x32,0x30,0x33,0x31,0x32,0x35,0x29,
|
|
0x29,0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x74,
|
|
0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x6d,0x61,
|
|
0x70,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x6d,0x70,0x2c,0x20,0x28,0x70,0x6f,
|
|
0x73,0x2e,0x78,0x7a,0x20,0x2a,0x20,0x31,0x2e,0x30,0x29,0x20,0x2b,0x20,0x28,0x5f,
|
|
0x31,0x36,0x32,0x20,0x2a,0x20,0x32,0x2e,0x37,0x30,0x30,0x30,0x30,0x30,0x30,0x34,
|
|
0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,0x32,0x30,0x33,0x31,0x32,0x35,0x29,0x29,
|
|
0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,
|
|
0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x74,0x65,
|
|
0x78,0x74,0x75,0x72,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x6d,0x61,0x70,
|
|
0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x6d,0x70,0x2c,0x20,0x28,0x70,0x6f,0x73,
|
|
0x2e,0x78,0x7a,0x20,0x2a,0x20,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,0x37,0x30,
|
|
0x33,0x31,0x32,0x35,0x29,0x20,0x2b,0x20,0x28,0x5f,0x31,0x36,0x32,0x20,0x2a,0x20,
|
|
0x30,0x2e,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,0x30,0x31,0x31,
|
|
0x36,0x31,0x31,0x39,0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,0x29,0x29,0x2e,
|
|
0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x36,
|
|
0x33,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,0x32,
|
|
0x35,0x35,0x2e,0x63,0x61,0x6d,0x65,0x72,0x61,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,
|
|
0x6e,0x20,0x2d,0x20,0x70,0x6f,0x73,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
|
|
0x20,0x5f,0x32,0x36,0x38,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,
|
|
0x65,0x28,0x5f,0x31,0x35,0x34,0x2e,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,
|
|
0x6f,0x6e,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,
|
|
0x20,0x5f,0x32,0x36,0x33,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x31,
|
|
0x33,0x20,0x3d,0x20,0x6d,0x69,0x6e,0x28,0x31,0x2e,0x30,0x2c,0x20,0x66,0x72,0x65,
|
|
0x73,0x6e,0x65,0x6c,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x29,0x2e,0x78,0x20,0x2b,0x20,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,
|
|
0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,
|
|
0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x33,0x34,0x35,0x20,0x3d,0x20,0x67,0x6c,
|
|
0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x20,0x2f,0x20,
|
|
0x76,0x65,0x63,0x32,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x5f,0x32,0x35,0x35,0x2e,
|
|
0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x77,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x28,0x5f,0x32,0x35,0x35,0x2e,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x68,0x29,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x33,0x34,0x35,0x2e,0x79,
|
|
0x20,0x3d,0x20,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x33,0x34,0x35,0x2e,0x79,0x3b,
|
|
0x0a,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,0x28,0x6d,0x69,0x78,0x28,
|
|
0x28,0x28,0x5f,0x31,0x35,0x34,0x2e,0x77,0x61,0x74,0x65,0x72,0x43,0x6f,0x6c,0x6f,
|
|
0x72,0x20,0x2a,0x20,0x28,0x64,0x6f,0x74,0x28,0x5f,0x32,0x35,0x31,0x2c,0x20,0x5f,
|
|
0x32,0x36,0x38,0x29,0x20,0x2b,0x20,0x28,0x28,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x39,0x37,0x34,0x37,0x35,0x32,0x34,0x32,0x37,0x30,0x37,0x38,0x37,0x38,0x33,
|
|
0x35,0x31,0x32,0x31,0x31,0x35,0x34,0x37,0x38,0x35,0x65,0x2d,0x30,0x37,0x20,0x2a,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x5f,0x32,0x38,0x37,0x2e,0x69,0x73,0x5f,0x72,
|
|
0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x29,0x29,0x20,0x2a,0x20,0x5f,0x32,
|
|
0x35,0x35,0x2e,0x73,0x68,0x69,0x6e,0x69,0x6e,0x65,0x73,0x73,0x29,0x29,0x29,0x20,
|
|
0x2a,0x20,0x5f,0x31,0x35,0x34,0x2e,0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x43,
|
|
0x6f,0x6c,0x6f,0x72,0x29,0x20,0x2a,0x20,0x5f,0x31,0x35,0x34,0x2e,0x73,0x75,0x6e,
|
|
0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,
|
|
0x72,0x65,0x28,0x72,0x65,0x66,0x74,0x65,0x78,0x5f,0x72,0x65,0x66,0x73,0x6d,0x70,
|
|
0x2c,0x20,0x5f,0x33,0x34,0x35,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,0x63,
|
|
0x33,0x28,0x5f,0x33,0x31,0x33,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x5f,0x31,0x35,
|
|
0x34,0x2e,0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x43,0x6f,0x6c,0x6f,0x72,0x20,
|
|
0x2a,0x20,0x5f,0x31,0x35,0x34,0x2e,0x73,0x75,0x6e,0x49,0x6e,0x74,0x65,0x6e,0x73,
|
|
0x69,0x74,0x79,0x29,0x20,0x2a,0x20,0x70,0x6f,0x77,0x28,0x6d,0x61,0x78,0x28,0x30,
|
|
0x2e,0x30,0x2c,0x20,0x64,0x6f,0x74,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,
|
|
0x65,0x28,0x5f,0x32,0x36,0x38,0x20,0x2b,0x20,0x5f,0x32,0x36,0x33,0x29,0x2c,0x20,
|
|
0x5f,0x32,0x35,0x31,0x29,0x29,0x2c,0x20,0x33,0x32,0x2e,0x30,0x29,0x29,0x29,0x20,
|
|
0x2a,0x20,0x31,0x2e,0x30,0x2c,0x20,0x6d,0x69,0x78,0x28,0x30,0x2e,0x33,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,
|
|
0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x5f,0x33,0x31,0x33,
|
|
0x29,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,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x20,0x3d,0x20,0x28,0x70,0x6f,0x73,0x2e,0x78,0x7a,0x20,0x2a,0x20,
|
|
0x30,0x2e,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x37,0x34,0x35,0x30,0x35,
|
|
0x38,0x30,0x35,0x39,0x36,0x39,0x32,0x33,0x38,0x32,0x38,0x31,0x32,0x35,0x29,0x20,
|
|
0x2b,0x20,0x76,0x65,0x63,0x32,0x28,0x5f,0x31,0x35,0x34,0x2e,0x74,0x69,0x6d,0x65,
|
|
0x20,0x2a,0x20,0x30,0x2e,0x30,0x30,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x37,
|
|
0x36,0x34,0x38,0x32,0x35,0x38,0x32,0x30,0x39,0x32,0x32,0x38,0x35,0x31,0x35,0x36,
|
|
0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x30,0x31,0x20,0x3d,0x20,
|
|
0x66,0x62,0x6d,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,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,0x5f,0x31,0x35,0x34,0x2e,0x64,0x65,0x65,
|
|
0x70,0x43,0x6f,0x6c,0x6f,0x72,0x20,0x2a,0x20,0x6d,0x69,0x78,0x28,0x30,0x2e,0x38,
|
|
0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,
|
|
0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x31,0x2e,0x32,0x30,0x30,0x30,0x30,
|
|
0x30,0x30,0x34,0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,0x32,0x30,0x33,0x31,0x32,
|
|
0x35,0x2c,0x20,0x5f,0x34,0x30,0x31,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
/*
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct plane_vs_params
|
|
{
|
|
float4x4 mvp;
|
|
float planeHeight;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 pos [[user(locn0)]];
|
|
int idx [[user(locn1)]];
|
|
float4 gl_Position [[position]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float4 position [[attribute(0)]];
|
|
};
|
|
|
|
vertex main0_out main0(main0_in in [[stage_in]], constant plane_vs_params& _25 [[buffer(0)]], uint gl_InstanceIndex [[instance_id]])
|
|
{
|
|
main0_out out = {};
|
|
float3 _16 = in.position.xyz * 1000.0;
|
|
float4 _51 = float4(_16.x, _16.y + (float(int(gl_InstanceIndex)) * _25.planeHeight), _16.z, 1.0);
|
|
out.gl_Position = _25.mvp * _51;
|
|
out.pos = _51;
|
|
out.idx = int(gl_InstanceIndex);
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
vs_plane_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,0x70,
|
|
0x6c,0x61,0x6e,0x65,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x6d,0x76,
|
|
0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x6c,0x61,
|
|
0x6e,0x65,0x48,0x65,0x69,0x67,0x68,0x74,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,0x70,0x6f,0x73,0x20,
|
|
0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x69,0x64,0x78,0x20,0x5b,0x5b,0x75,
|
|
0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x31,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,0x34,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,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,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x70,0x6c,0x61,
|
|
0x6e,0x65,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x32,
|
|
0x35,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c,
|
|
0x20,0x75,0x69,0x6e,0x74,0x20,0x67,0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,
|
|
0x65,0x49,0x6e,0x64,0x65,0x78,0x20,0x5b,0x5b,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,
|
|
0x65,0x5f,0x69,0x64,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,0x33,0x20,0x5f,0x31,0x36,
|
|
0x20,0x3d,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x78,
|
|
0x79,0x7a,0x20,0x2a,0x20,0x31,0x30,0x30,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x35,0x31,0x20,0x3d,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x28,0x5f,0x31,0x36,0x2e,0x78,0x2c,0x20,0x5f,0x31,0x36,0x2e,
|
|
0x79,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x69,0x6e,0x74,0x28,0x67,
|
|
0x6c,0x5f,0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x29,
|
|
0x29,0x20,0x2a,0x20,0x5f,0x32,0x35,0x2e,0x70,0x6c,0x61,0x6e,0x65,0x48,0x65,0x69,
|
|
0x67,0x68,0x74,0x29,0x2c,0x20,0x5f,0x31,0x36,0x2e,0x7a,0x2c,0x20,0x31,0x2e,0x30,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,
|
|
0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x32,0x35,0x2e,0x6d,0x76,0x70,
|
|
0x20,0x2a,0x20,0x5f,0x35,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
|
|
0x70,0x6f,0x73,0x20,0x3d,0x20,0x5f,0x35,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,
|
|
0x75,0x74,0x2e,0x69,0x64,0x78,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,
|
|
0x49,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x49,0x6e,0x64,0x65,0x78,0x29,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 plane_world_config
|
|
{
|
|
float3 skyBase;
|
|
float3 skyTop;
|
|
float3 sunDisk;
|
|
float3 horizonHalo;
|
|
float3 sunHalo;
|
|
float3 sunLightColor;
|
|
packed_float3 sunPosition;
|
|
float sunIntensity;
|
|
float skyIntensity;
|
|
int hasClouds;
|
|
float planeHeight;
|
|
int planeType;
|
|
float3 waterColor;
|
|
packed_float3 deepColor;
|
|
float time;
|
|
};
|
|
|
|
struct plane_data
|
|
{
|
|
int screen_w;
|
|
int screen_h;
|
|
int is_reflection_pass;
|
|
char _m3_pad[4];
|
|
packed_float3 cameraPosition;
|
|
float shininess;
|
|
float reflectionDistortion;
|
|
};
|
|
|
|
struct plane_fs_params
|
|
{
|
|
float4x4 mvp_shadow;
|
|
int is_reflection;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float4 pos [[user(locn0)]];
|
|
int idx [[user(locn1)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
float3 fresnelSchlick(thread const float& cosTheta)
|
|
{
|
|
return float3(0.0199999995529651641845703125) + (float3(0.980000019073486328125) * powr(1.0 - cosTheta, 5.0));
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float hash(thread const float2& p)
|
|
{
|
|
return fract(sin(dot(p, float2(127.09999847412109375, 311.70001220703125))) * 43758.546875);
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float _noise(thread const float2& p)
|
|
{
|
|
float2 _55 = floor(p);
|
|
float2 _58 = fract(p);
|
|
float2 _69 = (_58 * _58) * (float2(3.0) - (_58 * 2.0));
|
|
float2 param = _55;
|
|
float2 param_1 = _55 + float2(1.0, 0.0);
|
|
float _84 = _69.x;
|
|
float2 param_2 = _55 + float2(0.0, 1.0);
|
|
float2 param_3 = _55 + float2(1.0);
|
|
return mix(mix(hash(param), hash(param_1), _84), mix(hash(param_2), hash(param_3), _84), _69.y);
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float fbm(thread float2& p)
|
|
{
|
|
float value = 0.0;
|
|
float amplitude = 0.5;
|
|
for (int i = 0; i < 4; i++)
|
|
{
|
|
float2 param = p;
|
|
value += (amplitude * _noise(param));
|
|
p *= 2.0;
|
|
amplitude *= 0.5;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant plane_world_config& _154 [[buffer(0)]], constant plane_data& _255 [[buffer(1)]], constant plane_fs_params& _287 [[buffer(2)]], texture2d<float> normal_map [[texture(0)]], texture2d<float> reftex [[texture(1)]], sampler normalsmp [[sampler(0)]], sampler refsmp [[sampler(1)]], float4 gl_FragCoord [[position]])
|
|
{
|
|
main0_out out = {};
|
|
if (in.idx == 1)
|
|
{
|
|
float2 _162 = float2(-0.004999999888241291046142578125, -0.01200000010430812835693359375) * _154.time;
|
|
float3 _251 = fast::normalize(((((normal_map.sample(normalsmp, ((in.pos.xz * 0.4000000059604644775390625) + (_162 * 1.5))).xzy * 2.0) - float3(1.0)) + ((normal_map.sample(normalsmp, ((in.pos.xz * 0.100000001490116119384765625) + (_162 * 1.7000000476837158203125))).xzy * 2.0) - float3(1.0))) + ((normal_map.sample(normalsmp, ((in.pos.xz * 1.0) + (_162 * 2.7000000476837158203125))).xzy * 2.0) - float3(1.0))) + ((normal_map.sample(normalsmp, ((in.pos.xz * 0.0199999995529651641845703125) + (_162 * 0.100000001490116119384765625))).xzy * 2.0) - float3(1.0)));
|
|
float3 _263 = fast::normalize(float3(_255.cameraPosition) - in.pos.xyz);
|
|
float3 _268 = fast::normalize(float3(_154.sunPosition));
|
|
float param = _263.y;
|
|
float _313 = fast::min(1.0, fresnelSchlick(param).x + 0.300000011920928955078125);
|
|
float2 _345 = gl_FragCoord.xy / float2(float(_255.screen_w), float(_255.screen_h));
|
|
_345.y = 1.0 - _345.y;
|
|
out.frag_color = float4((mix(((_154.waterColor * (dot(_251, _268) + ((9.9999999747524270787835121154785e-07 * float(_287.is_reflection)) * _255.shininess))) * _154.sunLightColor) * _154.sunIntensity, reftex.sample(refsmp, _345).xyz, float3(_313)) + ((_154.sunLightColor * _154.sunIntensity) * powr(fast::max(0.0, dot(fast::normalize(_268 + _263), _251)), 32.0))) * 1.0, mix(0.300000011920928955078125, 0.5, _313));
|
|
}
|
|
else
|
|
{
|
|
float2 param_1 = (in.pos.xz * 0.0500000007450580596923828125) + float2(_154.time * 0.00999999977648258209228515625);
|
|
float _401 = fbm(param_1);
|
|
out.frag_color = float4(float3(_154.deepColor) * mix(0.800000011920928955078125, 1.2000000476837158203125, _401), 1.0);
|
|
}
|
|
return out;
|
|
}
|
|
|
|
*/
|
|
fs_plane_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,0x6c,0x61,0x6e,0x65,0x5f,0x77,0x6f,
|
|
0x72,0x6c,0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,0x6b,0x79,0x42,0x61,0x73,0x65,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,0x6b,0x79,0x54,
|
|
0x6f,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,
|
|
0x75,0x6e,0x44,0x69,0x73,0x6b,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x20,0x68,0x6f,0x72,0x69,0x7a,0x6f,0x6e,0x48,0x61,0x6c,0x6f,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,0x75,0x6e,0x48,0x61,
|
|
0x6c,0x6f,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,
|
|
0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x70,0x61,0x63,0x6b,0x65,0x64,0x5f,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,
|
|
0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,0x75,0x6e,0x49,0x6e,0x74,0x65,0x6e,0x73,
|
|
0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,
|
|
0x6b,0x79,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x6e,0x74,0x20,0x68,0x61,0x73,0x43,0x6c,0x6f,0x75,0x64,0x73,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x48,
|
|
0x65,0x69,0x67,0x68,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x70,
|
|
0x6c,0x61,0x6e,0x65,0x54,0x79,0x70,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x20,0x77,0x61,0x74,0x65,0x72,0x43,0x6f,0x6c,0x6f,0x72,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x70,0x61,0x63,0x6b,0x65,0x64,0x5f,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x20,0x64,0x65,0x65,0x70,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x7d,0x3b,
|
|
0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x64,
|
|
0x61,0x74,0x61,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x73,0x63,
|
|
0x72,0x65,0x65,0x6e,0x5f,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,
|
|
0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x68,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,
|
|
0x74,0x20,0x69,0x73,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,0x5f,
|
|
0x70,0x61,0x73,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x68,0x61,0x72,0x20,0x5f,
|
|
0x6d,0x33,0x5f,0x70,0x61,0x64,0x5b,0x34,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x70,
|
|
0x61,0x63,0x6b,0x65,0x64,0x5f,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x63,0x61,0x6d,
|
|
0x65,0x72,0x61,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,0x68,0x69,0x6e,0x69,0x6e,0x65,0x73,0x73,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x72,0x65,0x66,0x6c,
|
|
0x65,0x63,0x74,0x69,0x6f,0x6e,0x44,0x69,0x73,0x74,0x6f,0x72,0x74,0x69,0x6f,0x6e,
|
|
0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x70,0x6c,0x61,
|
|
0x6e,0x65,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x6d,0x76,0x70,0x5f,
|
|
0x73,0x68,0x61,0x64,0x6f,0x77,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,
|
|
0x69,0x73,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,0x6f,0x6e,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,0x34,0x20,0x70,0x6f,0x73,0x20,0x5b,
|
|
0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x69,0x64,0x78,0x20,0x5b,0x5b,0x75,0x73,
|
|
0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x31,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,0x66,0x72,0x65,0x73,0x6e,0x65,0x6c,0x53,0x63,0x68,0x6c,
|
|
0x69,0x63,0x6b,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x63,0x6f,0x73,0x54,0x68,0x65,0x74,0x61,
|
|
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,0x37,0x30,
|
|
0x33,0x31,0x32,0x35,0x29,0x20,0x2b,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,
|
|
0x30,0x2e,0x39,0x38,0x30,0x30,0x30,0x30,0x30,0x31,0x39,0x30,0x37,0x33,0x34,0x38,
|
|
0x36,0x33,0x32,0x38,0x31,0x32,0x35,0x29,0x20,0x2a,0x20,0x70,0x6f,0x77,0x72,0x28,
|
|
0x31,0x2e,0x30,0x20,0x2d,0x20,0x63,0x6f,0x73,0x54,0x68,0x65,0x74,0x61,0x2c,0x20,
|
|
0x35,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,0x68,0x61,0x73,
|
|
0x68,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x32,0x26,0x20,0x70,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,0x70,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x31,
|
|
0x32,0x37,0x2e,0x30,0x39,0x39,0x39,0x39,0x38,0x34,0x37,0x34,0x31,0x32,0x31,0x30,
|
|
0x39,0x33,0x37,0x35,0x2c,0x20,0x33,0x31,0x31,0x2e,0x37,0x30,0x30,0x30,0x31,0x32,
|
|
0x32,0x30,0x37,0x30,0x33,0x31,0x32,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,
|
|
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,0x5f,0x6e,0x6f,0x69,0x73,0x65,0x28,0x74,0x68,0x72,0x65,0x61,0x64,
|
|
0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x26,0x20,0x70,
|
|
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,
|
|
0x35,0x35,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x70,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x35,0x38,0x20,0x3d,0x20,
|
|
0x66,0x72,0x61,0x63,0x74,0x28,0x70,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x20,0x5f,0x36,0x39,0x20,0x3d,0x20,0x28,0x5f,0x35,0x38,0x20,
|
|
0x2a,0x20,0x5f,0x35,0x38,0x29,0x20,0x2a,0x20,0x28,0x66,0x6c,0x6f,0x61,0x74,0x32,
|
|
0x28,0x33,0x2e,0x30,0x29,0x20,0x2d,0x20,0x28,0x5f,0x35,0x38,0x20,0x2a,0x20,0x32,
|
|
0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x35,0x35,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
|
0x20,0x3d,0x20,0x5f,0x35,0x35,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,
|
|
0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x38,0x34,0x20,0x3d,0x20,0x5f,0x36,0x39,0x2e,0x78,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,0x35,0x35,0x20,0x2b,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x32,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x33,0x20,0x3d,0x20,0x5f,0x35,0x35,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
|
|
0x28,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,0x68,0x61,0x73,0x68,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x29,0x2c,0x20,0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x29,0x2c,0x20,0x5f,0x38,0x34,0x29,0x2c,0x20,0x6d,0x69,0x78,0x28,
|
|
0x68,0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x2c,0x20,0x68,
|
|
0x61,0x73,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,0x2c,0x20,0x5f,0x38,
|
|
0x34,0x29,0x2c,0x20,0x5f,0x36,0x39,0x2e,0x79,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,0x66,0x62,0x6d,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x32,0x26,0x20,0x70,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x61,0x6d,0x70,0x6c,0x69,
|
|
0x74,0x75,0x64,0x65,0x20,0x3d,0x20,0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6f,0x72,0x20,0x28,0x69,0x6e,0x74,0x20,0x69,0x20,0x3d,0x20,0x30,0x3b,0x20,
|
|
0x69,0x20,0x3c,0x20,0x34,0x3b,0x20,0x69,0x2b,0x2b,0x29,0x0a,0x20,0x20,0x20,0x20,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x76,0x61,0x6c,0x75,0x65,0x20,0x2b,0x3d,0x20,0x28,0x61,0x6d,
|
|
0x70,0x6c,0x69,0x74,0x75,0x64,0x65,0x20,0x2a,0x20,0x5f,0x6e,0x6f,0x69,0x73,0x65,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x70,0x20,0x2a,0x3d,0x20,0x32,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x61,0x6d,0x70,0x6c,0x69,0x74,0x75,0x64,0x65,0x20,0x2a,0x3d,
|
|
0x20,0x30,0x2e,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
|
|
0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x61,0x6c,0x75,0x65,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,0x6c,0x61,
|
|
0x6e,0x65,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x26,
|
|
0x20,0x5f,0x31,0x35,0x34,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,
|
|
0x29,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x70,0x6c,
|
|
0x61,0x6e,0x65,0x5f,0x64,0x61,0x74,0x61,0x26,0x20,0x5f,0x32,0x35,0x35,0x20,0x5b,
|
|
0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x63,0x6f,
|
|
0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x66,0x73,0x5f,
|
|
0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x32,0x38,0x37,0x20,0x5b,0x5b,0x62,
|
|
0x75,0x66,0x66,0x65,0x72,0x28,0x32,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,
|
|
0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x6e,0x6f,0x72,
|
|
0x6d,0x61,0x6c,0x5f,0x6d,0x61,0x70,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,0x72,0x65,0x66,0x74,0x65,0x78,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,0x6e,0x6f,0x72,0x6d,0x61,0x6c,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,0x72,0x65,0x66,0x73,0x6d,0x70,
|
|
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,0x69,0x66,0x20,0x28,0x69,0x6e,0x2e,0x69,0x64,0x78,0x20,0x3d,0x3d,0x20,0x31,
|
|
0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x31,0x36,0x32,0x20,0x3d,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x32,0x28,0x2d,0x30,0x2e,0x30,0x30,0x34,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x38,0x38,0x38,0x32,0x34,0x31,0x32,0x39,0x31,0x30,0x34,0x36,0x31,0x34,0x32,
|
|
0x35,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x2d,0x30,0x2e,0x30,0x31,0x32,0x30,0x30,
|
|
0x30,0x30,0x30,0x30,0x31,0x30,0x34,0x33,0x30,0x38,0x31,0x32,0x38,0x33,0x35,0x36,
|
|
0x39,0x33,0x33,0x35,0x39,0x33,0x37,0x35,0x29,0x20,0x2a,0x20,0x5f,0x31,0x35,0x34,
|
|
0x2e,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,0x35,0x31,0x20,0x3d,0x20,0x66,0x61,0x73,
|
|
0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x28,0x28,0x28,
|
|
0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x6d,0x61,0x70,0x2e,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x6d,0x70,0x2c,0x20,0x28,0x28,
|
|
0x69,0x6e,0x2e,0x70,0x6f,0x73,0x2e,0x78,0x7a,0x20,0x2a,0x20,0x30,0x2e,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,0x20,0x2b,0x20,0x28,0x5f,0x31,0x36,0x32,
|
|
0x20,0x2a,0x20,0x31,0x2e,0x35,0x29,0x29,0x29,0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,
|
|
0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,
|
|
0x30,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x6d,
|
|
0x61,0x70,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
|
|
0x73,0x6d,0x70,0x2c,0x20,0x28,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x2e,0x78,0x7a,
|
|
0x20,0x2a,0x20,0x30,0x2e,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,
|
|
0x30,0x31,0x31,0x36,0x31,0x31,0x39,0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,
|
|
0x29,0x20,0x2b,0x20,0x28,0x5f,0x31,0x36,0x32,0x20,0x2a,0x20,0x31,0x2e,0x37,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x34,0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,0x32,0x30,
|
|
0x33,0x31,0x32,0x35,0x29,0x29,0x29,0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,
|
|
0x30,0x29,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,
|
|
0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x6d,0x61,
|
|
0x70,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x28,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x2e,0x78,0x7a,0x20,
|
|
0x2a,0x20,0x31,0x2e,0x30,0x29,0x20,0x2b,0x20,0x28,0x5f,0x31,0x36,0x32,0x20,0x2a,
|
|
0x20,0x32,0x2e,0x37,0x30,0x30,0x30,0x30,0x30,0x30,0x34,0x37,0x36,0x38,0x33,0x37,
|
|
0x31,0x35,0x38,0x32,0x30,0x33,0x31,0x32,0x35,0x29,0x29,0x29,0x2e,0x78,0x7a,0x79,
|
|
0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x31,0x2e,0x30,0x29,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x6e,0x6f,0x72,0x6d,
|
|
0x61,0x6c,0x5f,0x6d,0x61,0x70,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x6e,0x6f,
|
|
0x72,0x6d,0x61,0x6c,0x73,0x6d,0x70,0x2c,0x20,0x28,0x28,0x69,0x6e,0x2e,0x70,0x6f,
|
|
0x73,0x2e,0x78,0x7a,0x20,0x2a,0x20,0x30,0x2e,0x30,0x31,0x39,0x39,0x39,0x39,0x39,
|
|
0x39,0x39,0x35,0x35,0x32,0x39,0x36,0x35,0x31,0x36,0x34,0x31,0x38,0x34,0x35,0x37,
|
|
0x30,0x33,0x31,0x32,0x35,0x29,0x20,0x2b,0x20,0x28,0x5f,0x31,0x36,0x32,0x20,0x2a,
|
|
0x20,0x30,0x2e,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,0x30,0x31,
|
|
0x31,0x36,0x31,0x31,0x39,0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,0x29,0x29,
|
|
0x29,0x2e,0x78,0x7a,0x79,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,0x36,
|
|
0x33,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
|
|
0x69,0x7a,0x65,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x32,0x35,0x35,0x2e,
|
|
0x63,0x61,0x6d,0x65,0x72,0x61,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x20,
|
|
0x2d,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,
|
|
0x36,0x38,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,
|
|
0x6c,0x69,0x7a,0x65,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x31,0x35,0x34,
|
|
0x2e,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x32,0x36,0x33,0x2e,0x79,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x31,0x33,
|
|
0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x69,0x6e,0x28,0x31,0x2e,0x30,
|
|
0x2c,0x20,0x66,0x72,0x65,0x73,0x6e,0x65,0x6c,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x2e,0x78,0x20,0x2b,0x20,0x30,0x2e,0x33,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,
|
|
0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x5f,0x33,0x34,0x35,0x20,0x3d,0x20,0x67,
|
|
0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x79,0x20,0x2f,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x5f,0x32,
|
|
0x35,0x35,0x2e,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x77,0x29,0x2c,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x28,0x5f,0x32,0x35,0x35,0x2e,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,
|
|
0x68,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x33,0x34,
|
|
0x35,0x2e,0x79,0x20,0x3d,0x20,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x33,0x34,0x35,
|
|
0x2e,0x79,0x3b,0x0a,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,0x28,0x6d,0x69,0x78,0x28,0x28,0x28,0x5f,0x31,0x35,0x34,0x2e,
|
|
0x77,0x61,0x74,0x65,0x72,0x43,0x6f,0x6c,0x6f,0x72,0x20,0x2a,0x20,0x28,0x64,0x6f,
|
|
0x74,0x28,0x5f,0x32,0x35,0x31,0x2c,0x20,0x5f,0x32,0x36,0x38,0x29,0x20,0x2b,0x20,
|
|
0x28,0x28,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x35,0x32,
|
|
0x34,0x32,0x37,0x30,0x37,0x38,0x37,0x38,0x33,0x35,0x31,0x32,0x31,0x31,0x35,0x34,
|
|
0x37,0x38,0x35,0x65,0x2d,0x30,0x37,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,
|
|
0x5f,0x32,0x38,0x37,0x2e,0x69,0x73,0x5f,0x72,0x65,0x66,0x6c,0x65,0x63,0x74,0x69,
|
|
0x6f,0x6e,0x29,0x29,0x20,0x2a,0x20,0x5f,0x32,0x35,0x35,0x2e,0x73,0x68,0x69,0x6e,
|
|
0x69,0x6e,0x65,0x73,0x73,0x29,0x29,0x29,0x20,0x2a,0x20,0x5f,0x31,0x35,0x34,0x2e,
|
|
0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x43,0x6f,0x6c,0x6f,0x72,0x29,0x20,0x2a,
|
|
0x20,0x5f,0x31,0x35,0x34,0x2e,0x73,0x75,0x6e,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,
|
|
0x74,0x79,0x2c,0x20,0x72,0x65,0x66,0x74,0x65,0x78,0x2e,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x28,0x72,0x65,0x66,0x73,0x6d,0x70,0x2c,0x20,0x5f,0x33,0x34,0x35,0x29,0x2e,
|
|
0x78,0x79,0x7a,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x33,0x31,0x33,
|
|
0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x5f,0x31,0x35,0x34,0x2e,0x73,0x75,0x6e,0x4c,
|
|
0x69,0x67,0x68,0x74,0x43,0x6f,0x6c,0x6f,0x72,0x20,0x2a,0x20,0x5f,0x31,0x35,0x34,
|
|
0x2e,0x73,0x75,0x6e,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x29,0x20,0x2a,
|
|
0x20,0x70,0x6f,0x77,0x72,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,
|
|
0x30,0x2e,0x30,0x2c,0x20,0x64,0x6f,0x74,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,
|
|
0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,0x32,0x36,0x38,0x20,0x2b,0x20,
|
|
0x5f,0x32,0x36,0x33,0x29,0x2c,0x20,0x5f,0x32,0x35,0x31,0x29,0x29,0x2c,0x20,0x33,
|
|
0x32,0x2e,0x30,0x29,0x29,0x29,0x20,0x2a,0x20,0x31,0x2e,0x30,0x2c,0x20,0x6d,0x69,
|
|
0x78,0x28,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,
|
|
0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,
|
|
0x35,0x2c,0x20,0x5f,0x33,0x31,0x33,0x29,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,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,
|
|
0x2e,0x78,0x7a,0x20,0x2a,0x20,0x30,0x2e,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,
|
|
0x30,0x37,0x34,0x35,0x30,0x35,0x38,0x30,0x35,0x39,0x36,0x39,0x32,0x33,0x38,0x32,
|
|
0x38,0x31,0x32,0x35,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x5f,
|
|
0x31,0x35,0x34,0x2e,0x74,0x69,0x6d,0x65,0x20,0x2a,0x20,0x30,0x2e,0x30,0x30,0x39,
|
|
0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x37,0x36,0x34,0x38,0x32,0x35,0x38,0x32,0x30,
|
|
0x39,0x32,0x32,0x38,0x35,0x31,0x35,0x36,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x30,0x31,0x20,
|
|
0x3d,0x20,0x66,0x62,0x6d,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,
|
|
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,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x31,0x35,0x34,0x2e,0x64,0x65,0x65,0x70,
|
|
0x43,0x6f,0x6c,0x6f,0x72,0x29,0x20,0x2a,0x20,0x6d,0x69,0x78,0x28,0x30,0x2e,0x38,
|
|
0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,
|
|
0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x2c,0x20,0x31,0x2e,0x32,0x30,0x30,0x30,0x30,
|
|
0x30,0x30,0x34,0x37,0x36,0x38,0x33,0x37,0x31,0x35,0x38,0x32,0x30,0x33,0x31,0x32,
|
|
0x35,0x2c,0x20,0x5f,0x34,0x30,0x31,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
|
];
|
|
plane_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
|
desc: sg_shader_desc;
|
|
desc.label = "plane_shader";
|
|
if backend == {
|
|
case .GLCORE;
|
|
desc.vertex_func.source = xx *vs_plane_source_glsl430;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_plane_source_glsl430;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 80;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 5;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "plane_vs_params";
|
|
desc.uniform_blocks[1].stage = .FRAGMENT;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 160;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "_154.skyBase";
|
|
desc.uniform_blocks[1].glsl_uniforms[1].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[1].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[1].glsl_name = "_154.skyTop";
|
|
desc.uniform_blocks[1].glsl_uniforms[2].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[2].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[2].glsl_name = "_154.sunDisk";
|
|
desc.uniform_blocks[1].glsl_uniforms[3].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[3].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[3].glsl_name = "_154.horizonHalo";
|
|
desc.uniform_blocks[1].glsl_uniforms[4].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[4].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[4].glsl_name = "_154.sunHalo";
|
|
desc.uniform_blocks[1].glsl_uniforms[5].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[5].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[5].glsl_name = "_154.sunLightColor";
|
|
desc.uniform_blocks[1].glsl_uniforms[6].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[6].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[6].glsl_name = "_154.sunPosition";
|
|
desc.uniform_blocks[1].glsl_uniforms[7].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[7].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[7].glsl_name = "_154.sunIntensity";
|
|
desc.uniform_blocks[1].glsl_uniforms[8].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[8].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[8].glsl_name = "_154.skyIntensity";
|
|
desc.uniform_blocks[1].glsl_uniforms[9].type = .INT;
|
|
desc.uniform_blocks[1].glsl_uniforms[9].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[9].glsl_name = "_154.hasClouds";
|
|
desc.uniform_blocks[1].glsl_uniforms[10].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[10].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[10].glsl_name = "_154.planeHeight";
|
|
desc.uniform_blocks[1].glsl_uniforms[11].type = .INT;
|
|
desc.uniform_blocks[1].glsl_uniforms[11].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[11].glsl_name = "_154.planeType";
|
|
desc.uniform_blocks[1].glsl_uniforms[12].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[12].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[12].glsl_name = "_154.waterColor";
|
|
desc.uniform_blocks[1].glsl_uniforms[13].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[13].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[13].glsl_name = "_154.deepColor";
|
|
desc.uniform_blocks[1].glsl_uniforms[14].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[14].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[14].glsl_name = "_154.time";
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 48;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].type = .INT;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].glsl_name = "_255.screen_w";
|
|
desc.uniform_blocks[2].glsl_uniforms[1].type = .INT;
|
|
desc.uniform_blocks[2].glsl_uniforms[1].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[1].glsl_name = "_255.screen_h";
|
|
desc.uniform_blocks[2].glsl_uniforms[2].type = .INT;
|
|
desc.uniform_blocks[2].glsl_uniforms[2].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[2].glsl_name = "_255.is_reflection_pass";
|
|
desc.uniform_blocks[2].glsl_uniforms[3].type = .FLOAT3;
|
|
desc.uniform_blocks[2].glsl_uniforms[3].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[3].glsl_name = "_255.cameraPosition";
|
|
desc.uniform_blocks[2].glsl_uniforms[4].type = .FLOAT;
|
|
desc.uniform_blocks[2].glsl_uniforms[4].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[4].glsl_name = "_255.shininess";
|
|
desc.uniform_blocks[2].glsl_uniforms[5].type = .FLOAT;
|
|
desc.uniform_blocks[2].glsl_uniforms[5].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[5].glsl_name = "_255.reflectionDistortion";
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 80;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].type = .MAT4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].array_count = 0;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].glsl_name = "_287.mvp_shadow";
|
|
desc.uniform_blocks[3].glsl_uniforms[1].type = .INT;
|
|
desc.uniform_blocks[3].glsl_uniforms[1].array_count = 0;
|
|
desc.uniform_blocks[3].glsl_uniforms[1].glsl_name = "_287.is_reflection";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[3].stage = .FRAGMENT;
|
|
desc.images[3].multisampled = false;
|
|
desc.images[3].image_type = ._2D;
|
|
desc.images[3].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[3].stage = .FRAGMENT;
|
|
desc.samplers[3].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 3;
|
|
desc.image_sampler_pairs[0].sampler_slot = 3;
|
|
desc.image_sampler_pairs[0].glsl_name = "normal_map_normalsmp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 0;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].glsl_name = "reftex_refsmp";
|
|
case .GLES3;
|
|
desc.vertex_func.source = xx *vs_plane_source_glsl300es;
|
|
desc.vertex_func.entry = "main";
|
|
desc.fragment_func.source = xx *fs_plane_source_glsl300es;
|
|
desc.fragment_func.entry = "main";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.attrs[0].glsl_name = "position";
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 80;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 5;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "plane_vs_params";
|
|
desc.uniform_blocks[1].stage = .FRAGMENT;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 160;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "_154.skyBase";
|
|
desc.uniform_blocks[1].glsl_uniforms[1].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[1].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[1].glsl_name = "_154.skyTop";
|
|
desc.uniform_blocks[1].glsl_uniforms[2].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[2].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[2].glsl_name = "_154.sunDisk";
|
|
desc.uniform_blocks[1].glsl_uniforms[3].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[3].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[3].glsl_name = "_154.horizonHalo";
|
|
desc.uniform_blocks[1].glsl_uniforms[4].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[4].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[4].glsl_name = "_154.sunHalo";
|
|
desc.uniform_blocks[1].glsl_uniforms[5].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[5].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[5].glsl_name = "_154.sunLightColor";
|
|
desc.uniform_blocks[1].glsl_uniforms[6].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[6].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[6].glsl_name = "_154.sunPosition";
|
|
desc.uniform_blocks[1].glsl_uniforms[7].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[7].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[7].glsl_name = "_154.sunIntensity";
|
|
desc.uniform_blocks[1].glsl_uniforms[8].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[8].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[8].glsl_name = "_154.skyIntensity";
|
|
desc.uniform_blocks[1].glsl_uniforms[9].type = .INT;
|
|
desc.uniform_blocks[1].glsl_uniforms[9].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[9].glsl_name = "_154.hasClouds";
|
|
desc.uniform_blocks[1].glsl_uniforms[10].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[10].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[10].glsl_name = "_154.planeHeight";
|
|
desc.uniform_blocks[1].glsl_uniforms[11].type = .INT;
|
|
desc.uniform_blocks[1].glsl_uniforms[11].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[11].glsl_name = "_154.planeType";
|
|
desc.uniform_blocks[1].glsl_uniforms[12].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[12].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[12].glsl_name = "_154.waterColor";
|
|
desc.uniform_blocks[1].glsl_uniforms[13].type = .FLOAT3;
|
|
desc.uniform_blocks[1].glsl_uniforms[13].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[13].glsl_name = "_154.deepColor";
|
|
desc.uniform_blocks[1].glsl_uniforms[14].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[14].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[14].glsl_name = "_154.time";
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 48;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].type = .INT;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].glsl_name = "_255.screen_w";
|
|
desc.uniform_blocks[2].glsl_uniforms[1].type = .INT;
|
|
desc.uniform_blocks[2].glsl_uniforms[1].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[1].glsl_name = "_255.screen_h";
|
|
desc.uniform_blocks[2].glsl_uniforms[2].type = .INT;
|
|
desc.uniform_blocks[2].glsl_uniforms[2].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[2].glsl_name = "_255.is_reflection_pass";
|
|
desc.uniform_blocks[2].glsl_uniforms[3].type = .FLOAT3;
|
|
desc.uniform_blocks[2].glsl_uniforms[3].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[3].glsl_name = "_255.cameraPosition";
|
|
desc.uniform_blocks[2].glsl_uniforms[4].type = .FLOAT;
|
|
desc.uniform_blocks[2].glsl_uniforms[4].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[4].glsl_name = "_255.shininess";
|
|
desc.uniform_blocks[2].glsl_uniforms[5].type = .FLOAT;
|
|
desc.uniform_blocks[2].glsl_uniforms[5].array_count = 0;
|
|
desc.uniform_blocks[2].glsl_uniforms[5].glsl_name = "_255.reflectionDistortion";
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 80;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].type = .MAT4;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].array_count = 0;
|
|
desc.uniform_blocks[3].glsl_uniforms[0].glsl_name = "_287.mvp_shadow";
|
|
desc.uniform_blocks[3].glsl_uniforms[1].type = .INT;
|
|
desc.uniform_blocks[3].glsl_uniforms[1].array_count = 0;
|
|
desc.uniform_blocks[3].glsl_uniforms[1].glsl_name = "_287.is_reflection";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[3].stage = .FRAGMENT;
|
|
desc.images[3].multisampled = false;
|
|
desc.images[3].image_type = ._2D;
|
|
desc.images[3].sample_type = .FLOAT;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[3].stage = .FRAGMENT;
|
|
desc.samplers[3].sampler_type = .FILTERING;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 3;
|
|
desc.image_sampler_pairs[0].sampler_slot = 3;
|
|
desc.image_sampler_pairs[0].glsl_name = "normal_map_normalsmp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 0;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].glsl_name = "reftex_refsmp";
|
|
case .METAL_MACOS;
|
|
desc.vertex_func.source = xx *vs_plane_source_metal_macos;
|
|
desc.vertex_func.entry = "main0";
|
|
desc.fragment_func.source = xx *fs_plane_source_metal_macos;
|
|
desc.fragment_func.entry = "main0";
|
|
desc.attrs[0].base_type = .FLOAT;
|
|
desc.uniform_blocks[0].stage = .VERTEX;
|
|
desc.uniform_blocks[0].layout = .STD140;
|
|
desc.uniform_blocks[0].size = 80;
|
|
desc.uniform_blocks[0].msl_buffer_n = 0;
|
|
desc.uniform_blocks[1].stage = .FRAGMENT;
|
|
desc.uniform_blocks[1].layout = .STD140;
|
|
desc.uniform_blocks[1].size = 160;
|
|
desc.uniform_blocks[1].msl_buffer_n = 0;
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 48;
|
|
desc.uniform_blocks[2].msl_buffer_n = 1;
|
|
desc.uniform_blocks[3].stage = .FRAGMENT;
|
|
desc.uniform_blocks[3].layout = .STD140;
|
|
desc.uniform_blocks[3].size = 80;
|
|
desc.uniform_blocks[3].msl_buffer_n = 2;
|
|
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 = 1;
|
|
desc.images[3].stage = .FRAGMENT;
|
|
desc.images[3].multisampled = false;
|
|
desc.images[3].image_type = ._2D;
|
|
desc.images[3].sample_type = .FLOAT;
|
|
desc.images[3].msl_texture_n = 0;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 1;
|
|
desc.samplers[3].stage = .FRAGMENT;
|
|
desc.samplers[3].sampler_type = .FILTERING;
|
|
desc.samplers[3].msl_sampler_n = 0;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 3;
|
|
desc.image_sampler_pairs[0].sampler_slot = 3;
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 0;
|
|
desc.image_sampler_pairs[1].sampler_slot = 0;
|
|
}
|
|
return desc;
|
|
}
|