trueno/src/shaders/jai/shader_trixel.jai
2025-10-18 15:11:34 +03:00

1300 lines
81 KiB
Plaintext

/*
#version:1# (machine generated, don't edit!)
Generated by sokol-shdc (https://github.com/floooh/sokol-tools)
Cmdline:
sokol-shdc -i shader_trixel.glsl -o ./jai/shader_trixel.jai -l glsl430:glsl300es:metal_macos -f sokol_jai
Overview:
=========
Shader program: 'trixel':
Get shader desc: trixel_shader_desc(sg_query_backend())
Vertex Shader: vs_trixel
Fragment Shader: fs_trixel
Attributes:
ATTR_trixel_position => 0
ATTR_trixel_normal => 1
ATTR_trixel_inst => 2
ATTR_trixel_inst_col => 3
Bindings:
Uniform block 'vs_params':
Jai struct: Vs_Params
Bind slot: UB_vs_params => 0
Uniform block 'trixel_world_config':
Jai struct: Trixel_World_Config
Bind slot: UB_trixel_world_config => 1
*/
ATTR_trixel_position :: 0;
ATTR_trixel_normal :: 1;
ATTR_trixel_inst :: 2;
ATTR_trixel_inst_col :: 3;
UB_vs_params :: 0;
UB_trixel_world_config :: 1;
Vs_Params :: struct {
mvp: [16]float;
camera: [3]float;
_: [4]u8;
};
Trixel_World_Config :: struct {
skyBase: [3]float;
_: [4]u8;
skyTop: [3]float;
_: [4]u8;
sunDisk: [3]float;
_: [4]u8;
horizonHalo: [3]float;
_: [4]u8;
sunHalo: [3]float;
_: [4]u8;
sunLightColor: [3]float;
_: [4]u8;
sunPosition: [3]float;
sunIntensity: float;
skyIntensity: float;
hasClouds: s32;
planeHeight: float;
planeType: s32;
waterColor: [3]float;
_: [4]u8;
deepColor: [3]float;
time: float;
};
/*
#version 430
uniform vec4 vs_params[5];
layout(location = 2) in vec4 inst;
layout(location = 0) in vec4 position;
layout(location = 1) out vec4 fnormal;
layout(location = 1) in vec4 normal;
layout(location = 0) out vec4 color;
layout(location = 3) in vec4 inst_col;
layout(location = 2) out vec4 pos;
layout(location = 3) out vec3 cam;
void main()
{
gl_Position = mat4(vs_params[0], vs_params[1], vs_params[2], vs_params[3]) * vec4(position.xyz + inst.xyz, 1.0);
fnormal = normal;
color = inst_col;
pos = gl_Position;
cam = vs_params[4].xyz;
}
*/
vs_trixel_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,0x76,0x73,0x5f,0x70,0x61,
0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,
0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,
0x20,0x76,0x65,0x63,0x34,0x20,0x69,0x6e,0x73,0x74,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,0x31,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,
0x20,0x66,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,
0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,
0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,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,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,0x33,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,
0x20,0x69,0x6e,0x73,0x74,0x5f,0x63,0x6f,0x6c,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,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,
0x33,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x61,0x6d,0x3b,
0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,
0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,
0x3d,0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,
0x5b,0x30,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,
0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,
0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,
0x20,0x76,0x65,0x63,0x34,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x78,
0x79,0x7a,0x20,0x2b,0x20,0x69,0x6e,0x73,0x74,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,
0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x69,0x6e,0x73,0x74,0x5f,0x63,0x6f,0x6c,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x50,0x6f,
0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x61,0x6d,0x20,
0x3d,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x2e,0x78,
0x79,0x7a,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
];
/*
#version 430
struct trixel_world_config
{
vec3 skyBase;
vec3 skyTop;
vec3 sunDisk;
vec3 horizonHalo;
vec3 sunHalo;
vec3 sunLightColor;
vec3 sunPosition;
float sunIntensity;
float skyIntensity;
int hasClouds;
float planeHeight;
int planeType;
vec3 waterColor;
vec3 deepColor;
float time;
};
uniform trixel_world_config _200;
layout(location = 0) in vec4 color;
layout(location = 1) in vec4 fnormal;
layout(location = 3) in vec3 cam;
layout(location = 2) in vec4 pos;
layout(location = 0) out vec4 frag_color;
vec3 fresnelSchlick(float cosTheta, vec3 F0)
{
return F0 + ((vec3(1.0) - F0) * pow(clamp(1.0 - cosTheta, 0.0, 1.0), 5.0));
}
float DistributionGGX(vec3 N, vec3 H, float roughness)
{
float _36 = roughness * roughness;
float _40 = _36 * _36;
float _46 = max(dot(N, H), 0.0);
float _59 = ((_46 * _46) * (_40 - 1.0)) + 1.0;
return _40 / ((3.141285419464111328125 * _59) * _59);
}
float GeometrySchlickGGX(float NdotV, float roughness)
{
float _72 = roughness + 1.0;
float _78 = (_72 * _72) * 0.125;
return NdotV / ((NdotV * (1.0 - _78)) + _78);
}
float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness)
{
float param = max(dot(N, V), 0.0);
float param_1 = roughness;
float param_2 = max(dot(N, L), 0.0);
float param_3 = roughness;
return GeometrySchlickGGX(param_2, param_3) * GeometrySchlickGGX(param, param_1);
}
void main()
{
int _150 = int(round(color.w * 255.0));
float _172 = max(float((_150 >> 5) & 7) * 0.14285714924335479736328125, 0.0500000007450580596923828125);
float _178 = float((_150 >> 3) & 3) * 0.3333333432674407958984375;
vec3 light = color.xyz * 0.300000011920928955078125;
vec3 _187 = normalize(fnormal.xyz);
vec3 _196 = normalize(cam - pos.xyz);
vec3 _205 = normalize(_200.sunPosition);
vec3 _210 = normalize(_196 + _205);
float param = max(dot(_210, _196), 0.0);
vec3 param_1 = mix(vec3(0.039999999105930328369140625), color.xyz, vec3(_178));
vec3 _227 = fresnelSchlick(param, param_1);
vec3 param_2 = _187;
vec3 param_3 = _210;
float param_4 = _172;
vec3 param_5 = _187;
vec3 param_6 = _196;
vec3 param_7 = _205;
float param_8 = _172;
float _262 = max(dot(_187, _205), 0.0);
vec3 _294 = light;
vec3 _295 = _294 + ((((((vec3(1.0) - _227) * (1.0 - _178)) * color.xyz) * vec3(0.3183410167694091796875)) + ((_227 * (DistributionGGX(param_2, param_3, param_4) * GeometrySmith(param_5, param_6, param_7, param_8))) / vec3(((4.0 * max(dot(_187, _196), 0.0)) * _262) + 9.9999997473787516355514526367188e-05))) * _262);
light = _295;
frag_color = vec4(_295, 1.0);
}
*/
fs_trixel_source_glsl430 := u8.[
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x73,0x74,
0x72,0x75,0x63,0x74,0x20,0x74,0x72,0x69,0x78,0x65,0x6c,0x5f,0x77,0x6f,0x72,0x6c,
0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,
0x65,0x63,0x33,0x20,0x73,0x6b,0x79,0x42,0x61,0x73,0x65,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x6b,0x79,0x54,0x6f,0x70,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x6e,0x44,0x69,0x73,0x6b,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x68,0x6f,0x72,0x69,0x7a,0x6f,0x6e,
0x48,0x61,0x6c,0x6f,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x73,
0x75,0x6e,0x48,0x61,0x6c,0x6f,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,
0x20,0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,
0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x73,0x75,0x6e,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,0x6b,0x79,0x49,0x6e,0x74,0x65,0x6e,
0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x68,0x61,
0x73,0x43,0x6c,0x6f,0x75,0x64,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x48,0x65,0x69,0x67,0x68,0x74,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x54,0x79,0x70,
0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x77,0x61,0x74,0x65,
0x72,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,
0x20,0x64,0x65,0x65,0x70,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x20,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,
0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x74,0x72,0x69,0x78,0x65,0x6c,0x5f,0x77,
0x6f,0x72,0x6c,0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x20,0x5f,0x32,0x30,0x30,
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,
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,0x69,0x6e,0x20,0x76,
0x65,0x63,0x34,0x20,0x66,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x6c,0x61,0x79,
0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x33,
0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x61,0x6d,0x3b,0x0a,0x6c,
0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,
0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,0x3b,
0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x65,0x63,0x33,
0x20,0x66,0x72,0x65,0x73,0x6e,0x65,0x6c,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,0x28,
0x66,0x6c,0x6f,0x61,0x74,0x20,0x63,0x6f,0x73,0x54,0x68,0x65,0x74,0x61,0x2c,0x20,
0x76,0x65,0x63,0x33,0x20,0x46,0x30,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,
0x65,0x74,0x75,0x72,0x6e,0x20,0x46,0x30,0x20,0x2b,0x20,0x28,0x28,0x76,0x65,0x63,
0x33,0x28,0x31,0x2e,0x30,0x29,0x20,0x2d,0x20,0x46,0x30,0x29,0x20,0x2a,0x20,0x70,
0x6f,0x77,0x28,0x63,0x6c,0x61,0x6d,0x70,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x63,
0x6f,0x73,0x54,0x68,0x65,0x74,0x61,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,
0x30,0x29,0x2c,0x20,0x35,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x44,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,
0x47,0x47,0x58,0x28,0x76,0x65,0x63,0x33,0x20,0x4e,0x2c,0x20,0x76,0x65,0x63,0x33,
0x20,0x48,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,
0x65,0x73,0x73,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x20,0x5f,0x33,0x36,0x20,0x3d,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,
0x20,0x2a,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x30,0x20,0x3d,0x20,0x5f,0x33,
0x36,0x20,0x2a,0x20,0x5f,0x33,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x20,0x5f,0x34,0x36,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,
0x28,0x4e,0x2c,0x20,0x48,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x35,0x39,0x20,0x3d,0x20,0x28,0x28,
0x5f,0x34,0x36,0x20,0x2a,0x20,0x5f,0x34,0x36,0x29,0x20,0x2a,0x20,0x28,0x5f,0x34,
0x30,0x20,0x2d,0x20,0x31,0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,0x31,0x2e,0x30,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x5f,0x34,0x30,0x20,
0x2f,0x20,0x28,0x28,0x33,0x2e,0x31,0x34,0x31,0x32,0x38,0x35,0x34,0x31,0x39,0x34,
0x36,0x34,0x31,0x31,0x31,0x33,0x32,0x38,0x31,0x32,0x35,0x20,0x2a,0x20,0x5f,0x35,
0x39,0x29,0x20,0x2a,0x20,0x5f,0x35,0x39,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,0x53,0x63,0x68,0x6c,
0x69,0x63,0x6b,0x47,0x47,0x58,0x28,0x66,0x6c,0x6f,0x61,0x74,0x20,0x4e,0x64,0x6f,
0x74,0x56,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,
0x65,0x73,0x73,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x20,0x5f,0x37,0x32,0x20,0x3d,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,
0x20,0x2b,0x20,0x31,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x20,0x5f,0x37,0x38,0x20,0x3d,0x20,0x28,0x5f,0x37,0x32,0x20,0x2a,0x20,0x5f,
0x37,0x32,0x29,0x20,0x2a,0x20,0x30,0x2e,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x4e,0x64,0x6f,0x74,0x56,0x20,0x2f,0x20,
0x28,0x28,0x4e,0x64,0x6f,0x74,0x56,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,
0x20,0x5f,0x37,0x38,0x29,0x29,0x20,0x2b,0x20,0x5f,0x37,0x38,0x29,0x3b,0x0a,0x7d,
0x0a,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x20,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,
0x53,0x6d,0x69,0x74,0x68,0x28,0x76,0x65,0x63,0x33,0x20,0x4e,0x2c,0x20,0x76,0x65,
0x63,0x33,0x20,0x56,0x2c,0x20,0x76,0x65,0x63,0x33,0x20,0x4c,0x2c,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,0x29,0x0a,0x7b,
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,
0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x4e,0x2c,0x20,0x56,0x29,
0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x72,0x6f,0x75,0x67,
0x68,0x6e,0x65,0x73,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x64,
0x6f,0x74,0x28,0x4e,0x2c,0x20,0x4c,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
0x33,0x20,0x3d,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x47,0x65,0x6f,0x6d,0x65,0x74,
0x72,0x79,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,0x47,0x47,0x58,0x28,0x70,0x61,0x72,
0x61,0x6d,0x5f,0x32,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,0x20,0x2a,
0x20,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,
0x47,0x47,0x58,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,
0x5f,0x31,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,
0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x31,
0x35,0x30,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x72,0x6f,0x75,0x6e,0x64,0x28,0x63,
0x6f,0x6c,0x6f,0x72,0x2e,0x77,0x20,0x2a,0x20,0x32,0x35,0x35,0x2e,0x30,0x29,0x29,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x37,0x32,
0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x28,0x5f,0x31,
0x35,0x30,0x20,0x3e,0x3e,0x20,0x35,0x29,0x20,0x26,0x20,0x37,0x29,0x20,0x2a,0x20,
0x30,0x2e,0x31,0x34,0x32,0x38,0x35,0x37,0x31,0x34,0x39,0x32,0x34,0x33,0x33,0x35,
0x34,0x37,0x39,0x37,0x33,0x36,0x33,0x32,0x38,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,
0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x37,0x34,0x35,0x30,0x35,0x38,0x30,
0x35,0x39,0x36,0x39,0x32,0x33,0x38,0x32,0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x37,0x38,0x20,0x3d,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x28,0x28,0x5f,0x31,0x35,0x30,0x20,0x3e,0x3e,0x20,0x33,
0x29,0x20,0x26,0x20,0x33,0x29,0x20,0x2a,0x20,0x30,0x2e,0x33,0x33,0x33,0x33,0x33,
0x33,0x33,0x34,0x33,0x32,0x36,0x37,0x34,0x34,0x30,0x37,0x39,0x35,0x38,0x39,0x38,
0x34,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x6c,
0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x78,0x79,0x7a,
0x20,0x2a,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,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x38,0x37,0x20,0x3d,0x20,0x6e,
0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x66,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,
0x5f,0x31,0x39,0x36,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,
0x28,0x63,0x61,0x6d,0x20,0x2d,0x20,0x70,0x6f,0x73,0x2e,0x78,0x79,0x7a,0x29,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x30,0x35,0x20,0x3d,
0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,0x32,0x30,0x30,0x2e,
0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x31,0x30,0x20,0x3d,0x20,0x6e,0x6f,
0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,0x31,0x39,0x36,0x20,0x2b,0x20,0x5f,
0x32,0x30,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,
0x5f,0x32,0x31,0x30,0x2c,0x20,0x5f,0x31,0x39,0x36,0x29,0x2c,0x20,0x30,0x2e,0x30,
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,
0x6d,0x5f,0x31,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x76,0x65,0x63,0x33,0x28,0x30,
0x2e,0x30,0x33,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x31,0x30,0x35,0x39,0x33,0x30,
0x33,0x32,0x38,0x33,0x36,0x39,0x31,0x34,0x30,0x36,0x32,0x35,0x29,0x2c,0x20,0x63,
0x6f,0x6c,0x6f,0x72,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,
0x31,0x37,0x38,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,
0x5f,0x32,0x32,0x37,0x20,0x3d,0x20,0x66,0x72,0x65,0x73,0x6e,0x65,0x6c,0x53,0x63,
0x68,0x6c,0x69,0x63,0x6b,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,
0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,
0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,0x31,0x38,0x37,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,
0x20,0x3d,0x20,0x5f,0x32,0x31,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,0x5f,0x31,0x37,
0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,
0x6d,0x5f,0x35,0x20,0x3d,0x20,0x5f,0x31,0x38,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x20,0x3d,0x20,0x5f,
0x31,0x39,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,
0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x32,0x30,0x35,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x20,
0x3d,0x20,0x5f,0x31,0x37,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x20,0x5f,0x32,0x36,0x32,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,
0x28,0x5f,0x31,0x38,0x37,0x2c,0x20,0x5f,0x32,0x30,0x35,0x29,0x2c,0x20,0x30,0x2e,
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x39,
0x34,0x20,0x3d,0x20,0x6c,0x69,0x67,0x68,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,
0x65,0x63,0x33,0x20,0x5f,0x32,0x39,0x35,0x20,0x3d,0x20,0x5f,0x32,0x39,0x34,0x20,
0x2b,0x20,0x28,0x28,0x28,0x28,0x28,0x28,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,
0x29,0x20,0x2d,0x20,0x5f,0x32,0x32,0x37,0x29,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,
0x20,0x2d,0x20,0x5f,0x31,0x37,0x38,0x29,0x29,0x20,0x2a,0x20,0x63,0x6f,0x6c,0x6f,
0x72,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,
0x33,0x31,0x38,0x33,0x34,0x31,0x30,0x31,0x36,0x37,0x36,0x39,0x34,0x30,0x39,0x31,
0x37,0x39,0x36,0x38,0x37,0x35,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x5f,0x32,0x32,
0x37,0x20,0x2a,0x20,0x28,0x44,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,
0x6e,0x47,0x47,0x58,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x70,0x61,
0x72,0x61,0x6d,0x5f,0x33,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x29,0x20,
0x2a,0x20,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,0x53,0x6d,0x69,0x74,0x68,0x28,
0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,
0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,
0x5f,0x38,0x29,0x29,0x29,0x20,0x2f,0x20,0x76,0x65,0x63,0x33,0x28,0x28,0x28,0x34,
0x2e,0x30,0x20,0x2a,0x20,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x38,
0x37,0x2c,0x20,0x5f,0x31,0x39,0x36,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x29,0x20,
0x2a,0x20,0x5f,0x32,0x36,0x32,0x29,0x20,0x2b,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,
0x39,0x39,0x37,0x34,0x37,0x33,0x37,0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,
0x31,0x34,0x35,0x32,0x36,0x33,0x36,0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,
0x29,0x29,0x20,0x2a,0x20,0x5f,0x32,0x36,0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x6c,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x5f,0x32,0x39,0x35,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,
0x65,0x63,0x34,0x28,0x5f,0x32,0x39,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
0x7d,0x0a,0x0a,0x00,
];
/*
#version 300 es
uniform vec4 vs_params[5];
layout(location = 2) in vec4 inst;
layout(location = 0) in vec4 position;
out vec4 fnormal;
layout(location = 1) in vec4 normal;
out vec4 color;
layout(location = 3) in vec4 inst_col;
out vec4 pos;
out vec3 cam;
void main()
{
gl_Position = mat4(vs_params[0], vs_params[1], vs_params[2], vs_params[3]) * vec4(position.xyz + inst.xyz, 1.0);
fnormal = normal;
color = inst_col;
pos = gl_Position;
cam = vs_params[4].xyz;
}
*/
vs_trixel_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,0x76,0x73,
0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,
0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x69,0x6e,0x73,0x74,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,0x66,
0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,
0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,0x69,0x6e,0x20,
0x76,0x65,0x63,0x34,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x6f,0x75,0x74,
0x20,0x76,0x65,0x63,0x34,0x20,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,0x33,
0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x69,0x6e,0x73,0x74,0x5f,0x63,
0x6f,0x6c,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x70,0x6f,0x73,
0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x61,0x6d,0x3b,0x0a,
0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,
0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,
0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,
0x30,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,
0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,
0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,
0x76,0x65,0x63,0x34,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x78,0x79,
0x7a,0x20,0x2b,0x20,0x69,0x6e,0x73,0x74,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,
0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,
0x6c,0x6f,0x72,0x20,0x3d,0x20,0x69,0x6e,0x73,0x74,0x5f,0x63,0x6f,0x6c,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,
0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x61,0x6d,0x20,0x3d,
0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x2e,0x78,0x79,
0x7a,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
];
/*
#version 300 es
precision mediump float;
precision highp int;
struct trixel_world_config
{
highp vec3 skyBase;
highp vec3 skyTop;
highp vec3 sunDisk;
highp vec3 horizonHalo;
highp vec3 sunHalo;
highp vec3 sunLightColor;
highp vec3 sunPosition;
highp float sunIntensity;
highp float skyIntensity;
int hasClouds;
highp float planeHeight;
int planeType;
highp vec3 waterColor;
highp vec3 deepColor;
highp float time;
};
uniform trixel_world_config _200;
in highp vec4 color;
in highp vec4 fnormal;
in highp vec3 cam;
in highp vec4 pos;
layout(location = 0) out highp vec4 frag_color;
highp vec3 fresnelSchlick(highp float cosTheta, highp vec3 F0)
{
return F0 + ((vec3(1.0) - F0) * pow(clamp(1.0 - cosTheta, 0.0, 1.0), 5.0));
}
highp float DistributionGGX(highp vec3 N, highp vec3 H, highp float roughness)
{
highp float _36 = roughness * roughness;
highp float _40 = _36 * _36;
highp float _46 = max(dot(N, H), 0.0);
highp float _59 = ((_46 * _46) * (_40 - 1.0)) + 1.0;
return _40 / ((3.141285419464111328125 * _59) * _59);
}
highp float GeometrySchlickGGX(highp float NdotV, highp float roughness)
{
highp float _72 = roughness + 1.0;
highp float _78 = (_72 * _72) * 0.125;
return NdotV / ((NdotV * (1.0 - _78)) + _78);
}
highp float GeometrySmith(highp vec3 N, highp vec3 V, highp vec3 L, highp float roughness)
{
highp float param = max(dot(N, V), 0.0);
highp float param_1 = roughness;
highp float param_2 = max(dot(N, L), 0.0);
highp float param_3 = roughness;
return GeometrySchlickGGX(param_2, param_3) * GeometrySchlickGGX(param, param_1);
}
void main()
{
int _150 = int(round(color.w * 255.0));
highp float _172 = max(float((_150 >> 5) & 7) * 0.14285714924335479736328125, 0.0500000007450580596923828125);
highp float _178 = float((_150 >> 3) & 3) * 0.3333333432674407958984375;
highp vec3 light = color.xyz * 0.300000011920928955078125;
highp vec3 _187 = normalize(fnormal.xyz);
highp vec3 _196 = normalize(cam - pos.xyz);
highp vec3 _205 = normalize(_200.sunPosition);
highp vec3 _210 = normalize(_196 + _205);
highp float param = max(dot(_210, _196), 0.0);
highp vec3 param_1 = mix(vec3(0.039999999105930328369140625), color.xyz, vec3(_178));
highp vec3 _227 = fresnelSchlick(param, param_1);
highp vec3 param_2 = _187;
highp vec3 param_3 = _210;
highp float param_4 = _172;
highp vec3 param_5 = _187;
highp vec3 param_6 = _196;
highp vec3 param_7 = _205;
highp float param_8 = _172;
highp float _262 = max(dot(_187, _205), 0.0);
highp vec3 _294 = light;
highp vec3 _295 = _294 + ((((((vec3(1.0) - _227) * (1.0 - _178)) * color.xyz) * vec3(0.3183410167694091796875)) + ((_227 * (DistributionGGX(param_2, param_3, param_4) * GeometrySmith(param_5, param_6, param_7, param_8))) / vec3(((4.0 * max(dot(_187, _196), 0.0)) * _262) + 9.9999997473787516355514526367188e-05))) * _262);
light = _295;
frag_color = vec4(_295, 1.0);
}
*/
fs_trixel_source_glsl300es := u8.[
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
0x70,0x72,0x65,0x63,0x69,0x73,0x69,0x6f,0x6e,0x20,0x6d,0x65,0x64,0x69,0x75,0x6d,
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x3b,0x0a,0x70,0x72,0x65,0x63,0x69,0x73,0x69,
0x6f,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x69,0x6e,0x74,0x3b,0x0a,0x0a,0x73,
0x74,0x72,0x75,0x63,0x74,0x20,0x74,0x72,0x69,0x78,0x65,0x6c,0x5f,0x77,0x6f,0x72,
0x6c,0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x6b,0x79,0x42,0x61,
0x73,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
0x63,0x33,0x20,0x73,0x6b,0x79,0x54,0x6f,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x6e,0x44,0x69,0x73,
0x6b,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
0x33,0x20,0x68,0x6f,0x72,0x69,0x7a,0x6f,0x6e,0x48,0x61,0x6c,0x6f,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,
0x6e,0x48,0x61,0x6c,0x6f,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
0x20,0x76,0x65,0x63,0x33,0x20,0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x43,0x6f,
0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
0x65,0x63,0x33,0x20,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x20,0x73,0x75,0x6e,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,
0x6b,0x79,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x69,0x6e,0x74,0x20,0x68,0x61,0x73,0x43,0x6c,0x6f,0x75,0x64,0x73,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x70,0x6c,0x61,0x6e,0x65,0x48,0x65,0x69,0x67,0x68,0x74,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x69,0x6e,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x54,0x79,0x70,0x65,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x77,
0x61,0x74,0x65,0x72,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x64,0x65,0x65,0x70,0x43,0x6f,
0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x75,
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x74,0x72,0x69,0x78,0x65,0x6c,0x5f,0x77,0x6f,
0x72,0x6c,0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x20,0x5f,0x32,0x30,0x30,0x3b,
0x0a,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,
0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
0x76,0x65,0x63,0x34,0x20,0x66,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x69,0x6e,
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x63,0x61,0x6d,0x3b,
0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x70,
0x6f,0x73,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,
0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,
0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
0x6f,0x72,0x3b,0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
0x66,0x72,0x65,0x73,0x6e,0x65,0x6c,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,0x28,0x68,
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x63,0x6f,0x73,0x54,0x68,
0x65,0x74,0x61,0x2c,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
0x46,0x30,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
0x20,0x46,0x30,0x20,0x2b,0x20,0x28,0x28,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,
0x29,0x20,0x2d,0x20,0x46,0x30,0x29,0x20,0x2a,0x20,0x70,0x6f,0x77,0x28,0x63,0x6c,
0x61,0x6d,0x70,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x63,0x6f,0x73,0x54,0x68,0x65,
0x74,0x61,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x2c,0x20,0x35,
0x2e,0x30,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x44,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,
0x6e,0x47,0x47,0x58,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
0x4e,0x2c,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x48,0x2c,
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x72,0x6f,0x75,
0x67,0x68,0x6e,0x65,0x73,0x73,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,
0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x36,0x20,0x3d,0x20,
0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,0x20,0x2a,0x20,0x72,0x6f,0x75,0x67,
0x68,0x6e,0x65,0x73,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x30,0x20,0x3d,0x20,0x5f,0x33,0x36,
0x20,0x2a,0x20,0x5f,0x33,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x36,0x20,0x3d,0x20,0x6d,0x61,
0x78,0x28,0x64,0x6f,0x74,0x28,0x4e,0x2c,0x20,0x48,0x29,0x2c,0x20,0x30,0x2e,0x30,
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x20,0x5f,0x35,0x39,0x20,0x3d,0x20,0x28,0x28,0x5f,0x34,0x36,0x20,0x2a,
0x20,0x5f,0x34,0x36,0x29,0x20,0x2a,0x20,0x28,0x5f,0x34,0x30,0x20,0x2d,0x20,0x31,
0x2e,0x30,0x29,0x29,0x20,0x2b,0x20,0x31,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x5f,0x34,0x30,0x20,0x2f,0x20,0x28,0x28,0x33,
0x2e,0x31,0x34,0x31,0x32,0x38,0x35,0x34,0x31,0x39,0x34,0x36,0x34,0x31,0x31,0x31,
0x33,0x32,0x38,0x31,0x32,0x35,0x20,0x2a,0x20,0x5f,0x35,0x39,0x29,0x20,0x2a,0x20,
0x5f,0x35,0x39,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,0x53,0x63,0x68,
0x6c,0x69,0x63,0x6b,0x47,0x47,0x58,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x4e,0x64,0x6f,0x74,0x56,0x2c,0x20,0x68,0x69,0x67,0x68,0x70,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x5f,0x37,0x32,0x20,0x3d,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,
0x65,0x73,0x73,0x20,0x2b,0x20,0x31,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x37,0x38,0x20,0x3d,
0x20,0x28,0x5f,0x37,0x32,0x20,0x2a,0x20,0x5f,0x37,0x32,0x29,0x20,0x2a,0x20,0x30,
0x2e,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
0x20,0x4e,0x64,0x6f,0x74,0x56,0x20,0x2f,0x20,0x28,0x28,0x4e,0x64,0x6f,0x74,0x56,
0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x37,0x38,0x29,0x29,0x20,
0x2b,0x20,0x5f,0x37,0x38,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x68,0x69,0x67,0x68,0x70,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,0x53,
0x6d,0x69,0x74,0x68,0x28,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
0x4e,0x2c,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x56,0x2c,
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x4c,0x2c,0x20,0x68,
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x72,0x6f,0x75,0x67,0x68,
0x6e,0x65,0x73,0x73,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,
0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,
0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x4e,0x2c,0x20,0x56,0x29,0x2c,0x20,0x30,
0x2e,0x30,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,0x20,0x3d,0x20,0x72,
0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,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,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x4e,0x2c,0x20,0x4c,
0x29,0x2c,0x20,0x30,0x2e,0x30,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,0x33,
0x20,0x3d,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,
0x79,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,0x47,0x47,0x58,0x28,0x70,0x61,0x72,0x61,
0x6d,0x5f,0x32,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,0x20,0x2a,0x20,
0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,0x47,
0x47,0x58,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
0x31,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,
0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x31,0x35,
0x30,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x72,0x6f,0x75,0x6e,0x64,0x28,0x63,0x6f,
0x6c,0x6f,0x72,0x2e,0x77,0x20,0x2a,0x20,0x32,0x35,0x35,0x2e,0x30,0x29,0x29,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x20,0x5f,0x31,0x37,0x32,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x66,0x6c,0x6f,0x61,
0x74,0x28,0x28,0x5f,0x31,0x35,0x30,0x20,0x3e,0x3e,0x20,0x35,0x29,0x20,0x26,0x20,
0x37,0x29,0x20,0x2a,0x20,0x30,0x2e,0x31,0x34,0x32,0x38,0x35,0x37,0x31,0x34,0x39,
0x32,0x34,0x33,0x33,0x35,0x34,0x37,0x39,0x37,0x33,0x36,0x33,0x32,0x38,0x31,0x32,
0x35,0x2c,0x20,0x30,0x2e,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x37,0x34,
0x35,0x30,0x35,0x38,0x30,0x35,0x39,0x36,0x39,0x32,0x33,0x38,0x32,0x38,0x31,0x32,
0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x5f,0x31,0x37,0x38,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x28,0x28,0x5f,0x31,0x35,0x30,0x20,0x3e,0x3e,0x20,0x33,0x29,0x20,0x26,0x20,0x33,
0x29,0x20,0x2a,0x20,0x30,0x2e,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x34,0x33,0x32,
0x36,0x37,0x34,0x34,0x30,0x37,0x39,0x35,0x38,0x39,0x38,0x34,0x33,0x37,0x35,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
0x6c,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x78,0x79,
0x7a,0x20,0x2a,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,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,
0x31,0x38,0x37,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,
0x66,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x31,0x39,
0x36,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x63,0x61,
0x6d,0x20,0x2d,0x20,0x70,0x6f,0x73,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x30,
0x35,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,0x32,
0x30,0x30,0x2e,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
0x5f,0x32,0x31,0x30,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,
0x28,0x5f,0x31,0x39,0x36,0x20,0x2b,0x20,0x5f,0x32,0x30,0x35,0x29,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,
0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x5f,
0x32,0x31,0x30,0x2c,0x20,0x5f,0x31,0x39,0x36,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x76,
0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x33,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x31,
0x30,0x35,0x39,0x33,0x30,0x33,0x32,0x38,0x33,0x36,0x39,0x31,0x34,0x30,0x36,0x32,
0x35,0x29,0x2c,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,
0x65,0x63,0x33,0x28,0x5f,0x31,0x37,0x38,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x32,0x37,0x20,
0x3d,0x20,0x66,0x72,0x65,0x73,0x6e,0x65,0x6c,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,
0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x5f,0x31,0x38,0x37,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,
0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x32,0x31,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,0x34,0x20,0x3d,0x20,0x5f,0x31,0x37,0x32,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,
0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x5f,0x31,0x38,0x37,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,
0x72,0x61,0x6d,0x5f,0x36,0x20,0x3d,0x20,0x5f,0x31,0x39,0x36,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,
0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x32,0x30,0x35,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,
0x61,0x6d,0x5f,0x38,0x20,0x3d,0x20,0x5f,0x31,0x37,0x32,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x36,
0x32,0x20,0x3d,0x20,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x38,0x37,
0x2c,0x20,0x5f,0x32,0x30,0x35,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,
0x39,0x34,0x20,0x3d,0x20,0x6c,0x69,0x67,0x68,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x32,0x39,0x35,0x20,
0x3d,0x20,0x5f,0x32,0x39,0x34,0x20,0x2b,0x20,0x28,0x28,0x28,0x28,0x28,0x28,0x76,
0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x20,0x2d,0x20,0x5f,0x32,0x32,0x37,0x29,
0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,0x31,0x37,0x38,0x29,0x29,
0x20,0x2a,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,0x20,
0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x33,0x31,0x38,0x33,0x34,0x31,0x30,0x31,0x36,
0x37,0x36,0x39,0x34,0x30,0x39,0x31,0x37,0x39,0x36,0x38,0x37,0x35,0x29,0x29,0x20,
0x2b,0x20,0x28,0x28,0x5f,0x32,0x32,0x37,0x20,0x2a,0x20,0x28,0x44,0x69,0x73,0x74,
0x72,0x69,0x62,0x75,0x74,0x69,0x6f,0x6e,0x47,0x47,0x58,0x28,0x70,0x61,0x72,0x61,
0x6d,0x5f,0x32,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x2c,0x20,0x70,0x61,
0x72,0x61,0x6d,0x5f,0x34,0x29,0x20,0x2a,0x20,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,
0x79,0x53,0x6d,0x69,0x74,0x68,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x2c,0x20,
0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,
0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x29,0x29,0x29,0x20,0x2f,0x20,0x76,
0x65,0x63,0x33,0x28,0x28,0x28,0x34,0x2e,0x30,0x20,0x2a,0x20,0x6d,0x61,0x78,0x28,
0x64,0x6f,0x74,0x28,0x5f,0x31,0x38,0x37,0x2c,0x20,0x5f,0x31,0x39,0x36,0x29,0x2c,
0x20,0x30,0x2e,0x30,0x29,0x29,0x20,0x2a,0x20,0x5f,0x32,0x36,0x32,0x29,0x20,0x2b,
0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x33,0x37,0x38,0x37,
0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,0x35,0x32,0x36,0x33,0x36,0x37,0x31,
0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x29,0x29,0x20,0x2a,0x20,0x5f,0x32,0x36,0x32,
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6c,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x5f,
0x32,0x39,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x5f,0x32,0x39,0x35,0x2c,
0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
];
/*
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct vs_params
{
float4x4 mvp;
float3 camera;
};
struct main0_out
{
float4 color [[user(locn0)]];
float4 fnormal [[user(locn1)]];
float4 pos [[user(locn2)]];
float3 cam [[user(locn3)]];
float4 gl_Position [[position]];
};
struct main0_in
{
float4 position [[attribute(0)]];
float4 normal [[attribute(1)]];
float4 inst [[attribute(2)]];
float4 inst_col [[attribute(3)]];
};
vertex main0_out main0(main0_in in [[stage_in]], constant vs_params& _26 [[buffer(0)]])
{
main0_out out = {};
out.gl_Position = _26.mvp * float4(in.position.xyz + in.inst.xyz, 1.0);
out.fnormal = in.normal;
out.color = in.inst_col;
out.pos = out.gl_Position;
out.cam = _26.camera;
return out;
}
*/
vs_trixel_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,0x76,
0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x6d,0x76,0x70,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x63,0x61,0x6d,0x65,0x72,0x61,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,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,
0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x34,0x20,0x66,0x6e,0x6f,0x72,0x6d,0x61,0x6c,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,0x70,0x6f,0x73,0x20,0x5b,0x5b,0x75,0x73,
0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x63,0x61,0x6d,0x20,0x5b,0x5b,0x75,0x73,
0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x33,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,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,
0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x31,0x29,0x5d,0x5d,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x69,0x6e,0x73,
0x74,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x32,0x29,
0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x69,
0x6e,0x73,0x74,0x5f,0x63,0x6f,0x6c,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,
0x75,0x74,0x65,0x28,0x33,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,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,
0x73,0x26,0x20,0x5f,0x32,0x36,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,
0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,
0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x32,0x36,0x2e,0x6d,0x76,0x70,0x20,0x2a,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,
0x6f,0x6e,0x2e,0x78,0x79,0x7a,0x20,0x2b,0x20,0x69,0x6e,0x2e,0x69,0x6e,0x73,0x74,
0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x6f,0x75,0x74,0x2e,0x66,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x69,0x6e,
0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,
0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x69,0x6e,0x73,0x74,
0x5f,0x63,0x6f,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x70,0x6f,
0x73,0x20,0x3d,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x63,0x61,0x6d,
0x20,0x3d,0x20,0x5f,0x32,0x36,0x2e,0x63,0x61,0x6d,0x65,0x72,0x61,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 trixel_world_config
{
float3 skyBase;
float3 skyTop;
float3 sunDisk;
float3 horizonHalo;
float3 sunHalo;
float3 sunLightColor;
packed_float3 sunPosition;
float sunIntensity;
float skyIntensity;
int hasClouds;
float planeHeight;
int planeType;
float3 waterColor;
packed_float3 deepColor;
float time;
};
struct main0_out
{
float4 frag_color [[color(0)]];
};
struct main0_in
{
float4 color [[user(locn0)]];
float4 fnormal [[user(locn1)]];
float4 pos [[user(locn2)]];
float3 cam [[user(locn3)]];
};
static inline __attribute__((always_inline))
float3 fresnelSchlick(thread const float& cosTheta, thread const float3& F0)
{
return F0 + ((float3(1.0) - F0) * powr(fast::clamp(1.0 - cosTheta, 0.0, 1.0), 5.0));
}
static inline __attribute__((always_inline))
float DistributionGGX(thread const float3& N, thread const float3& H, thread const float& roughness)
{
float _36 = roughness * roughness;
float _40 = _36 * _36;
float _46 = fast::max(dot(N, H), 0.0);
float _59 = ((_46 * _46) * (_40 - 1.0)) + 1.0;
return _40 / ((3.141285419464111328125 * _59) * _59);
}
static inline __attribute__((always_inline))
float GeometrySchlickGGX(thread const float& NdotV, thread const float& roughness)
{
float _72 = roughness + 1.0;
float _78 = (_72 * _72) * 0.125;
return NdotV / ((NdotV * (1.0 - _78)) + _78);
}
static inline __attribute__((always_inline))
float GeometrySmith(thread const float3& N, thread const float3& V, thread const float3& L, thread const float& roughness)
{
float param = fast::max(dot(N, V), 0.0);
float param_1 = roughness;
float param_2 = fast::max(dot(N, L), 0.0);
float param_3 = roughness;
return GeometrySchlickGGX(param_2, param_3) * GeometrySchlickGGX(param, param_1);
}
fragment main0_out main0(main0_in in [[stage_in]], constant trixel_world_config& _200 [[buffer(0)]])
{
main0_out out = {};
int _150 = int(round(in.color.w * 255.0));
float _172 = fast::max(float((_150 >> 5) & 7) * 0.14285714924335479736328125, 0.0500000007450580596923828125);
float _178 = float((_150 >> 3) & 3) * 0.3333333432674407958984375;
float3 light = in.color.xyz * 0.300000011920928955078125;
float3 _187 = fast::normalize(in.fnormal.xyz);
float3 _196 = fast::normalize(in.cam - in.pos.xyz);
float3 _205 = fast::normalize(float3(_200.sunPosition));
float3 _210 = fast::normalize(_196 + _205);
float param = fast::max(dot(_210, _196), 0.0);
float3 param_1 = mix(float3(0.039999999105930328369140625), in.color.xyz, float3(_178));
float3 _227 = fresnelSchlick(param, param_1);
float3 param_2 = _187;
float3 param_3 = _210;
float param_4 = _172;
float3 param_5 = _187;
float3 param_6 = _196;
float3 param_7 = _205;
float param_8 = _172;
float _262 = fast::max(dot(_187, _205), 0.0);
float3 _294 = light;
float3 _295 = _294 + ((((((float3(1.0) - _227) * (1.0 - _178)) * in.color.xyz) * float3(0.3183410167694091796875)) + ((_227 * (DistributionGGX(param_2, param_3, param_4) * GeometrySmith(param_5, param_6, param_7, param_8))) / float3(((4.0 * fast::max(dot(_187, _196), 0.0)) * _262) + 9.9999997473787516355514526367188e-05))) * _262);
light = _295;
out.frag_color = float4(_295, 1.0);
return out;
}
*/
fs_trixel_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,0x74,0x72,0x69,0x78,0x65,0x6c,0x5f,0x77,
0x6f,0x72,0x6c,0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x0a,0x7b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,0x6b,0x79,0x42,0x61,0x73,0x65,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,0x6b,0x79,
0x54,0x6f,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,
0x73,0x75,0x6e,0x44,0x69,0x73,0x6b,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x33,0x20,0x68,0x6f,0x72,0x69,0x7a,0x6f,0x6e,0x48,0x61,0x6c,0x6f,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x73,0x75,0x6e,0x48,
0x61,0x6c,0x6f,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,
0x73,0x75,0x6e,0x4c,0x69,0x67,0x68,0x74,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x70,0x61,0x63,0x6b,0x65,0x64,0x5f,0x66,0x6c,0x6f,0x61,0x74,0x33,
0x20,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x73,0x75,0x6e,0x49,0x6e,0x74,0x65,0x6e,
0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x73,0x6b,0x79,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x69,0x6e,0x74,0x20,0x68,0x61,0x73,0x43,0x6c,0x6f,0x75,0x64,0x73,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,
0x48,0x65,0x69,0x67,0x68,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,
0x70,0x6c,0x61,0x6e,0x65,0x54,0x79,0x70,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x33,0x20,0x77,0x61,0x74,0x65,0x72,0x43,0x6f,0x6c,0x6f,0x72,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x70,0x61,0x63,0x6b,0x65,0x64,0x5f,0x66,0x6c,0x6f,
0x61,0x74,0x33,0x20,0x64,0x65,0x65,0x70,0x43,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x74,0x69,0x6d,0x65,0x3b,0x0a,0x7d,
0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,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,0x63,0x6f,0x6c,0x6f,0x72,
0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x6e,0x6f,
0x72,0x6d,0x61,0x6c,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,0x70,0x6f,0x73,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
0x20,0x63,0x61,0x6d,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,
0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,
0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,
0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,
0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x66,0x72,
0x65,0x73,0x6e,0x65,0x6c,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,0x28,0x74,0x68,0x72,
0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,
0x20,0x63,0x6f,0x73,0x54,0x68,0x65,0x74,0x61,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,
0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,
0x46,0x30,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
0x20,0x46,0x30,0x20,0x2b,0x20,0x28,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,
0x2e,0x30,0x29,0x20,0x2d,0x20,0x46,0x30,0x29,0x20,0x2a,0x20,0x70,0x6f,0x77,0x72,
0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x63,0x6c,0x61,0x6d,0x70,0x28,0x31,0x2e,0x30,
0x20,0x2d,0x20,0x63,0x6f,0x73,0x54,0x68,0x65,0x74,0x61,0x2c,0x20,0x30,0x2e,0x30,
0x2c,0x20,0x31,0x2e,0x30,0x29,0x2c,0x20,0x35,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x7d,
0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,
0x5f,0x5f,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,
0x6c,0x77,0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x44,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6f,
0x6e,0x47,0x47,0x58,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,
0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x4e,0x2c,0x20,0x74,0x68,0x72,
0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
0x26,0x20,0x48,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,
0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,
0x73,0x73,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x5f,0x33,0x36,0x20,0x3d,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,0x20,
0x2a,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x30,0x20,0x3d,0x20,0x5f,0x33,0x36,
0x20,0x2a,0x20,0x5f,0x33,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x20,0x5f,0x34,0x36,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,
0x78,0x28,0x64,0x6f,0x74,0x28,0x4e,0x2c,0x20,0x48,0x29,0x2c,0x20,0x30,0x2e,0x30,
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x35,0x39,
0x20,0x3d,0x20,0x28,0x28,0x5f,0x34,0x36,0x20,0x2a,0x20,0x5f,0x34,0x36,0x29,0x20,
0x2a,0x20,0x28,0x5f,0x34,0x30,0x20,0x2d,0x20,0x31,0x2e,0x30,0x29,0x29,0x20,0x2b,
0x20,0x31,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
0x20,0x5f,0x34,0x30,0x20,0x2f,0x20,0x28,0x28,0x33,0x2e,0x31,0x34,0x31,0x32,0x38,
0x35,0x34,0x31,0x39,0x34,0x36,0x34,0x31,0x31,0x31,0x33,0x32,0x38,0x31,0x32,0x35,
0x20,0x2a,0x20,0x5f,0x35,0x39,0x29,0x20,0x2a,0x20,0x5f,0x35,0x39,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,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,0x53,0x63,
0x68,0x6c,0x69,0x63,0x6b,0x47,0x47,0x58,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,
0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x4e,0x64,0x6f,
0x74,0x56,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,
0x73,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,
0x37,0x32,0x20,0x3d,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,0x73,0x73,0x20,0x2b,
0x20,0x31,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x5f,0x37,0x38,0x20,0x3d,0x20,0x28,0x5f,0x37,0x32,0x20,0x2a,0x20,0x5f,0x37,0x32,
0x29,0x20,0x2a,0x20,0x30,0x2e,0x31,0x32,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,
0x65,0x74,0x75,0x72,0x6e,0x20,0x4e,0x64,0x6f,0x74,0x56,0x20,0x2f,0x20,0x28,0x28,
0x4e,0x64,0x6f,0x74,0x56,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,
0x37,0x38,0x29,0x29,0x20,0x2b,0x20,0x5f,0x37,0x38,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,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,0x53,0x6d,0x69,0x74,0x68,
0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x33,0x26,0x20,0x4e,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,
0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x26,0x20,0x56,0x2c,
0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x33,0x26,0x20,0x4c,0x2c,0x20,0x74,0x68,0x72,0x65,0x61,0x64,0x20,
0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x72,0x6f,0x75,
0x67,0x68,0x6e,0x65,0x73,0x73,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,
0x3a,0x3a,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x4e,0x2c,0x20,0x56,0x29,0x2c,
0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x72,0x6f,0x75,0x67,0x68,
0x6e,0x65,0x73,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,
0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x4e,0x2c,0x20,0x4c,0x29,0x2c,0x20,0x30,
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,
0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x72,0x6f,0x75,0x67,0x68,0x6e,0x65,
0x73,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x47,
0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,0x47,0x47,
0x58,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,
0x5f,0x33,0x29,0x20,0x2a,0x20,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,0x53,0x63,
0x68,0x6c,0x69,0x63,0x6b,0x47,0x47,0x58,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,
0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x72,0x61,
0x67,0x6d,0x65,0x6e,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,
0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,
0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,
0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x74,0x72,0x69,0x78,0x65,0x6c,0x5f,
0x77,0x6f,0x72,0x6c,0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x26,0x20,0x5f,0x32,
0x30,0x30,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,
0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,
0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x69,0x6e,0x74,0x20,0x5f,0x31,0x35,0x30,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x72,
0x6f,0x75,0x6e,0x64,0x28,0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x77,0x20,
0x2a,0x20,0x32,0x35,0x35,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x37,0x32,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,
0x3a,0x3a,0x6d,0x61,0x78,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x28,0x5f,0x31,0x35,
0x30,0x20,0x3e,0x3e,0x20,0x35,0x29,0x20,0x26,0x20,0x37,0x29,0x20,0x2a,0x20,0x30,
0x2e,0x31,0x34,0x32,0x38,0x35,0x37,0x31,0x34,0x39,0x32,0x34,0x33,0x33,0x35,0x34,
0x37,0x39,0x37,0x33,0x36,0x33,0x32,0x38,0x31,0x32,0x35,0x2c,0x20,0x30,0x2e,0x30,
0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x37,0x34,0x35,0x30,0x35,0x38,0x30,0x35,
0x39,0x36,0x39,0x32,0x33,0x38,0x32,0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x31,0x37,0x38,0x20,0x3d,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x28,0x28,0x5f,0x31,0x35,0x30,0x20,0x3e,0x3e,0x20,0x33,0x29,
0x20,0x26,0x20,0x33,0x29,0x20,0x2a,0x20,0x30,0x2e,0x33,0x33,0x33,0x33,0x33,0x33,
0x33,0x34,0x33,0x32,0x36,0x37,0x34,0x34,0x30,0x37,0x39,0x35,0x38,0x39,0x38,0x34,
0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,
0x6c,0x69,0x67,0x68,0x74,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,
0x2e,0x78,0x79,0x7a,0x20,0x2a,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,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x31,
0x38,0x37,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,
0x6c,0x69,0x7a,0x65,0x28,0x69,0x6e,0x2e,0x66,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,
0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
0x20,0x5f,0x31,0x39,0x36,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,
0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x69,0x6e,0x2e,0x63,0x61,0x6d,0x20,0x2d,
0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,0x30,0x35,0x20,0x3d,0x20,
0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,
0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x32,0x30,0x30,0x2e,0x73,0x75,0x6e,0x50,
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,0x31,0x30,0x20,0x3d,0x20,0x66,0x61,0x73,
0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x5f,0x31,0x39,
0x36,0x20,0x2b,0x20,0x5f,0x32,0x30,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x66,0x61,0x73,
0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x5f,0x32,0x31,0x30,0x2c,
0x20,0x5f,0x31,0x39,0x36,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,
0x30,0x33,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x31,0x30,0x35,0x39,0x33,0x30,0x33,
0x32,0x38,0x33,0x36,0x39,0x31,0x34,0x30,0x36,0x32,0x35,0x29,0x2c,0x20,0x69,0x6e,
0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x33,0x28,0x5f,0x31,0x37,0x38,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,0x32,0x37,0x20,0x3d,0x20,0x66,0x72,0x65,
0x73,0x6e,0x65,0x6c,0x53,0x63,0x68,0x6c,0x69,0x63,0x6b,0x28,0x70,0x61,0x72,0x61,
0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,
0x3d,0x20,0x5f,0x31,0x38,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x5f,0x32,0x31,
0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,
0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,0x5f,0x31,0x37,0x32,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,
0x3d,0x20,0x5f,0x31,0x38,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x36,0x20,0x3d,0x20,0x5f,0x31,0x39,
0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,
0x72,0x61,0x6d,0x5f,0x37,0x20,0x3d,0x20,0x5f,0x32,0x30,0x35,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x38,0x20,
0x3d,0x20,0x5f,0x31,0x37,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x20,0x5f,0x32,0x36,0x32,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,
0x61,0x78,0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x38,0x37,0x2c,0x20,0x5f,0x32,0x30,
0x35,0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,0x39,0x34,0x20,0x3d,0x20,0x6c,0x69,0x67,0x68,
0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x32,
0x39,0x35,0x20,0x3d,0x20,0x5f,0x32,0x39,0x34,0x20,0x2b,0x20,0x28,0x28,0x28,0x28,
0x28,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x20,0x2d,0x20,
0x5f,0x32,0x32,0x37,0x29,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x5f,
0x31,0x37,0x38,0x29,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,
0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,
0x2e,0x33,0x31,0x38,0x33,0x34,0x31,0x30,0x31,0x36,0x37,0x36,0x39,0x34,0x30,0x39,
0x31,0x37,0x39,0x36,0x38,0x37,0x35,0x29,0x29,0x20,0x2b,0x20,0x28,0x28,0x5f,0x32,
0x32,0x37,0x20,0x2a,0x20,0x28,0x44,0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,
0x6f,0x6e,0x47,0x47,0x58,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x2c,0x20,0x70,
0x61,0x72,0x61,0x6d,0x5f,0x33,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x29,
0x20,0x2a,0x20,0x47,0x65,0x6f,0x6d,0x65,0x74,0x72,0x79,0x53,0x6d,0x69,0x74,0x68,
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
0x36,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x37,0x2c,0x20,0x70,0x61,0x72,0x61,
0x6d,0x5f,0x38,0x29,0x29,0x29,0x20,0x2f,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,
0x28,0x28,0x34,0x2e,0x30,0x20,0x2a,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,
0x78,0x28,0x64,0x6f,0x74,0x28,0x5f,0x31,0x38,0x37,0x2c,0x20,0x5f,0x31,0x39,0x36,
0x29,0x2c,0x20,0x30,0x2e,0x30,0x29,0x29,0x20,0x2a,0x20,0x5f,0x32,0x36,0x32,0x29,
0x20,0x2b,0x20,0x39,0x2e,0x39,0x39,0x39,0x39,0x39,0x39,0x37,0x34,0x37,0x33,0x37,
0x38,0x37,0x35,0x31,0x36,0x33,0x35,0x35,0x35,0x31,0x34,0x35,0x32,0x36,0x33,0x36,
0x37,0x31,0x38,0x38,0x65,0x2d,0x30,0x35,0x29,0x29,0x29,0x20,0x2a,0x20,0x5f,0x32,
0x36,0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6c,0x69,0x67,0x68,0x74,0x20,0x3d,
0x20,0x5f,0x32,0x39,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,
0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x34,0x28,0x5f,0x32,0x39,0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,
0x0a,0x0a,0x00,
];
trixel_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
desc: sg_shader_desc;
desc.label = "trixel_shader";
if backend == {
case .GLCORE;
desc.vertex_func.source = xx *vs_trixel_source_glsl430;
desc.vertex_func.entry = "main";
desc.fragment_func.source = xx *fs_trixel_source_glsl430;
desc.fragment_func.entry = "main";
desc.attrs[0].base_type = .FLOAT;
desc.attrs[0].glsl_name = "position";
desc.attrs[1].base_type = .FLOAT;
desc.attrs[1].glsl_name = "normal";
desc.attrs[2].base_type = .FLOAT;
desc.attrs[2].glsl_name = "inst";
desc.attrs[3].base_type = .FLOAT;
desc.attrs[3].glsl_name = "inst_col";
desc.uniform_blocks[0].stage = .VERTEX;
desc.uniform_blocks[0].layout = .STD140;
desc.uniform_blocks[0].size = 80;
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 5;
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "vs_params";
desc.uniform_blocks[1].stage = .FRAGMENT;
desc.uniform_blocks[1].layout = .STD140;
desc.uniform_blocks[1].size = 160;
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT3;
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.hasClouds";
desc.uniform_blocks[1].glsl_uniforms[10].type = .FLOAT;
desc.uniform_blocks[1].glsl_uniforms[10].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[10].glsl_name = "_200.planeHeight";
desc.uniform_blocks[1].glsl_uniforms[11].type = .INT;
desc.uniform_blocks[1].glsl_uniforms[11].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[11].glsl_name = "_200.planeType";
desc.uniform_blocks[1].glsl_uniforms[12].type = .FLOAT3;
desc.uniform_blocks[1].glsl_uniforms[12].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[12].glsl_name = "_200.waterColor";
desc.uniform_blocks[1].glsl_uniforms[13].type = .FLOAT3;
desc.uniform_blocks[1].glsl_uniforms[13].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[13].glsl_name = "_200.deepColor";
desc.uniform_blocks[1].glsl_uniforms[14].type = .FLOAT;
desc.uniform_blocks[1].glsl_uniforms[14].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[14].glsl_name = "_200.time";
case .GLES3;
desc.vertex_func.source = xx *vs_trixel_source_glsl300es;
desc.vertex_func.entry = "main";
desc.fragment_func.source = xx *fs_trixel_source_glsl300es;
desc.fragment_func.entry = "main";
desc.attrs[0].base_type = .FLOAT;
desc.attrs[0].glsl_name = "position";
desc.attrs[1].base_type = .FLOAT;
desc.attrs[1].glsl_name = "normal";
desc.attrs[2].base_type = .FLOAT;
desc.attrs[2].glsl_name = "inst";
desc.attrs[3].base_type = .FLOAT;
desc.attrs[3].glsl_name = "inst_col";
desc.uniform_blocks[0].stage = .VERTEX;
desc.uniform_blocks[0].layout = .STD140;
desc.uniform_blocks[0].size = 80;
desc.uniform_blocks[0].glsl_uniforms[0].type = .FLOAT4;
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 5;
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "vs_params";
desc.uniform_blocks[1].stage = .FRAGMENT;
desc.uniform_blocks[1].layout = .STD140;
desc.uniform_blocks[1].size = 160;
desc.uniform_blocks[1].glsl_uniforms[0].type = .FLOAT3;
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.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 = "_200.hasClouds";
desc.uniform_blocks[1].glsl_uniforms[10].type = .FLOAT;
desc.uniform_blocks[1].glsl_uniforms[10].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[10].glsl_name = "_200.planeHeight";
desc.uniform_blocks[1].glsl_uniforms[11].type = .INT;
desc.uniform_blocks[1].glsl_uniforms[11].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[11].glsl_name = "_200.planeType";
desc.uniform_blocks[1].glsl_uniforms[12].type = .FLOAT3;
desc.uniform_blocks[1].glsl_uniforms[12].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[12].glsl_name = "_200.waterColor";
desc.uniform_blocks[1].glsl_uniforms[13].type = .FLOAT3;
desc.uniform_blocks[1].glsl_uniforms[13].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[13].glsl_name = "_200.deepColor";
desc.uniform_blocks[1].glsl_uniforms[14].type = .FLOAT;
desc.uniform_blocks[1].glsl_uniforms[14].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[14].glsl_name = "_200.time";
case .METAL_MACOS;
desc.vertex_func.source = xx *vs_trixel_source_metal_macos;
desc.vertex_func.entry = "main0";
desc.fragment_func.source = xx *fs_trixel_source_metal_macos;
desc.fragment_func.entry = "main0";
desc.attrs[0].base_type = .FLOAT;
desc.attrs[1].base_type = .FLOAT;
desc.attrs[2].base_type = .FLOAT;
desc.attrs[3].base_type = .FLOAT;
desc.uniform_blocks[0].stage = .VERTEX;
desc.uniform_blocks[0].layout = .STD140;
desc.uniform_blocks[0].size = 80;
desc.uniform_blocks[0].msl_buffer_n = 0;
desc.uniform_blocks[1].stage = .FRAGMENT;
desc.uniform_blocks[1].layout = .STD140;
desc.uniform_blocks[1].size = 160;
desc.uniform_blocks[1].msl_buffer_n = 0;
}
return desc;
}