1597 lines
97 KiB
Plaintext
1597 lines
97 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_data':
|
|
Jai struct: Plane_Data
|
|
Bind slot: UB_plane_data => 2
|
|
Uniform block 'plane_world_config':
|
|
Jai struct: Plane_World_Config
|
|
Bind slot: UB_plane_world_config => 1
|
|
Image 'reftex':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_reftex => 0
|
|
Image 'groundtex':
|
|
Image type: ._2D
|
|
Sample type: .FLOAT
|
|
Multisampled: false
|
|
Bind slot: IMG_groundtex => 1
|
|
Image 'shadow':
|
|
Image type: ._2D
|
|
Sample type: .DEPTH
|
|
Multisampled: false
|
|
Bind slot: IMG_shadow => 2
|
|
Sampler 'refsmp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_refsmp => 0
|
|
Sampler 'groundsmp':
|
|
Type: .FILTERING
|
|
Bind slot: SMP_groundsmp => 1
|
|
Sampler 'shadowsmp':
|
|
Type: .COMPARISON
|
|
Bind slot: SMP_shadowsmp => 2
|
|
*/
|
|
ATTR_plane_position :: 0;
|
|
UB_plane_vs_params :: 0;
|
|
UB_plane_data :: 2;
|
|
UB_plane_world_config :: 1;
|
|
IMG_reftex :: 0;
|
|
IMG_groundtex :: 1;
|
|
IMG_shadow :: 2;
|
|
SMP_refsmp :: 0;
|
|
SMP_groundsmp :: 1;
|
|
SMP_shadowsmp :: 2;
|
|
Plane_Vs_Params :: struct {
|
|
mvp: [16]float;
|
|
};
|
|
Plane_Data :: struct {
|
|
screen_w: s32;
|
|
screen_h: s32;
|
|
is_reflection_pass: s32;
|
|
_: [4]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;
|
|
hasPlane: s32;
|
|
planeHeight: float;
|
|
planeType: s32;
|
|
time: float;
|
|
grassDensity: float;
|
|
_: [4]u8;
|
|
};
|
|
/*
|
|
#version 430
|
|
|
|
uniform vec4 plane_vs_params[4];
|
|
layout(location = 0) in vec4 position;
|
|
layout(location = 0) out vec4 pos;
|
|
layout(location = 1) flat out int idx;
|
|
|
|
void main()
|
|
{
|
|
vec4 _37 = vec4(position.xyz * 1000.0, 1.0);
|
|
gl_Position = mat4(plane_vs_params[0], plane_vs_params[1], plane_vs_params[2], plane_vs_params[3]) * _37;
|
|
pos = _37;
|
|
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,0x34,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,0x34,0x20,0x5f,0x33,0x37,0x20,0x3d,0x20,0x76,0x65,
|
|
0x63,0x34,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x78,0x79,0x7a,0x20,
|
|
0x2a,0x20,0x31,0x30,0x30,0x30,0x2e,0x30,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,0x33,0x37,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,0x5f,0x33,0x37,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
|
|
|
|
uniform ivec4 plane_data[1];
|
|
struct plane_world_config
|
|
{
|
|
vec3 skyBase;
|
|
vec3 skyTop;
|
|
vec3 sunDisk;
|
|
vec3 horizonHalo;
|
|
vec3 sunHalo;
|
|
vec3 sunLightColor;
|
|
vec3 sunPosition;
|
|
float sunIntensity;
|
|
float skyIntensity;
|
|
int hasClouds;
|
|
int hasPlane;
|
|
float planeHeight;
|
|
int planeType;
|
|
float time;
|
|
float grassDensity;
|
|
};
|
|
|
|
uniform plane_world_config _325;
|
|
|
|
layout(binding = 16) uniform sampler2D reftex_refsmp;
|
|
layout(binding = 17) uniform sampler2D groundtex_groundsmp;
|
|
layout(binding = 18) uniform sampler2DShadow shadow_shadowsmp;
|
|
|
|
layout(location = 0) in vec4 pos;
|
|
layout(location = 0) out vec4 frag_color;
|
|
layout(location = 1) flat in int idx;
|
|
|
|
uint murmurHash12(inout uvec2 src)
|
|
{
|
|
src *= uvec2(1540483477u);
|
|
src ^= (src >> uvec2(24u));
|
|
src *= uvec2(1540483477u);
|
|
uint _64 = ((3744546739u ^ src.x) * 1540483477u) ^ src.y;
|
|
uint _71 = (_64 ^ (_64 >> 13u)) * 1540483477u;
|
|
return _71 ^ (_71 >> 15u);
|
|
}
|
|
|
|
float hash12(vec2 src)
|
|
{
|
|
uvec2 param = floatBitsToUint(src);
|
|
uint _84 = murmurHash12(param);
|
|
return uintBitsToFloat((_84 & 8388607u) | 1065353216u) - 1.0;
|
|
}
|
|
|
|
vec3 get_ground_sample(vec4 pos_1, float dirX, float dirY)
|
|
{
|
|
vec4 _166 = texelFetch(groundtex_groundsmp, ivec2(int(floor(pos_1.x + dirX) + 500.0), int(floor(pos_1.z + dirY) + 500.0)), 0);
|
|
vec2 param = pos_1.xz;
|
|
vec2 param_1 = pos_1.xz;
|
|
if (_166.z == 1.0)
|
|
{
|
|
return texelFetch(reftex_refsmp, ivec2(int(gl_FragCoord.x), int(float(plane_data[0].y) - gl_FragCoord.y)), 0).xyz * vec3(0.949999988079071044921875, 1.0, 0.949999988079071044921875);
|
|
}
|
|
else
|
|
{
|
|
if (_166.x == 1.0)
|
|
{
|
|
return vec3(0.800000011920928955078125, 0.699999988079071044921875, 0.5) * mix(0.800000011920928955078125, 1.0, hash12(param));
|
|
}
|
|
else
|
|
{
|
|
return vec3(0.4000000059604644775390625, 0.800000011920928955078125, 0.300000011920928955078125) * mix(0.800000011920928955078125, 1.0, hash12(param_1));
|
|
}
|
|
}
|
|
}
|
|
|
|
int sign2(float x)
|
|
{
|
|
if (x < 0.0)
|
|
{
|
|
return -1;
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec4 _221 = round(pos * 16.0) * vec4(0.0625);
|
|
vec2 _236 = _221.xz - vec2(floor(_221.x) + 0.5, floor(_221.z) + 0.5);
|
|
float _240 = _236.x;
|
|
float _246 = _236.y;
|
|
vec4 param = _221;
|
|
float param_1 = 0.0;
|
|
float param_2 = 0.0;
|
|
float param_3 = _240;
|
|
vec4 param_4 = _221;
|
|
float param_5 = float(sign2(param_3));
|
|
float param_6 = 0.0;
|
|
float param_7 = _246;
|
|
vec4 param_8 = _221;
|
|
float param_9 = 0.0;
|
|
float param_10 = float(sign2(param_7));
|
|
float param_11 = _240;
|
|
float param_12 = _246;
|
|
vec4 param_13 = _221;
|
|
float param_14 = float(sign2(param_11));
|
|
float param_15 = float(sign2(param_12));
|
|
float _304 = texture(shadow_shadowsmp, vec3(vec3(0.0).xy, 0.0));
|
|
vec3 _309 = vec3(smoothstep(0.20000000298023223876953125, 0.5, abs(_240)) * 0.5);
|
|
if (_325.planeType == 1)
|
|
{
|
|
frag_color = vec4(mix(mix(get_ground_sample(param, param_1, param_2), get_ground_sample(param_4, param_5, param_6), _309), mix(get_ground_sample(param_8, param_9, param_10), get_ground_sample(param_13, param_14, param_15), _309), vec3(smoothstep(0.20000000298023223876953125, 0.5, abs(_246)) * 0.5)), 1.0);
|
|
}
|
|
else
|
|
{
|
|
frag_color = vec4(_304, _304, _304, 1.0);
|
|
}
|
|
}
|
|
|
|
*/
|
|
fs_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,0x69,0x76,0x65,0x63,0x34,0x20,0x70,0x6c,0x61,0x6e,
|
|
0x65,0x5f,0x64,0x61,0x74,0x61,0x5b,0x31,0x5d,0x3b,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,0x69,0x6e,0x74,0x20,0x68,0x61,0x73,
|
|
0x50,0x6c,0x61,0x6e,0x65,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,0x20,0x74,0x69,0x6d,0x65,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x72,0x61,0x73,0x73,
|
|
0x44,0x65,0x6e,0x73,0x69,0x74,0x79,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,0x33,0x32,0x35,0x3b,0x0a,0x0a,0x6c,
|
|
0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,
|
|
0x31,0x36,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x72,0x32,0x44,0x20,0x72,0x65,0x66,0x74,0x65,0x78,0x5f,0x72,0x65,0x66,
|
|
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,0x67,0x72,0x6f,0x75,
|
|
0x6e,0x64,0x74,0x65,0x78,0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,0x73,0x6d,0x70,0x3b,
|
|
0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,
|
|
0x3d,0x20,0x31,0x38,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x53,0x68,0x61,0x64,0x6f,0x77,0x20,0x73,0x68,
|
|
0x61,0x64,0x6f,0x77,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x73,0x6d,0x70,0x3b,0x0a,
|
|
0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
|
|
0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,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,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,0x0a,0x75,0x69,0x6e,0x74,0x20,0x6d,0x75,0x72,0x6d,0x75,0x72,0x48,
|
|
0x61,0x73,0x68,0x31,0x32,0x28,0x69,0x6e,0x6f,0x75,0x74,0x20,0x75,0x76,0x65,0x63,
|
|
0x32,0x20,0x73,0x72,0x63,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x73,0x72,0x63,
|
|
0x20,0x2a,0x3d,0x20,0x75,0x76,0x65,0x63,0x32,0x28,0x31,0x35,0x34,0x30,0x34,0x38,
|
|
0x33,0x34,0x37,0x37,0x75,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x20,
|
|
0x5e,0x3d,0x20,0x28,0x73,0x72,0x63,0x20,0x3e,0x3e,0x20,0x75,0x76,0x65,0x63,0x32,
|
|
0x28,0x32,0x34,0x75,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x20,
|
|
0x2a,0x3d,0x20,0x75,0x76,0x65,0x63,0x32,0x28,0x31,0x35,0x34,0x30,0x34,0x38,0x33,
|
|
0x34,0x37,0x37,0x75,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x20,
|
|
0x5f,0x36,0x34,0x20,0x3d,0x20,0x28,0x28,0x33,0x37,0x34,0x34,0x35,0x34,0x36,0x37,
|
|
0x33,0x39,0x75,0x20,0x5e,0x20,0x73,0x72,0x63,0x2e,0x78,0x29,0x20,0x2a,0x20,0x31,
|
|
0x35,0x34,0x30,0x34,0x38,0x33,0x34,0x37,0x37,0x75,0x29,0x20,0x5e,0x20,0x73,0x72,
|
|
0x63,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x20,0x5f,0x37,
|
|
0x31,0x20,0x3d,0x20,0x28,0x5f,0x36,0x34,0x20,0x5e,0x20,0x28,0x5f,0x36,0x34,0x20,
|
|
0x3e,0x3e,0x20,0x31,0x33,0x75,0x29,0x29,0x20,0x2a,0x20,0x31,0x35,0x34,0x30,0x34,
|
|
0x38,0x33,0x34,0x37,0x37,0x75,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x5f,0x37,0x31,0x20,0x5e,0x20,0x28,0x5f,0x37,0x31,0x20,0x3e,0x3e,
|
|
0x20,0x31,0x35,0x75,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x68,0x61,0x73,0x68,0x31,0x32,0x28,0x76,0x65,0x63,0x32,0x20,0x73,0x72,0x63,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x42,0x69,0x74,0x73,0x54,0x6f,
|
|
0x55,0x69,0x6e,0x74,0x28,0x73,0x72,0x63,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,
|
|
0x69,0x6e,0x74,0x20,0x5f,0x38,0x34,0x20,0x3d,0x20,0x6d,0x75,0x72,0x6d,0x75,0x72,
|
|
0x48,0x61,0x73,0x68,0x31,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x75,0x69,0x6e,0x74,0x42,0x69,
|
|
0x74,0x73,0x54,0x6f,0x46,0x6c,0x6f,0x61,0x74,0x28,0x28,0x5f,0x38,0x34,0x20,0x26,
|
|
0x20,0x38,0x33,0x38,0x38,0x36,0x30,0x37,0x75,0x29,0x20,0x7c,0x20,0x31,0x30,0x36,
|
|
0x35,0x33,0x35,0x33,0x32,0x31,0x36,0x75,0x29,0x20,0x2d,0x20,0x31,0x2e,0x30,0x3b,
|
|
0x0a,0x7d,0x0a,0x0a,0x76,0x65,0x63,0x33,0x20,0x67,0x65,0x74,0x5f,0x67,0x72,0x6f,
|
|
0x75,0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x76,0x65,0x63,0x34,0x20,
|
|
0x70,0x6f,0x73,0x5f,0x31,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x69,0x72,
|
|
0x58,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x69,0x72,0x59,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x36,0x36,0x20,0x3d,
|
|
0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,0x63,0x68,0x28,0x67,0x72,0x6f,0x75,
|
|
0x6e,0x64,0x74,0x65,0x78,0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,0x73,0x6d,0x70,0x2c,
|
|
0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x69,0x6e,0x74,0x28,0x66,0x6c,0x6f,0x6f,0x72,
|
|
0x28,0x70,0x6f,0x73,0x5f,0x31,0x2e,0x78,0x20,0x2b,0x20,0x64,0x69,0x72,0x58,0x29,
|
|
0x20,0x2b,0x20,0x35,0x30,0x30,0x2e,0x30,0x29,0x2c,0x20,0x69,0x6e,0x74,0x28,0x66,
|
|
0x6c,0x6f,0x6f,0x72,0x28,0x70,0x6f,0x73,0x5f,0x31,0x2e,0x7a,0x20,0x2b,0x20,0x64,
|
|
0x69,0x72,0x59,0x29,0x20,0x2b,0x20,0x35,0x30,0x30,0x2e,0x30,0x29,0x29,0x2c,0x20,
|
|
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x20,0x3d,0x20,0x70,0x6f,0x73,0x5f,0x31,0x2e,0x78,0x7a,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,
|
|
0x3d,0x20,0x70,0x6f,0x73,0x5f,0x31,0x2e,0x78,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x69,0x66,0x20,0x28,0x5f,0x31,0x36,0x36,0x2e,0x7a,0x20,0x3d,0x3d,0x20,0x31,0x2e,
|
|
0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,0x74,
|
|
0x63,0x68,0x28,0x72,0x65,0x66,0x74,0x65,0x78,0x5f,0x72,0x65,0x66,0x73,0x6d,0x70,
|
|
0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x46,
|
|
0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x29,0x2c,0x20,0x69,0x6e,0x74,
|
|
0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x70,0x6c,0x61,0x6e,0x65,0x5f,0x64,0x61,0x74,
|
|
0x61,0x5b,0x30,0x5d,0x2e,0x79,0x29,0x20,0x2d,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,
|
|
0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x79,0x29,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,
|
|
0x79,0x7a,0x20,0x2a,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x39,0x34,0x39,0x39,
|
|
0x39,0x39,0x39,0x38,0x38,0x30,0x37,0x39,0x30,0x37,0x31,0x30,0x34,0x34,0x39,0x32,
|
|
0x31,0x38,0x37,0x35,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x39,0x34,0x39,
|
|
0x39,0x39,0x39,0x39,0x38,0x38,0x30,0x37,0x39,0x30,0x37,0x31,0x30,0x34,0x34,0x39,
|
|
0x32,0x31,0x38,0x37,0x35,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,0x69,0x66,0x20,0x28,0x5f,0x31,0x36,0x36,0x2e,0x78,0x20,
|
|
0x3d,0x3d,0x20,0x31,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,
|
|
0x74,0x75,0x72,0x6e,0x20,0x76,0x65,0x63,0x33,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,0x30,0x2e,0x36,0x39,0x39,0x39,0x39,0x39,0x39,0x38,
|
|
0x38,0x30,0x37,0x39,0x30,0x37,0x31,0x30,0x34,0x34,0x39,0x32,0x31,0x38,0x37,0x35,
|
|
0x2c,0x20,0x30,0x2e,0x35,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,0x30,0x2c,0x20,0x68,0x61,
|
|
0x73,0x68,0x31,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x76,0x65,0x63,0x33,0x28,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,0x2c,0x20,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,
|
|
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,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,
|
|
0x30,0x2c,0x20,0x68,0x61,0x73,0x68,0x31,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x31,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x7d,0x0a,0x0a,0x69,0x6e,0x74,0x20,0x73,0x69,0x67,0x6e,
|
|
0x32,0x28,0x66,0x6c,0x6f,0x61,0x74,0x20,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x69,0x66,0x20,0x28,0x78,0x20,0x3c,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
|
0x72,0x6e,0x20,0x2d,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
|
|
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x31,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,
|
|
0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x5f,0x32,0x32,0x31,0x20,0x3d,0x20,0x72,0x6f,0x75,0x6e,
|
|
0x64,0x28,0x70,0x6f,0x73,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2a,0x20,
|
|
0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x33,0x36,0x20,0x3d,0x20,0x5f,0x32,
|
|
0x32,0x31,0x2e,0x78,0x7a,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x66,0x6c,0x6f,
|
|
0x6f,0x72,0x28,0x5f,0x32,0x32,0x31,0x2e,0x78,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,
|
|
0x2c,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x5f,0x32,0x32,0x31,0x2e,0x7a,0x29,0x20,
|
|
0x2b,0x20,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x5f,0x32,0x34,0x30,0x20,0x3d,0x20,0x5f,0x32,0x33,0x36,0x2e,0x78,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x34,0x36,0x20,
|
|
0x3d,0x20,0x5f,0x32,0x33,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,
|
|
0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x32,0x32,0x31,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x31,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x30,0x2e,
|
|
0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x32,0x34,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,
|
|
0x5f,0x32,0x32,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,
|
|
0x73,0x69,0x67,0x6e,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x36,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x32,
|
|
0x34,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x38,0x20,0x3d,0x20,0x5f,0x32,0x32,0x31,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x39,0x20,0x3d,
|
|
0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x30,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x28,0x73,0x69,0x67,0x6e,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x29,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x31,0x20,0x3d,0x20,0x5f,0x32,0x34,0x30,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x32,0x20,
|
|
0x3d,0x20,0x5f,0x32,0x34,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x33,0x20,0x3d,0x20,0x5f,0x32,0x32,0x31,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x34,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x73,0x69,0x67,
|
|
0x6e,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x31,0x29,0x29,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
|
0x35,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x73,0x69,0x67,0x6e,0x32,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x32,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x30,0x34,0x20,0x3d,0x20,0x74,0x65,0x78,
|
|
0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x5f,0x73,0x68,0x61,0x64,
|
|
0x6f,0x77,0x73,0x6d,0x70,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x76,0x65,0x63,0x33,
|
|
0x28,0x30,0x2e,0x30,0x29,0x2e,0x78,0x79,0x2c,0x20,0x30,0x2e,0x30,0x29,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x30,0x39,0x20,0x3d,
|
|
0x20,0x76,0x65,0x63,0x33,0x28,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,
|
|
0x28,0x30,0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,0x30,0x32,
|
|
0x33,0x32,0x32,0x33,0x38,0x37,0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,
|
|
0x2e,0x35,0x2c,0x20,0x61,0x62,0x73,0x28,0x5f,0x32,0x34,0x30,0x29,0x29,0x20,0x2a,
|
|
0x20,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,
|
|
0x33,0x32,0x35,0x2e,0x70,0x6c,0x61,0x6e,0x65,0x54,0x79,0x70,0x65,0x20,0x3d,0x3d,
|
|
0x20,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,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,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,0x67,0x65,0x74,0x5f,
|
|
0x67,0x72,0x6f,0x75,0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x70,0x61,
|
|
0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x32,0x29,0x2c,0x20,0x67,0x65,0x74,0x5f,0x67,0x72,0x6f,0x75,
|
|
0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x34,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x2c,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x36,0x29,0x2c,0x20,0x5f,0x33,0x30,0x39,0x29,0x2c,0x20,0x6d,0x69,0x78,
|
|
0x28,0x67,0x65,0x74,0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x2c,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x39,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x30,0x29,0x2c,0x20,
|
|
0x67,0x65,0x74,0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,0x6c,
|
|
0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x33,0x2c,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x31,0x34,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x35,0x29,0x2c,
|
|
0x20,0x5f,0x33,0x30,0x39,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x73,0x6d,0x6f,
|
|
0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x32,0x30,0x30,0x30,0x30,0x30,
|
|
0x30,0x30,0x32,0x39,0x38,0x30,0x32,0x33,0x32,0x32,0x33,0x38,0x37,0x36,0x39,0x35,
|
|
0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x61,0x62,0x73,0x28,0x5f,
|
|
0x32,0x34,0x36,0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x29,0x2c,0x20,0x31,
|
|
0x2e,0x30,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,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x34,0x28,0x5f,0x33,0x30,0x34,0x2c,0x20,0x5f,0x33,0x30,0x34,0x2c,0x20,
|
|
0x5f,0x33,0x30,0x34,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[4];
|
|
layout(location = 0) in vec4 position;
|
|
out vec4 pos;
|
|
flat out int idx;
|
|
|
|
void main()
|
|
{
|
|
vec4 _37 = vec4(position.xyz * 1000.0, 1.0);
|
|
gl_Position = mat4(plane_vs_params[0], plane_vs_params[1], plane_vs_params[2], plane_vs_params[3]) * _37;
|
|
pos = _37;
|
|
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,0x34,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,0x34,
|
|
0x20,0x5f,0x33,0x37,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x70,0x6f,0x73,0x69,
|
|
0x74,0x69,0x6f,0x6e,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x31,0x30,0x30,0x30,0x2e,
|
|
0x30,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,0x33,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,
|
|
0x20,0x5f,0x33,0x37,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;
|
|
|
|
uniform ivec4 plane_data[1];
|
|
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;
|
|
int hasPlane;
|
|
highp float planeHeight;
|
|
int planeType;
|
|
highp float time;
|
|
highp float grassDensity;
|
|
};
|
|
|
|
uniform plane_world_config _325;
|
|
|
|
uniform highp sampler2D reftex_refsmp;
|
|
uniform highp sampler2D groundtex_groundsmp;
|
|
uniform highp sampler2DShadow shadow_shadowsmp;
|
|
|
|
in highp vec4 pos;
|
|
layout(location = 0) out highp vec4 frag_color;
|
|
flat in int idx;
|
|
|
|
uint murmurHash12(inout uvec2 src)
|
|
{
|
|
src *= uvec2(1540483477u);
|
|
src ^= (src >> uvec2(24u));
|
|
src *= uvec2(1540483477u);
|
|
uint _64 = ((3744546739u ^ src.x) * 1540483477u) ^ src.y;
|
|
uint _71 = (_64 ^ (_64 >> 13u)) * 1540483477u;
|
|
return _71 ^ (_71 >> 15u);
|
|
}
|
|
|
|
highp float hash12(highp vec2 src)
|
|
{
|
|
uvec2 param = floatBitsToUint(src);
|
|
uint _84 = murmurHash12(param);
|
|
return uintBitsToFloat((_84 & 8388607u) | 1065353216u) - 1.0;
|
|
}
|
|
|
|
highp vec3 get_ground_sample(highp vec4 pos_1, highp float dirX, highp float dirY)
|
|
{
|
|
highp vec4 _166 = texelFetch(groundtex_groundsmp, ivec2(int(floor(pos_1.x + dirX) + 500.0), int(floor(pos_1.z + dirY) + 500.0)), 0);
|
|
highp vec2 param = pos_1.xz;
|
|
highp vec2 param_1 = pos_1.xz;
|
|
if (_166.z == 1.0)
|
|
{
|
|
return texelFetch(reftex_refsmp, ivec2(int(gl_FragCoord.x), int(float(plane_data[0].y) - gl_FragCoord.y)), 0).xyz * vec3(0.949999988079071044921875, 1.0, 0.949999988079071044921875);
|
|
}
|
|
else
|
|
{
|
|
if (_166.x == 1.0)
|
|
{
|
|
return vec3(0.800000011920928955078125, 0.699999988079071044921875, 0.5) * mix(0.800000011920928955078125, 1.0, hash12(param));
|
|
}
|
|
else
|
|
{
|
|
return vec3(0.4000000059604644775390625, 0.800000011920928955078125, 0.300000011920928955078125) * mix(0.800000011920928955078125, 1.0, hash12(param_1));
|
|
}
|
|
}
|
|
}
|
|
|
|
int sign2(highp float x)
|
|
{
|
|
if (x < 0.0)
|
|
{
|
|
return -1;
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
highp vec4 _221 = round(pos * 16.0) * vec4(0.0625);
|
|
highp vec2 _236 = _221.xz - vec2(floor(_221.x) + 0.5, floor(_221.z) + 0.5);
|
|
highp float _240 = _236.x;
|
|
highp float _246 = _236.y;
|
|
highp vec4 param = _221;
|
|
highp float param_1 = 0.0;
|
|
highp float param_2 = 0.0;
|
|
highp float param_3 = _240;
|
|
highp vec4 param_4 = _221;
|
|
highp float param_5 = float(sign2(param_3));
|
|
highp float param_6 = 0.0;
|
|
highp float param_7 = _246;
|
|
highp vec4 param_8 = _221;
|
|
highp float param_9 = 0.0;
|
|
highp float param_10 = float(sign2(param_7));
|
|
highp float param_11 = _240;
|
|
highp float param_12 = _246;
|
|
highp vec4 param_13 = _221;
|
|
highp float param_14 = float(sign2(param_11));
|
|
highp float param_15 = float(sign2(param_12));
|
|
highp float _304 = texture(shadow_shadowsmp, vec3(vec3(0.0).xy, 0.0));
|
|
highp vec3 _309 = vec3(smoothstep(0.20000000298023223876953125, 0.5, abs(_240)) * 0.5);
|
|
if (_325.planeType == 1)
|
|
{
|
|
frag_color = vec4(mix(mix(get_ground_sample(param, param_1, param_2), get_ground_sample(param_4, param_5, param_6), _309), mix(get_ground_sample(param_8, param_9, param_10), get_ground_sample(param_13, param_14, param_15), _309), vec3(smoothstep(0.20000000298023223876953125, 0.5, abs(_246)) * 0.5)), 1.0);
|
|
}
|
|
else
|
|
{
|
|
frag_color = vec4(_304, _304, _304, 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,0x75,
|
|
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x69,0x76,0x65,0x63,0x34,0x20,0x70,0x6c,0x61,
|
|
0x6e,0x65,0x5f,0x64,0x61,0x74,0x61,0x5b,0x31,0x5d,0x3b,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,
|
|
0x69,0x6e,0x74,0x20,0x68,0x61,0x73,0x50,0x6c,0x61,0x6e,0x65,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,0x66,0x6c,0x6f,0x61,0x74,0x20,0x74,0x69,
|
|
0x6d,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x67,0x72,0x61,0x73,0x73,0x44,0x65,0x6e,0x73,0x69,0x74,0x79,
|
|
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,0x33,0x32,0x35,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,
|
|
0x72,0x65,0x66,0x74,0x65,0x78,0x5f,0x72,0x65,0x66,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,0x67,0x72,0x6f,0x75,0x6e,0x64,0x74,0x65,0x78,
|
|
0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,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,0x53,0x68,0x61,0x64,0x6f,0x77,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,
|
|
0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x73,0x6d,0x70,0x3b,0x0a,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,
|
|
0x66,0x6c,0x61,0x74,0x20,0x69,0x6e,0x20,0x69,0x6e,0x74,0x20,0x69,0x64,0x78,0x3b,
|
|
0x0a,0x0a,0x75,0x69,0x6e,0x74,0x20,0x6d,0x75,0x72,0x6d,0x75,0x72,0x48,0x61,0x73,
|
|
0x68,0x31,0x32,0x28,0x69,0x6e,0x6f,0x75,0x74,0x20,0x75,0x76,0x65,0x63,0x32,0x20,
|
|
0x73,0x72,0x63,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x20,0x2a,
|
|
0x3d,0x20,0x75,0x76,0x65,0x63,0x32,0x28,0x31,0x35,0x34,0x30,0x34,0x38,0x33,0x34,
|
|
0x37,0x37,0x75,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x20,0x5e,0x3d,
|
|
0x20,0x28,0x73,0x72,0x63,0x20,0x3e,0x3e,0x20,0x75,0x76,0x65,0x63,0x32,0x28,0x32,
|
|
0x34,0x75,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x20,0x2a,0x3d,
|
|
0x20,0x75,0x76,0x65,0x63,0x32,0x28,0x31,0x35,0x34,0x30,0x34,0x38,0x33,0x34,0x37,
|
|
0x37,0x75,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x20,0x5f,0x36,
|
|
0x34,0x20,0x3d,0x20,0x28,0x28,0x33,0x37,0x34,0x34,0x35,0x34,0x36,0x37,0x33,0x39,
|
|
0x75,0x20,0x5e,0x20,0x73,0x72,0x63,0x2e,0x78,0x29,0x20,0x2a,0x20,0x31,0x35,0x34,
|
|
0x30,0x34,0x38,0x33,0x34,0x37,0x37,0x75,0x29,0x20,0x5e,0x20,0x73,0x72,0x63,0x2e,
|
|
0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x20,0x5f,0x37,0x31,0x20,
|
|
0x3d,0x20,0x28,0x5f,0x36,0x34,0x20,0x5e,0x20,0x28,0x5f,0x36,0x34,0x20,0x3e,0x3e,
|
|
0x20,0x31,0x33,0x75,0x29,0x29,0x20,0x2a,0x20,0x31,0x35,0x34,0x30,0x34,0x38,0x33,
|
|
0x34,0x37,0x37,0x75,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
|
|
0x20,0x5f,0x37,0x31,0x20,0x5e,0x20,0x28,0x5f,0x37,0x31,0x20,0x3e,0x3e,0x20,0x31,
|
|
0x35,0x75,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x68,0x61,0x73,0x68,0x31,0x32,0x28,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x32,0x20,0x73,0x72,0x63,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x75,0x76,0x65,0x63,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x42,0x69,0x74,0x73,0x54,0x6f,0x55,0x69,0x6e,0x74,0x28,0x73,
|
|
0x72,0x63,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x20,0x5f,0x38,
|
|
0x34,0x20,0x3d,0x20,0x6d,0x75,0x72,0x6d,0x75,0x72,0x48,0x61,0x73,0x68,0x31,0x32,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,
|
|
0x75,0x72,0x6e,0x20,0x75,0x69,0x6e,0x74,0x42,0x69,0x74,0x73,0x54,0x6f,0x46,0x6c,
|
|
0x6f,0x61,0x74,0x28,0x28,0x5f,0x38,0x34,0x20,0x26,0x20,0x38,0x33,0x38,0x38,0x36,
|
|
0x30,0x37,0x75,0x29,0x20,0x7c,0x20,0x31,0x30,0x36,0x35,0x33,0x35,0x33,0x32,0x31,
|
|
0x36,0x75,0x29,0x20,0x2d,0x20,0x31,0x2e,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,0x69,
|
|
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x67,0x65,0x74,0x5f,0x67,0x72,0x6f,
|
|
0x75,0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,0x5f,0x31,0x2c,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x69,0x72,0x58,0x2c,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x69,0x72,0x59,0x29,
|
|
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
|
0x34,0x20,0x5f,0x31,0x36,0x36,0x20,0x3d,0x20,0x74,0x65,0x78,0x65,0x6c,0x46,0x65,
|
|
0x74,0x63,0x68,0x28,0x67,0x72,0x6f,0x75,0x6e,0x64,0x74,0x65,0x78,0x5f,0x67,0x72,
|
|
0x6f,0x75,0x6e,0x64,0x73,0x6d,0x70,0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x69,
|
|
0x6e,0x74,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x70,0x6f,0x73,0x5f,0x31,0x2e,0x78,
|
|
0x20,0x2b,0x20,0x64,0x69,0x72,0x58,0x29,0x20,0x2b,0x20,0x35,0x30,0x30,0x2e,0x30,
|
|
0x29,0x2c,0x20,0x69,0x6e,0x74,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x70,0x6f,0x73,
|
|
0x5f,0x31,0x2e,0x7a,0x20,0x2b,0x20,0x64,0x69,0x72,0x59,0x29,0x20,0x2b,0x20,0x35,
|
|
0x30,0x30,0x2e,0x30,0x29,0x29,0x2c,0x20,0x30,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,0x70,0x6f,0x73,0x5f,0x31,0x2e,0x78,0x7a,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,0x70,0x6f,0x73,0x5f,0x31,0x2e,0x78,0x7a,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x36,0x36,0x2e,0x7a,0x20,0x3d,
|
|
0x3d,0x20,0x31,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x74,0x65,0x78,0x65,
|
|
0x6c,0x46,0x65,0x74,0x63,0x68,0x28,0x72,0x65,0x66,0x74,0x65,0x78,0x5f,0x72,0x65,
|
|
0x66,0x73,0x6d,0x70,0x2c,0x20,0x69,0x76,0x65,0x63,0x32,0x28,0x69,0x6e,0x74,0x28,
|
|
0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x78,0x29,0x2c,
|
|
0x20,0x69,0x6e,0x74,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x70,0x6c,0x61,0x6e,0x65,
|
|
0x5f,0x64,0x61,0x74,0x61,0x5b,0x30,0x5d,0x2e,0x79,0x29,0x20,0x2d,0x20,0x67,0x6c,
|
|
0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x79,0x29,0x29,0x2c,0x20,
|
|
0x30,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,
|
|
0x39,0x34,0x39,0x39,0x39,0x39,0x39,0x38,0x38,0x30,0x37,0x39,0x30,0x37,0x31,0x30,
|
|
0x34,0x34,0x39,0x32,0x31,0x38,0x37,0x35,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,
|
|
0x2e,0x39,0x34,0x39,0x39,0x39,0x39,0x39,0x38,0x38,0x30,0x37,0x39,0x30,0x37,0x31,
|
|
0x30,0x34,0x34,0x39,0x32,0x31,0x38,0x37,0x35,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,0x69,0x66,0x20,0x28,0x5f,0x31,0x36,
|
|
0x36,0x2e,0x78,0x20,0x3d,0x3d,0x20,0x31,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x65,0x63,0x33,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,0x30,0x2e,0x36,0x39,0x39,0x39,
|
|
0x39,0x39,0x39,0x38,0x38,0x30,0x37,0x39,0x30,0x37,0x31,0x30,0x34,0x34,0x39,0x32,
|
|
0x31,0x38,0x37,0x35,0x2c,0x20,0x30,0x2e,0x35,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,0x30,
|
|
0x2c,0x20,0x68,0x61,0x73,0x68,0x31,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,
|
|
0x65,0x74,0x75,0x72,0x6e,0x20,0x76,0x65,0x63,0x33,0x28,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,0x2c,0x20,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,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,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,0x30,0x2c,0x20,0x68,0x61,0x73,0x68,0x31,0x32,0x28,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x31,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x7d,0x0a,0x0a,0x69,0x6e,0x74,0x20,
|
|
0x73,0x69,0x67,0x6e,0x32,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x78,
|
|
0x20,0x3c,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x2d,0x31,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x31,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,
|
|
0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x5f,0x32,0x32,0x31,0x20,0x3d,0x20,0x72,0x6f,0x75,0x6e,
|
|
0x64,0x28,0x70,0x6f,0x73,0x20,0x2a,0x20,0x31,0x36,0x2e,0x30,0x29,0x20,0x2a,0x20,
|
|
0x76,0x65,0x63,0x34,0x28,0x30,0x2e,0x30,0x36,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x5f,0x32,0x33,
|
|
0x36,0x20,0x3d,0x20,0x5f,0x32,0x32,0x31,0x2e,0x78,0x7a,0x20,0x2d,0x20,0x76,0x65,
|
|
0x63,0x32,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x5f,0x32,0x32,0x31,0x2e,0x78,0x29,
|
|
0x20,0x2b,0x20,0x30,0x2e,0x35,0x2c,0x20,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x5f,0x32,
|
|
0x32,0x31,0x2e,0x7a,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,
|
|
0x34,0x30,0x20,0x3d,0x20,0x5f,0x32,0x33,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x34,
|
|
0x36,0x20,0x3d,0x20,0x5f,0x32,0x33,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x20,0x3d,0x20,0x5f,0x32,0x32,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
|
0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,
|
|
0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,
|
|
0x20,0x5f,0x32,0x34,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,
|
|
0x5f,0x32,0x32,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x28,0x73,0x69,0x67,0x6e,0x32,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x33,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x20,0x3d,
|
|
0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,
|
|
0x5f,0x32,0x34,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x20,0x3d,0x20,0x5f,
|
|
0x32,0x32,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x39,0x20,0x3d,0x20,0x30,
|
|
0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x30,0x20,0x3d,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x28,0x73,0x69,0x67,0x6e,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x37,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x31,0x20,0x3d,
|
|
0x20,0x5f,0x32,0x34,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x32,0x20,
|
|
0x3d,0x20,0x5f,0x32,0x34,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x33,0x20,
|
|
0x3d,0x20,0x5f,0x32,0x32,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
|
|
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x34,
|
|
0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x73,0x69,0x67,0x6e,0x32,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x31,0x31,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
|
|
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x31,0x35,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x73,0x69,0x67,0x6e,
|
|
0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x32,0x29,0x29,0x3b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,
|
|
0x30,0x34,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x73,0x68,0x61,
|
|
0x64,0x6f,0x77,0x5f,0x73,0x68,0x61,0x64,0x6f,0x77,0x73,0x6d,0x70,0x2c,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x2e,0x78,0x79,
|
|
0x2c,0x20,0x30,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,
|
|
0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x33,0x30,0x39,0x20,0x3d,0x20,0x76,
|
|
0x65,0x63,0x33,0x28,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,
|
|
0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,0x30,0x32,0x33,0x32,
|
|
0x32,0x33,0x38,0x37,0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x35,
|
|
0x2c,0x20,0x61,0x62,0x73,0x28,0x5f,0x32,0x34,0x30,0x29,0x29,0x20,0x2a,0x20,0x30,
|
|
0x2e,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x33,0x32,
|
|
0x35,0x2e,0x70,0x6c,0x61,0x6e,0x65,0x54,0x79,0x70,0x65,0x20,0x3d,0x3d,0x20,0x31,
|
|
0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,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,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,0x67,0x65,0x74,0x5f,0x67,0x72,
|
|
0x6f,0x75,0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x70,0x61,0x72,0x61,
|
|
0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,0x70,0x61,0x72,0x61,
|
|
0x6d,0x5f,0x32,0x29,0x2c,0x20,0x67,0x65,0x74,0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,
|
|
0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x2c,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x36,0x29,0x2c,0x20,0x5f,0x33,0x30,0x39,0x29,0x2c,0x20,0x6d,0x69,0x78,0x28,0x67,
|
|
0x65,0x74,0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x39,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x30,0x29,0x2c,0x20,0x67,0x65,
|
|
0x74,0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x33,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x31,0x34,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x35,0x29,0x2c,0x20,0x5f,
|
|
0x33,0x30,0x39,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x73,0x6d,0x6f,0x6f,0x74,
|
|
0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
|
|
0x32,0x39,0x38,0x30,0x32,0x33,0x32,0x32,0x33,0x38,0x37,0x36,0x39,0x35,0x33,0x31,
|
|
0x32,0x35,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x61,0x62,0x73,0x28,0x5f,0x32,0x34,
|
|
0x36,0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,
|
|
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,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,
|
|
0x34,0x28,0x5f,0x33,0x30,0x34,0x2c,0x20,0x5f,0x33,0x30,0x34,0x2c,0x20,0x5f,0x33,
|
|
0x30,0x34,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;
|
|
};
|
|
|
|
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& _28 [[buffer(0)]], uint gl_InstanceIndex [[instance_id]])
|
|
{
|
|
main0_out out = {};
|
|
float4 _37 = float4(in.position.xyz * 1000.0, 1.0);
|
|
out.gl_Position = _28.mvp * _37;
|
|
out.pos = _37;
|
|
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,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,0x38,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,0x34,0x20,0x5f,0x33,0x37,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x34,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x78,
|
|
0x79,0x7a,0x20,0x2a,0x20,0x31,0x30,0x30,0x30,0x2e,0x30,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,0x38,0x2e,0x6d,0x76,0x70,
|
|
0x20,0x2a,0x20,0x5f,0x33,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
|
|
0x70,0x6f,0x73,0x20,0x3d,0x20,0x5f,0x33,0x37,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_data
|
|
{
|
|
int screen_w;
|
|
int screen_h;
|
|
int is_reflection_pass;
|
|
};
|
|
|
|
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;
|
|
int hasPlane;
|
|
float planeHeight;
|
|
int planeType;
|
|
float time;
|
|
float grassDensity;
|
|
};
|
|
|
|
struct main0_out
|
|
{
|
|
float4 frag_color [[color(0)]];
|
|
};
|
|
|
|
struct main0_in
|
|
{
|
|
float4 pos [[user(locn0)]];
|
|
};
|
|
|
|
static inline __attribute__((always_inline))
|
|
uint murmurHash12(thread uint2& src)
|
|
{
|
|
src *= uint2(1540483477u);
|
|
src ^= (src >> uint2(24u));
|
|
src *= uint2(1540483477u);
|
|
uint _64 = ((3744546739u ^ src.x) * 1540483477u) ^ src.y;
|
|
uint _71 = (_64 ^ (_64 >> 13u)) * 1540483477u;
|
|
return _71 ^ (_71 >> 15u);
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float hash12(thread const float2& src)
|
|
{
|
|
uint2 param = as_type<uint2>(src);
|
|
uint _84 = murmurHash12(param);
|
|
return as_type<float>((_84 & 8388607u) | 1065353216u) - 1.0;
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
float3 get_ground_sample(thread const float4& pos, thread const float& dirX, thread const float& dirY, texture2d<float> reftex, sampler refsmp, thread float4& gl_FragCoord, constant plane_data& _145, texture2d<float> groundtex, sampler groundsmp)
|
|
{
|
|
float4 _166 = groundtex.read(uint2(int2(int(floor(pos.x + dirX) + 500.0), int(floor(pos.z + dirY) + 500.0))), 0);
|
|
float2 param = pos.xz;
|
|
float2 param_1 = pos.xz;
|
|
if (_166.z == 1.0)
|
|
{
|
|
return reftex.read(uint2(int2(int(gl_FragCoord.x), int(float(_145.screen_h) - gl_FragCoord.y))), 0).xyz * float3(0.949999988079071044921875, 1.0, 0.949999988079071044921875);
|
|
}
|
|
else
|
|
{
|
|
if (_166.x == 1.0)
|
|
{
|
|
return float3(0.800000011920928955078125, 0.699999988079071044921875, 0.5) * mix(0.800000011920928955078125, 1.0, hash12(param));
|
|
}
|
|
else
|
|
{
|
|
return float3(0.4000000059604644775390625, 0.800000011920928955078125, 0.300000011920928955078125) * mix(0.800000011920928955078125, 1.0, hash12(param_1));
|
|
}
|
|
}
|
|
}
|
|
|
|
static inline __attribute__((always_inline))
|
|
int sign2(thread const float& x)
|
|
{
|
|
if (x < 0.0)
|
|
{
|
|
return -1;
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant plane_data& _145 [[buffer(0)]], constant plane_world_config& _325 [[buffer(1)]], texture2d<float> reftex [[texture(0)]], texture2d<float> groundtex [[texture(1)]], depth2d<float> shadow [[texture(2)]], sampler refsmp [[sampler(0)]], sampler groundsmp [[sampler(1)]], sampler shadowsmp [[sampler(2)]], float4 gl_FragCoord [[position]])
|
|
{
|
|
main0_out out = {};
|
|
float4 _221 = round(in.pos * 16.0) * float4(0.0625);
|
|
float2 _236 = _221.xz - float2(floor(_221.x) + 0.5, floor(_221.z) + 0.5);
|
|
float _240 = _236.x;
|
|
float _246 = _236.y;
|
|
float4 param = _221;
|
|
float param_1 = 0.0;
|
|
float param_2 = 0.0;
|
|
float param_3 = _240;
|
|
float4 param_4 = _221;
|
|
float param_5 = float(sign2(param_3));
|
|
float param_6 = 0.0;
|
|
float param_7 = _246;
|
|
float4 param_8 = _221;
|
|
float param_9 = 0.0;
|
|
float param_10 = float(sign2(param_7));
|
|
float param_11 = _240;
|
|
float param_12 = _246;
|
|
float4 param_13 = _221;
|
|
float param_14 = float(sign2(param_11));
|
|
float param_15 = float(sign2(param_12));
|
|
float _304 = shadow.sample_compare(shadowsmp, float3(0.0).xy, 0.0);
|
|
float3 _309 = float3(smoothstep(0.20000000298023223876953125, 0.5, abs(_240)) * 0.5);
|
|
if (_325.planeType == 1)
|
|
{
|
|
out.frag_color = float4(mix(mix(get_ground_sample(param, param_1, param_2, reftex, refsmp, gl_FragCoord, _145, groundtex, groundsmp), get_ground_sample(param_4, param_5, param_6, reftex, refsmp, gl_FragCoord, _145, groundtex, groundsmp), _309), mix(get_ground_sample(param_8, param_9, param_10, reftex, refsmp, gl_FragCoord, _145, groundtex, groundsmp), get_ground_sample(param_13, param_14, param_15, reftex, refsmp, gl_FragCoord, _145, groundtex, groundsmp), _309), float3(smoothstep(0.20000000298023223876953125, 0.5, abs(_246)) * 0.5)), 1.0);
|
|
}
|
|
else
|
|
{
|
|
out.frag_color = float4(_304, _304, _304, 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,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,0x7d,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,0x69,0x6e,0x74,0x20,
|
|
0x68,0x61,0x73,0x50,0x6c,0x61,0x6e,0x65,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,0x20,0x74,0x69,
|
|
0x6d,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x67,0x72,
|
|
0x61,0x73,0x73,0x44,0x65,0x6e,0x73,0x69,0x74,0x79,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,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,0x75,0x69,
|
|
0x6e,0x74,0x20,0x6d,0x75,0x72,0x6d,0x75,0x72,0x48,0x61,0x73,0x68,0x31,0x32,0x28,
|
|
0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x75,0x69,0x6e,0x74,0x32,0x26,0x20,0x73,0x72,
|
|
0x63,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x20,0x2a,0x3d,0x20,
|
|
0x75,0x69,0x6e,0x74,0x32,0x28,0x31,0x35,0x34,0x30,0x34,0x38,0x33,0x34,0x37,0x37,
|
|
0x75,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x20,0x5e,0x3d,0x20,0x28,
|
|
0x73,0x72,0x63,0x20,0x3e,0x3e,0x20,0x75,0x69,0x6e,0x74,0x32,0x28,0x32,0x34,0x75,
|
|
0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x72,0x63,0x20,0x2a,0x3d,0x20,0x75,
|
|
0x69,0x6e,0x74,0x32,0x28,0x31,0x35,0x34,0x30,0x34,0x38,0x33,0x34,0x37,0x37,0x75,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x20,0x5f,0x36,0x34,0x20,
|
|
0x3d,0x20,0x28,0x28,0x33,0x37,0x34,0x34,0x35,0x34,0x36,0x37,0x33,0x39,0x75,0x20,
|
|
0x5e,0x20,0x73,0x72,0x63,0x2e,0x78,0x29,0x20,0x2a,0x20,0x31,0x35,0x34,0x30,0x34,
|
|
0x38,0x33,0x34,0x37,0x37,0x75,0x29,0x20,0x5e,0x20,0x73,0x72,0x63,0x2e,0x79,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x20,0x5f,0x37,0x31,0x20,0x3d,0x20,
|
|
0x28,0x5f,0x36,0x34,0x20,0x5e,0x20,0x28,0x5f,0x36,0x34,0x20,0x3e,0x3e,0x20,0x31,
|
|
0x33,0x75,0x29,0x29,0x20,0x2a,0x20,0x31,0x35,0x34,0x30,0x34,0x38,0x33,0x34,0x37,
|
|
0x37,0x75,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x5f,
|
|
0x37,0x31,0x20,0x5e,0x20,0x28,0x5f,0x37,0x31,0x20,0x3e,0x3e,0x20,0x31,0x35,0x75,
|
|
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,0x31,0x32,0x28,
|
|
0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x32,0x26,0x20,0x73,0x72,0x63,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x75,0x69,0x6e,0x74,0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x61,0x73,
|
|
0x5f,0x74,0x79,0x70,0x65,0x3c,0x75,0x69,0x6e,0x74,0x32,0x3e,0x28,0x73,0x72,0x63,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,0x74,0x20,0x5f,0x38,0x34,0x20,
|
|
0x3d,0x20,0x6d,0x75,0x72,0x6d,0x75,0x72,0x48,0x61,0x73,0x68,0x31,0x32,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x61,0x73,0x5f,0x74,0x79,0x70,0x65,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,
|
|
0x28,0x28,0x5f,0x38,0x34,0x20,0x26,0x20,0x38,0x33,0x38,0x38,0x36,0x30,0x37,0x75,
|
|
0x29,0x20,0x7c,0x20,0x31,0x30,0x36,0x35,0x33,0x35,0x33,0x32,0x31,0x36,0x75,0x29,
|
|
0x20,0x2d,0x20,0x31,0x2e,0x30,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,0x33,0x20,0x67,
|
|
0x65,0x74,0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x26,0x20,0x70,0x6f,0x73,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,
|
|
0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x64,
|
|
0x69,0x72,0x58,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,
|
|
0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x64,0x69,0x72,0x59,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,0x2c,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,
|
|
0x72,0x65,0x66,0x73,0x6d,0x70,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x26,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,
|
|
0x6f,0x72,0x64,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x70,0x6c,
|
|
0x61,0x6e,0x65,0x5f,0x64,0x61,0x74,0x61,0x26,0x20,0x5f,0x31,0x34,0x35,0x2c,0x20,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,
|
|
0x20,0x67,0x72,0x6f,0x75,0x6e,0x64,0x74,0x65,0x78,0x2c,0x20,0x73,0x61,0x6d,0x70,
|
|
0x6c,0x65,0x72,0x20,0x67,0x72,0x6f,0x75,0x6e,0x64,0x73,0x6d,0x70,0x29,0x0a,0x7b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x36,0x36,
|
|
0x20,0x3d,0x20,0x67,0x72,0x6f,0x75,0x6e,0x64,0x74,0x65,0x78,0x2e,0x72,0x65,0x61,
|
|
0x64,0x28,0x75,0x69,0x6e,0x74,0x32,0x28,0x69,0x6e,0x74,0x32,0x28,0x69,0x6e,0x74,
|
|
0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x70,0x6f,0x73,0x2e,0x78,0x20,0x2b,0x20,0x64,
|
|
0x69,0x72,0x58,0x29,0x20,0x2b,0x20,0x35,0x30,0x30,0x2e,0x30,0x29,0x2c,0x20,0x69,
|
|
0x6e,0x74,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x70,0x6f,0x73,0x2e,0x7a,0x20,0x2b,
|
|
0x20,0x64,0x69,0x72,0x59,0x29,0x20,0x2b,0x20,0x35,0x30,0x30,0x2e,0x30,0x29,0x29,
|
|
0x29,0x2c,0x20,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x32,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x70,0x6f,0x73,0x2e,0x78,0x7a,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x70,0x6f,0x73,0x2e,0x78,0x7a,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x36,0x36,0x2e,0x7a,0x20,0x3d,0x3d,
|
|
0x20,0x31,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x72,0x65,0x66,0x74,0x65,
|
|
0x78,0x2e,0x72,0x65,0x61,0x64,0x28,0x75,0x69,0x6e,0x74,0x32,0x28,0x69,0x6e,0x74,
|
|
0x32,0x28,0x69,0x6e,0x74,0x28,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,
|
|
0x72,0x64,0x2e,0x78,0x29,0x2c,0x20,0x69,0x6e,0x74,0x28,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x28,0x5f,0x31,0x34,0x35,0x2e,0x73,0x63,0x72,0x65,0x65,0x6e,0x5f,0x68,0x29,0x20,
|
|
0x2d,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2e,0x79,
|
|
0x29,0x29,0x29,0x2c,0x20,0x30,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x39,0x34,0x39,0x39,0x39,0x39,0x39,0x38,0x38,
|
|
0x30,0x37,0x39,0x30,0x37,0x31,0x30,0x34,0x34,0x39,0x32,0x31,0x38,0x37,0x35,0x2c,
|
|
0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x39,0x34,0x39,0x39,0x39,0x39,0x39,0x38,
|
|
0x38,0x30,0x37,0x39,0x30,0x37,0x31,0x30,0x34,0x34,0x39,0x32,0x31,0x38,0x37,0x35,
|
|
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,
|
|
0x69,0x66,0x20,0x28,0x5f,0x31,0x36,0x36,0x2e,0x78,0x20,0x3d,0x3d,0x20,0x31,0x2e,
|
|
0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x33,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,0x30,0x2e,0x36,0x39,0x39,0x39,0x39,0x39,0x39,0x38,0x38,0x30,0x37,
|
|
0x39,0x30,0x37,0x31,0x30,0x34,0x34,0x39,0x32,0x31,0x38,0x37,0x35,0x2c,0x20,0x30,
|
|
0x2e,0x35,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,0x30,0x2c,0x20,0x68,0x61,0x73,0x68,0x31,
|
|
0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,
|
|
0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x33,0x28,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,0x2c,0x20,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,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,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,0x30,
|
|
0x2c,0x20,0x68,0x61,0x73,0x68,0x31,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
|
0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
|
|
0x20,0x20,0x7d,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,0x69,0x6e,0x74,0x20,0x73,0x69,0x67,0x6e,0x32,0x28,0x74,0x68,
|
|
0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x26,0x20,0x78,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x78,
|
|
0x20,0x3c,0x20,0x30,0x2e,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
|
0x20,0x20,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x2d,0x31,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
|
0x6e,0x20,0x31,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,0x64,0x61,0x74,0x61,0x26,0x20,
|
|
0x5f,0x31,0x34,0x35,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,0x77,0x6f,0x72,0x6c,0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x26,
|
|
0x20,0x5f,0x33,0x32,0x35,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x31,
|
|
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,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,
|
|
0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x67,0x72,
|
|
0x6f,0x75,0x6e,0x64,0x74,0x65,0x78,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,
|
|
0x65,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x64,0x65,0x70,0x74,0x68,0x32,0x64,0x3c,
|
|
0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x20,0x5b,0x5b,
|
|
0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x32,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,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,
|
|
0x70,0x6c,0x65,0x72,0x20,0x67,0x72,0x6f,0x75,0x6e,0x64,0x73,0x6d,0x70,0x20,0x5b,
|
|
0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x31,0x29,0x5d,0x5d,0x2c,0x20,0x73,
|
|
0x61,0x6d,0x70,0x6c,0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x73,0x6d,0x70,
|
|
0x20,0x5b,0x5b,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x28,0x32,0x29,0x5d,0x5d,0x2c,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,
|
|
0x6f,0x6f,0x72,0x64,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x5d,
|
|
0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,
|
|
0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x32,0x32,0x31,0x20,0x3d,0x20,0x72,
|
|
0x6f,0x75,0x6e,0x64,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x20,0x2a,0x20,0x31,0x36,
|
|
0x2e,0x30,0x29,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x30,0x2e,0x30,
|
|
0x36,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
|
|
0x20,0x5f,0x32,0x33,0x36,0x20,0x3d,0x20,0x5f,0x32,0x32,0x31,0x2e,0x78,0x7a,0x20,
|
|
0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x66,0x6c,0x6f,0x6f,0x72,0x28,0x5f,
|
|
0x32,0x32,0x31,0x2e,0x78,0x29,0x20,0x2b,0x20,0x30,0x2e,0x35,0x2c,0x20,0x66,0x6c,
|
|
0x6f,0x6f,0x72,0x28,0x5f,0x32,0x32,0x31,0x2e,0x7a,0x29,0x20,0x2b,0x20,0x30,0x2e,
|
|
0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,
|
|
0x34,0x30,0x20,0x3d,0x20,0x5f,0x32,0x33,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x34,0x36,0x20,0x3d,0x20,0x5f,0x32,
|
|
0x33,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x5f,0x32,0x32,0x31,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
|
0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x33,0x20,0x3d,0x20,0x5f,0x32,0x34,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
|
|
0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,
|
|
0x5f,0x32,0x32,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,
|
|
0x73,0x69,0x67,0x6e,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,0x29,0x3b,
|
|
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x36,0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x32,
|
|
0x34,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x38,0x20,0x3d,0x20,0x5f,0x32,0x32,0x31,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x39,
|
|
0x20,0x3d,0x20,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x30,0x20,0x3d,0x20,0x66,0x6c,0x6f,
|
|
0x61,0x74,0x28,0x73,0x69,0x67,0x6e,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,
|
|
0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x31,0x31,0x20,0x3d,0x20,0x5f,0x32,0x34,0x30,0x3b,0x0a,0x20,
|
|
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
|
0x32,0x20,0x3d,0x20,0x5f,0x32,0x34,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x33,0x20,0x3d,0x20,
|
|
0x5f,0x32,0x32,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
|
0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x34,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
|
|
0x28,0x73,0x69,0x67,0x6e,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x31,0x29,
|
|
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,
|
|
0x61,0x6d,0x5f,0x31,0x35,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x73,0x69,
|
|
0x67,0x6e,0x32,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x32,0x29,0x29,0x3b,0x0a,
|
|
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x30,0x34,0x20,0x3d,
|
|
0x20,0x73,0x68,0x61,0x64,0x6f,0x77,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x5f,0x63,
|
|
0x6f,0x6d,0x70,0x61,0x72,0x65,0x28,0x73,0x68,0x61,0x64,0x6f,0x77,0x73,0x6d,0x70,
|
|
0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x29,0x2e,0x78,0x79,
|
|
0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
|
|
0x74,0x33,0x20,0x5f,0x33,0x30,0x39,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
|
0x28,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x32,0x30,
|
|
0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,0x30,0x32,0x33,0x32,0x32,0x33,0x38,
|
|
0x37,0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x61,
|
|
0x62,0x73,0x28,0x5f,0x32,0x34,0x30,0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,
|
|
0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x33,0x32,0x35,0x2e,0x70,
|
|
0x6c,0x61,0x6e,0x65,0x54,0x79,0x70,0x65,0x20,0x3d,0x3d,0x20,0x31,0x29,0x0a,0x20,
|
|
0x20,0x20,0x20,0x7b,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,0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x28,0x67,0x65,0x74,
|
|
0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x70,
|
|
0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,0x70,
|
|
0x61,0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x72,0x65,0x66,0x74,0x65,0x78,0x2c,0x20,
|
|
0x72,0x65,0x66,0x73,0x6d,0x70,0x2c,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,
|
|
0x6f,0x6f,0x72,0x64,0x2c,0x20,0x5f,0x31,0x34,0x35,0x2c,0x20,0x67,0x72,0x6f,0x75,
|
|
0x6e,0x64,0x74,0x65,0x78,0x2c,0x20,0x67,0x72,0x6f,0x75,0x6e,0x64,0x73,0x6d,0x70,
|
|
0x29,0x2c,0x20,0x67,0x65,0x74,0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,0x5f,0x73,0x61,
|
|
0x6d,0x70,0x6c,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x2c,0x20,0x70,0x61,
|
|
0x72,0x61,0x6d,0x5f,0x35,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x2c,0x20,
|
|
0x72,0x65,0x66,0x74,0x65,0x78,0x2c,0x20,0x72,0x65,0x66,0x73,0x6d,0x70,0x2c,0x20,
|
|
0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2c,0x20,0x5f,0x31,
|
|
0x34,0x35,0x2c,0x20,0x67,0x72,0x6f,0x75,0x6e,0x64,0x74,0x65,0x78,0x2c,0x20,0x67,
|
|
0x72,0x6f,0x75,0x6e,0x64,0x73,0x6d,0x70,0x29,0x2c,0x20,0x5f,0x33,0x30,0x39,0x29,
|
|
0x2c,0x20,0x6d,0x69,0x78,0x28,0x67,0x65,0x74,0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,
|
|
0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x2c,
|
|
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x39,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
|
0x31,0x30,0x2c,0x20,0x72,0x65,0x66,0x74,0x65,0x78,0x2c,0x20,0x72,0x65,0x66,0x73,
|
|
0x6d,0x70,0x2c,0x20,0x67,0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,
|
|
0x2c,0x20,0x5f,0x31,0x34,0x35,0x2c,0x20,0x67,0x72,0x6f,0x75,0x6e,0x64,0x74,0x65,
|
|
0x78,0x2c,0x20,0x67,0x72,0x6f,0x75,0x6e,0x64,0x73,0x6d,0x70,0x29,0x2c,0x20,0x67,
|
|
0x65,0x74,0x5f,0x67,0x72,0x6f,0x75,0x6e,0x64,0x5f,0x73,0x61,0x6d,0x70,0x6c,0x65,
|
|
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x33,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,
|
|
0x5f,0x31,0x34,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x35,0x2c,0x20,0x72,
|
|
0x65,0x66,0x74,0x65,0x78,0x2c,0x20,0x72,0x65,0x66,0x73,0x6d,0x70,0x2c,0x20,0x67,
|
|
0x6c,0x5f,0x46,0x72,0x61,0x67,0x43,0x6f,0x6f,0x72,0x64,0x2c,0x20,0x5f,0x31,0x34,
|
|
0x35,0x2c,0x20,0x67,0x72,0x6f,0x75,0x6e,0x64,0x74,0x65,0x78,0x2c,0x20,0x67,0x72,
|
|
0x6f,0x75,0x6e,0x64,0x73,0x6d,0x70,0x29,0x2c,0x20,0x5f,0x33,0x30,0x39,0x29,0x2c,
|
|
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,
|
|
0x65,0x70,0x28,0x30,0x2e,0x32,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x32,0x39,0x38,
|
|
0x30,0x32,0x33,0x32,0x32,0x33,0x38,0x37,0x36,0x39,0x35,0x33,0x31,0x32,0x35,0x2c,
|
|
0x20,0x30,0x2e,0x35,0x2c,0x20,0x61,0x62,0x73,0x28,0x5f,0x32,0x34,0x36,0x29,0x29,
|
|
0x20,0x2a,0x20,0x30,0x2e,0x35,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,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,0x6f,0x75,0x74,
|
|
0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,
|
|
0x6f,0x61,0x74,0x34,0x28,0x5f,0x33,0x30,0x34,0x2c,0x20,0x5f,0x33,0x30,0x34,0x2c,
|
|
0x20,0x5f,0x33,0x30,0x34,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 = 64;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 4;
|
|
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 = 144;
|
|
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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.hasClouds";
|
|
desc.uniform_blocks[1].glsl_uniforms[10].type = .INT;
|
|
desc.uniform_blocks[1].glsl_uniforms[10].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[10].glsl_name = "_325.hasPlane";
|
|
desc.uniform_blocks[1].glsl_uniforms[11].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[11].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[11].glsl_name = "_325.planeHeight";
|
|
desc.uniform_blocks[1].glsl_uniforms[12].type = .INT;
|
|
desc.uniform_blocks[1].glsl_uniforms[12].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[12].glsl_name = "_325.planeType";
|
|
desc.uniform_blocks[1].glsl_uniforms[13].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[13].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[13].glsl_name = "_325.time";
|
|
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 = "_325.grassDensity";
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 16;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].type = .INT4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].glsl_name = "plane_data";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .DEPTH;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.samplers[2].stage = .FRAGMENT;
|
|
desc.samplers[2].sampler_type = .COMPARISON;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "reftex_refsmp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 1;
|
|
desc.image_sampler_pairs[1].glsl_name = "groundtex_groundsmp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 2;
|
|
desc.image_sampler_pairs[2].sampler_slot = 2;
|
|
desc.image_sampler_pairs[2].glsl_name = "shadow_shadowsmp";
|
|
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 = 64;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
|
|
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 4;
|
|
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 = 144;
|
|
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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.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 = "_325.hasClouds";
|
|
desc.uniform_blocks[1].glsl_uniforms[10].type = .INT;
|
|
desc.uniform_blocks[1].glsl_uniforms[10].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[10].glsl_name = "_325.hasPlane";
|
|
desc.uniform_blocks[1].glsl_uniforms[11].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[11].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[11].glsl_name = "_325.planeHeight";
|
|
desc.uniform_blocks[1].glsl_uniforms[12].type = .INT;
|
|
desc.uniform_blocks[1].glsl_uniforms[12].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[12].glsl_name = "_325.planeType";
|
|
desc.uniform_blocks[1].glsl_uniforms[13].type = .FLOAT;
|
|
desc.uniform_blocks[1].glsl_uniforms[13].array_count = 0;
|
|
desc.uniform_blocks[1].glsl_uniforms[13].glsl_name = "_325.time";
|
|
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 = "_325.grassDensity";
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 16;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].type = .INT4;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].array_count = 1;
|
|
desc.uniform_blocks[2].glsl_uniforms[0].glsl_name = "plane_data";
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .DEPTH;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.samplers[2].stage = .FRAGMENT;
|
|
desc.samplers[2].sampler_type = .COMPARISON;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[0].glsl_name = "reftex_refsmp";
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 1;
|
|
desc.image_sampler_pairs[1].glsl_name = "groundtex_groundsmp";
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 2;
|
|
desc.image_sampler_pairs[2].sampler_slot = 2;
|
|
desc.image_sampler_pairs[2].glsl_name = "shadow_shadowsmp";
|
|
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 = 64;
|
|
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 = 144;
|
|
desc.uniform_blocks[1].msl_buffer_n = 1;
|
|
desc.uniform_blocks[2].stage = .FRAGMENT;
|
|
desc.uniform_blocks[2].layout = .STD140;
|
|
desc.uniform_blocks[2].size = 16;
|
|
desc.uniform_blocks[2].msl_buffer_n = 0;
|
|
desc.images[0].stage = .FRAGMENT;
|
|
desc.images[0].multisampled = false;
|
|
desc.images[0].image_type = ._2D;
|
|
desc.images[0].sample_type = .FLOAT;
|
|
desc.images[0].msl_texture_n = 0;
|
|
desc.images[1].stage = .FRAGMENT;
|
|
desc.images[1].multisampled = false;
|
|
desc.images[1].image_type = ._2D;
|
|
desc.images[1].sample_type = .FLOAT;
|
|
desc.images[1].msl_texture_n = 1;
|
|
desc.images[2].stage = .FRAGMENT;
|
|
desc.images[2].multisampled = false;
|
|
desc.images[2].image_type = ._2D;
|
|
desc.images[2].sample_type = .DEPTH;
|
|
desc.images[2].msl_texture_n = 2;
|
|
desc.samplers[0].stage = .FRAGMENT;
|
|
desc.samplers[0].sampler_type = .FILTERING;
|
|
desc.samplers[0].msl_sampler_n = 0;
|
|
desc.samplers[1].stage = .FRAGMENT;
|
|
desc.samplers[1].sampler_type = .FILTERING;
|
|
desc.samplers[1].msl_sampler_n = 1;
|
|
desc.samplers[2].stage = .FRAGMENT;
|
|
desc.samplers[2].sampler_type = .COMPARISON;
|
|
desc.samplers[2].msl_sampler_n = 2;
|
|
desc.image_sampler_pairs[0].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[0].image_slot = 0;
|
|
desc.image_sampler_pairs[0].sampler_slot = 0;
|
|
desc.image_sampler_pairs[1].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[1].image_slot = 1;
|
|
desc.image_sampler_pairs[1].sampler_slot = 1;
|
|
desc.image_sampler_pairs[2].stage = .FRAGMENT;
|
|
desc.image_sampler_pairs[2].image_slot = 2;
|
|
desc.image_sampler_pairs[2].sampler_slot = 2;
|
|
}
|
|
return desc;
|
|
}
|