trueno/src/shaders/jai/shader_gbuffer.jai
2026-03-04 19:30:50 +02:00

1207 lines
73 KiB
Plaintext

/*
#version:1# (machine generated, don't edit!)
Generated by sokol-shdc (https://github.com/floooh/sokol-tools)
Cmdline:
sokol-shdc -i shader_gbuffer.glsl -o ./jai/shader_gbuffer.jai -l glsl430:glsl300es:metal_macos -f sokol_jai
Overview:
=========
Shader program: 'gbuffer':
Get shader desc: gbuffer_shader_desc(sg_query_backend())
Vertex Shader: vs_g
Fragment Shader: fs_g
Attributes:
ATTR_gbuffer_position => 0
ATTR_gbuffer_normal => 1
ATTR_gbuffer_centre => 2
ATTR_gbuffer_instance => 3
Bindings:
Uniform block 'gbuffer_vs_params':
Jai struct: Gbuffer_Vs_Params
Bind slot: UB_gbuffer_vs_params => 0
*/
ATTR_gbuffer_position :: 0;
ATTR_gbuffer_normal :: 1;
ATTR_gbuffer_centre :: 2;
ATTR_gbuffer_instance :: 3;
UB_gbuffer_vs_params :: 0;
Gbuffer_Vs_Params :: struct {
mvp: [16]float;
view_matrix: [16]float;
isGround: s32;
planeHeight: float;
_: [8]u8;
};
/*
#version 430
struct gbuffer_vs_params
{
mat4 mvp;
mat4 view_matrix;
int isGround;
float planeHeight;
};
uniform gbuffer_vs_params _161;
layout(location = 0) in vec4 position;
layout(location = 0) out vec3 view_space_pos;
layout(location = 1) out vec3 view_space_normal;
layout(location = 1) in vec4 normal;
layout(location = 3) in vec4 instance;
layout(location = 2) in vec4 centre;
mat3 gbuf_rot_x(float a)
{
float _28 = cos(a);
float _31 = sin(a);
return mat3(vec3(1.0, 0.0, 0.0), vec3(0.0, _28, -_31), vec3(0.0, _31, _28));
}
mat3 gbuf_rot_z(float a)
{
float _47 = cos(a);
float _50 = sin(a);
return mat3(vec3(_47, -_50, 0.0), vec3(_50, _47, 0.0), vec3(0.0, 0.0, 1.0));
}
mat3 gbuf_rot_y(float a)
{
float _64 = cos(a);
float _67 = sin(a);
return mat3(vec3(_64, 0.0, _67), vec3(0.0, 1.0, 0.0), vec3(-_67, 0.0, _64));
}
mat3 gbuf_get_orientation_matrix(int ori)
{
int _82 = ori / 4;
mat3 base;
if (_82 == 0)
{
base = mat3(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), vec3(0.0, 0.0, 1.0));
}
else
{
if (_82 == 1)
{
float param = 3.1415927410125732421875;
base = gbuf_rot_x(param);
}
else
{
if (_82 == 2)
{
float param_1 = -1.57079637050628662109375;
base = gbuf_rot_z(param_1);
}
else
{
if (_82 == 3)
{
float param_2 = 1.57079637050628662109375;
base = gbuf_rot_z(param_2);
}
else
{
if (_82 == 4)
{
float param_3 = 1.57079637050628662109375;
base = gbuf_rot_x(param_3);
}
else
{
float param_4 = -1.57079637050628662109375;
base = gbuf_rot_x(param_4);
}
}
}
}
}
float param_5 = float(ori % 4) * 1.57079637050628662109375;
return base * gbuf_rot_y(param_5);
}
void main()
{
if (_161.isGround == 1)
{
vec4 _186 = vec4(position.x * 100.0, _161.planeHeight, position.z * 100.0, 1.0);
gl_Position = _161.mvp * _186;
view_space_pos = (_161.view_matrix * _186).xyz;
view_space_normal = mat3(_161.view_matrix[0].xyz, _161.view_matrix[1].xyz, _161.view_matrix[2].xyz) * normal.xyz;
}
else
{
int param = int(round(instance.w));
mat3 _233 = gbuf_get_orientation_matrix(param);
vec4 _254 = vec4(((_233 * (position.xyz - vec3(0.5))) + vec3(0.5)) + instance.xyz, 1.0);
gl_Position = _161.mvp * _254;
view_space_pos = (_161.view_matrix * _254).xyz;
view_space_normal = mat3(_161.view_matrix[0].xyz, _161.view_matrix[1].xyz, _161.view_matrix[2].xyz) * (_233 * normal.xyz);
}
}
*/
vs_g_source_glsl430 := u8.[
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x73,0x74,
0x72,0x75,0x63,0x74,0x20,0x67,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,0x76,0x73,0x5f,
0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,
0x34,0x20,0x6d,0x76,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,0x34,0x20,
0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x69,0x6e,0x74,0x20,0x69,0x73,0x47,0x72,0x6f,0x75,0x6e,0x64,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x48,0x65,
0x69,0x67,0x68,0x74,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,
0x6d,0x20,0x67,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,
0x61,0x6d,0x73,0x20,0x5f,0x31,0x36,0x31,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,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,0x33,0x20,
0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,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,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x69,
0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,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,0x33,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,
0x63,0x34,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,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,0x63,0x65,0x6e,0x74,0x72,0x65,
0x3b,0x0a,0x0a,0x6d,0x61,0x74,0x33,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,
0x5f,0x78,0x28,0x66,0x6c,0x6f,0x61,0x74,0x20,0x61,0x29,0x0a,0x7b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x38,0x20,0x3d,0x20,0x63,0x6f,
0x73,0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x5f,0x33,0x31,0x20,0x3d,0x20,0x73,0x69,0x6e,0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x74,0x33,0x28,0x76,0x65,
0x63,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,
0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x32,0x38,
0x2c,0x20,0x2d,0x5f,0x33,0x31,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,
0x30,0x2c,0x20,0x5f,0x33,0x31,0x2c,0x20,0x5f,0x32,0x38,0x29,0x29,0x3b,0x0a,0x7d,
0x0a,0x0a,0x6d,0x61,0x74,0x33,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,
0x7a,0x28,0x66,0x6c,0x6f,0x61,0x74,0x20,0x61,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x37,0x20,0x3d,0x20,0x63,0x6f,0x73,
0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,
0x35,0x30,0x20,0x3d,0x20,0x73,0x69,0x6e,0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x74,0x33,0x28,0x76,0x65,0x63,
0x33,0x28,0x5f,0x34,0x37,0x2c,0x20,0x2d,0x5f,0x35,0x30,0x2c,0x20,0x30,0x2e,0x30,
0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x35,0x30,0x2c,0x20,0x5f,0x34,0x37,
0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,
0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x7d,0x0a,
0x0a,0x6d,0x61,0x74,0x33,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x79,
0x28,0x66,0x6c,0x6f,0x61,0x74,0x20,0x61,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x34,0x20,0x3d,0x20,0x63,0x6f,0x73,0x28,
0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,
0x37,0x20,0x3d,0x20,0x73,0x69,0x6e,0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x74,0x33,0x28,0x76,0x65,0x63,0x33,
0x28,0x5f,0x36,0x34,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x36,0x37,0x29,0x2c,
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,
0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x2d,0x5f,0x36,0x37,0x2c,
0x20,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x36,0x34,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,
0x6d,0x61,0x74,0x33,0x20,0x67,0x62,0x75,0x66,0x5f,0x67,0x65,0x74,0x5f,0x6f,0x72,
0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,
0x28,0x69,0x6e,0x74,0x20,0x6f,0x72,0x69,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x69,0x6e,0x74,0x20,0x5f,0x38,0x32,0x20,0x3d,0x20,0x6f,0x72,0x69,0x20,0x2f,0x20,
0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,0x33,0x20,0x62,0x61,0x73,0x65,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x38,0x32,0x20,0x3d,0x3d,
0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x6d,0x61,0x74,0x33,0x28,0x76,0x65,
0x63,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,
0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,
0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,
0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,
0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,
0x38,0x32,0x20,0x3d,0x3d,0x20,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x33,0x2e,0x31,
0x34,0x31,0x35,0x39,0x32,0x37,0x34,0x31,0x30,0x31,0x32,0x35,0x37,0x33,0x32,0x34,
0x32,0x31,0x38,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,
0x6f,0x74,0x5f,0x78,0x28,0x70,0x61,0x72,0x61,0x6d,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,0x69,0x66,0x20,0x28,0x5f,0x38,
0x32,0x20,0x3d,0x3d,0x20,0x32,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,
0x6d,0x5f,0x31,0x20,0x3d,0x20,0x2d,0x31,0x2e,0x35,0x37,0x30,0x37,0x39,0x36,0x33,
0x37,0x30,0x35,0x30,0x36,0x32,0x38,0x36,0x36,0x32,0x31,0x30,0x39,0x33,0x37,0x35,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,
0x74,0x5f,0x7a,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,
0x38,0x32,0x20,0x3d,0x3d,0x20,0x33,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x31,
0x2e,0x35,0x37,0x30,0x37,0x39,0x36,0x33,0x37,0x30,0x35,0x30,0x36,0x32,0x38,0x36,
0x36,0x32,0x31,0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,
0x73,0x65,0x20,0x3d,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x7a,0x28,
0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x38,0x32,0x20,0x3d,
0x3d,0x20,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,
0x20,0x3d,0x20,0x31,0x2e,0x35,0x37,0x30,0x37,0x39,0x36,0x33,0x37,0x30,0x35,0x30,
0x36,0x32,0x38,0x36,0x36,0x32,0x31,0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x67,0x62,0x75,
0x66,0x5f,0x72,0x6f,0x74,0x5f,0x78,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,0x2d,
0x31,0x2e,0x35,0x37,0x30,0x37,0x39,0x36,0x33,0x37,0x30,0x35,0x30,0x36,0x32,0x38,
0x36,0x36,0x32,0x31,0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,
0x6f,0x74,0x5f,0x78,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x34,0x29,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,
0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x6f,
0x72,0x69,0x20,0x25,0x20,0x34,0x29,0x20,0x2a,0x20,0x31,0x2e,0x35,0x37,0x30,0x37,
0x39,0x36,0x33,0x37,0x30,0x35,0x30,0x36,0x32,0x38,0x36,0x36,0x32,0x31,0x30,0x39,
0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
0x62,0x61,0x73,0x65,0x20,0x2a,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,
0x79,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,
0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x36,0x31,0x2e,0x69,0x73,0x47,0x72,0x6f,0x75,
0x6e,0x64,0x20,0x3d,0x3d,0x20,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x38,0x36,
0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
0x2e,0x78,0x20,0x2a,0x20,0x31,0x30,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x31,0x36,0x31,
0x2e,0x70,0x6c,0x61,0x6e,0x65,0x48,0x65,0x69,0x67,0x68,0x74,0x2c,0x20,0x70,0x6f,
0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x7a,0x20,0x2a,0x20,0x31,0x30,0x30,0x2e,0x30,
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x31,
0x36,0x31,0x2e,0x6d,0x76,0x70,0x20,0x2a,0x20,0x5f,0x31,0x38,0x36,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,
0x65,0x5f,0x70,0x6f,0x73,0x20,0x3d,0x20,0x28,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,
0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x20,0x2a,0x20,0x5f,0x31,0x38,0x36,
0x29,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,
0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
0x20,0x3d,0x20,0x6d,0x61,0x74,0x33,0x28,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,
0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x2c,
0x20,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,
0x78,0x5b,0x31,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x5f,0x31,0x36,0x31,0x2e,0x76,
0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x5b,0x32,0x5d,0x2e,0x78,0x79,
0x7a,0x29,0x20,0x2a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x78,0x79,0x7a,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,0x6e,
0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x72,0x6f,
0x75,0x6e,0x64,0x28,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x2e,0x77,0x29,0x29,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x61,0x74,0x33,0x20,0x5f,
0x32,0x33,0x33,0x20,0x3d,0x20,0x67,0x62,0x75,0x66,0x5f,0x67,0x65,0x74,0x5f,0x6f,
0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x5f,0x6d,0x61,0x74,0x72,0x69,
0x78,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x32,0x35,0x34,0x20,0x3d,0x20,0x76,0x65,
0x63,0x34,0x28,0x28,0x28,0x5f,0x32,0x33,0x33,0x20,0x2a,0x20,0x28,0x70,0x6f,0x73,
0x69,0x74,0x69,0x6f,0x6e,0x2e,0x78,0x79,0x7a,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,
0x28,0x30,0x2e,0x35,0x29,0x29,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,
0x2e,0x35,0x29,0x29,0x20,0x2b,0x20,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x2e,
0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,
0x20,0x5f,0x31,0x36,0x31,0x2e,0x6d,0x76,0x70,0x20,0x2a,0x20,0x5f,0x32,0x35,0x34,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x69,0x65,0x77,0x5f,0x73,
0x70,0x61,0x63,0x65,0x5f,0x70,0x6f,0x73,0x20,0x3d,0x20,0x28,0x5f,0x31,0x36,0x31,
0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x20,0x2a,0x20,0x5f,
0x32,0x35,0x34,0x29,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,0x6e,0x6f,0x72,
0x6d,0x61,0x6c,0x20,0x3d,0x20,0x6d,0x61,0x74,0x33,0x28,0x5f,0x31,0x36,0x31,0x2e,
0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x5b,0x30,0x5d,0x2e,0x78,
0x79,0x7a,0x2c,0x20,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,
0x74,0x72,0x69,0x78,0x5b,0x31,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x5f,0x31,0x36,
0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x5b,0x32,0x5d,
0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,0x20,0x28,0x5f,0x32,0x33,0x33,0x20,0x2a,0x20,
0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x7d,0x0a,0x7d,0x0a,0x0a,0x00,
];
/*
#version 430
layout(location = 0) out vec4 out_position;
layout(location = 0) in vec3 view_space_pos;
layout(location = 1) out vec4 out_normal;
layout(location = 1) in vec3 view_space_normal;
void main()
{
out_position = vec4(view_space_pos, 1.0);
out_normal = vec4(normalize(view_space_normal), 1.0);
}
*/
fs_g_source_glsl430 := u8.[
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x6c,0x61,
0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x6f,0x75,0x74,0x5f,
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,0x69,
0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,
0x65,0x5f,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,0x6f,0x75,0x74,0x20,
0x76,0x65,0x63,0x34,0x20,0x6f,0x75,0x74,0x5f,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,0x33,0x20,0x76,0x69,
0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,
0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,
0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,
0x63,0x65,0x5f,0x70,0x6f,0x73,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x6f,0x75,0x74,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x76,
0x65,0x63,0x34,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x76,0x69,
0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x29,
0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
];
/*
#version 300 es
struct gbuffer_vs_params
{
mat4 mvp;
mat4 view_matrix;
int isGround;
float planeHeight;
};
uniform gbuffer_vs_params _161;
layout(location = 0) in vec4 position;
out vec3 view_space_pos;
out vec3 view_space_normal;
layout(location = 1) in vec4 normal;
layout(location = 3) in vec4 instance;
layout(location = 2) in vec4 centre;
mat3 gbuf_rot_x(float a)
{
float _28 = cos(a);
float _31 = sin(a);
return mat3(vec3(1.0, 0.0, 0.0), vec3(0.0, _28, -_31), vec3(0.0, _31, _28));
}
mat3 gbuf_rot_z(float a)
{
float _47 = cos(a);
float _50 = sin(a);
return mat3(vec3(_47, -_50, 0.0), vec3(_50, _47, 0.0), vec3(0.0, 0.0, 1.0));
}
mat3 gbuf_rot_y(float a)
{
float _64 = cos(a);
float _67 = sin(a);
return mat3(vec3(_64, 0.0, _67), vec3(0.0, 1.0, 0.0), vec3(-_67, 0.0, _64));
}
mat3 gbuf_get_orientation_matrix(int ori)
{
int _82 = ori / 4;
mat3 base;
if (_82 == 0)
{
base = mat3(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), vec3(0.0, 0.0, 1.0));
}
else
{
if (_82 == 1)
{
float param = 3.1415927410125732421875;
base = gbuf_rot_x(param);
}
else
{
if (_82 == 2)
{
float param_1 = -1.57079637050628662109375;
base = gbuf_rot_z(param_1);
}
else
{
if (_82 == 3)
{
float param_2 = 1.57079637050628662109375;
base = gbuf_rot_z(param_2);
}
else
{
if (_82 == 4)
{
float param_3 = 1.57079637050628662109375;
base = gbuf_rot_x(param_3);
}
else
{
float param_4 = -1.57079637050628662109375;
base = gbuf_rot_x(param_4);
}
}
}
}
}
float param_5 = float(ori % 4) * 1.57079637050628662109375;
return base * gbuf_rot_y(param_5);
}
void main()
{
if (_161.isGround == 1)
{
vec4 _186 = vec4(position.x * 100.0, _161.planeHeight, position.z * 100.0, 1.0);
gl_Position = _161.mvp * _186;
view_space_pos = (_161.view_matrix * _186).xyz;
view_space_normal = mat3(_161.view_matrix[0].xyz, _161.view_matrix[1].xyz, _161.view_matrix[2].xyz) * normal.xyz;
}
else
{
int param = int(round(instance.w));
mat3 _233 = gbuf_get_orientation_matrix(param);
vec4 _254 = vec4(((_233 * (position.xyz - vec3(0.5))) + vec3(0.5)) + instance.xyz, 1.0);
gl_Position = _161.mvp * _254;
view_space_pos = (_161.view_matrix * _254).xyz;
view_space_normal = mat3(_161.view_matrix[0].xyz, _161.view_matrix[1].xyz, _161.view_matrix[2].xyz) * (_233 * normal.xyz);
}
}
*/
vs_g_source_glsl300es := u8.[
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x67,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,
0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x6d,0x61,0x74,0x34,0x20,0x6d,0x76,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,
0x74,0x34,0x20,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x69,0x73,0x47,0x72,0x6f,0x75,0x6e,0x64,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x6c,0x61,0x6e,
0x65,0x48,0x65,0x69,0x67,0x68,0x74,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x75,0x6e,0x69,
0x66,0x6f,0x72,0x6d,0x20,0x67,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,0x76,0x73,0x5f,
0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x5f,0x31,0x36,0x31,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,0x69,0x74,
0x69,0x6f,0x6e,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x69,
0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,0x70,0x6f,0x73,0x3b,0x0a,0x6f,0x75,
0x74,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,
0x65,0x5f,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,0x33,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x69,0x6e,0x73,0x74,
0x61,0x6e,0x63,0x65,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,0x63,0x65,0x6e,0x74,0x72,0x65,0x3b,0x0a,0x0a,0x6d,0x61,0x74,0x33,
0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x78,0x28,0x66,0x6c,0x6f,0x61,
0x74,0x20,0x61,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x20,0x5f,0x32,0x38,0x20,0x3d,0x20,0x63,0x6f,0x73,0x28,0x61,0x29,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x31,0x20,0x3d,0x20,0x73,
0x69,0x6e,0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
0x6e,0x20,0x6d,0x61,0x74,0x33,0x28,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x2c,
0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,
0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x32,0x38,0x2c,0x20,0x2d,0x5f,0x33,0x31,0x29,
0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x33,0x31,0x2c,
0x20,0x5f,0x32,0x38,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x6d,0x61,0x74,0x33,0x20,
0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x7a,0x28,0x66,0x6c,0x6f,0x61,0x74,
0x20,0x61,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x5f,0x34,0x37,0x20,0x3d,0x20,0x63,0x6f,0x73,0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x35,0x30,0x20,0x3d,0x20,0x73,0x69,
0x6e,0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,
0x20,0x6d,0x61,0x74,0x33,0x28,0x76,0x65,0x63,0x33,0x28,0x5f,0x34,0x37,0x2c,0x20,
0x2d,0x5f,0x35,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,
0x28,0x5f,0x35,0x30,0x2c,0x20,0x5f,0x34,0x37,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,
0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x6d,0x61,0x74,0x33,0x20,0x67,
0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x79,0x28,0x66,0x6c,0x6f,0x61,0x74,0x20,
0x61,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,
0x36,0x34,0x20,0x3d,0x20,0x63,0x6f,0x73,0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x37,0x20,0x3d,0x20,0x73,0x69,0x6e,
0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
0x6d,0x61,0x74,0x33,0x28,0x76,0x65,0x63,0x33,0x28,0x5f,0x36,0x34,0x2c,0x20,0x30,
0x2e,0x30,0x2c,0x20,0x5f,0x36,0x37,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,
0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,
0x65,0x63,0x33,0x28,0x2d,0x5f,0x36,0x37,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x5f,
0x36,0x34,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x6d,0x61,0x74,0x33,0x20,0x67,0x62,
0x75,0x66,0x5f,0x67,0x65,0x74,0x5f,0x6f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,
0x6f,0x6e,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x28,0x69,0x6e,0x74,0x20,0x6f,0x72,
0x69,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x38,0x32,
0x20,0x3d,0x20,0x6f,0x72,0x69,0x20,0x2f,0x20,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x6d,0x61,0x74,0x33,0x20,0x62,0x61,0x73,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
0x66,0x20,0x28,0x5f,0x38,0x32,0x20,0x3d,0x3d,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,
0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x20,
0x3d,0x20,0x6d,0x61,0x74,0x33,0x28,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x2c,
0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,
0x28,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,
0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,
0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x38,0x32,0x20,0x3d,0x3d,0x20,0x31,
0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,
0x72,0x61,0x6d,0x20,0x3d,0x20,0x33,0x2e,0x31,0x34,0x31,0x35,0x39,0x32,0x37,0x34,
0x31,0x30,0x31,0x32,0x35,0x37,0x33,0x32,0x34,0x32,0x31,0x38,0x37,0x35,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,0x65,
0x20,0x3d,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x78,0x28,0x70,0x61,
0x72,0x61,0x6d,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,0x69,0x66,0x20,0x28,0x5f,0x38,0x32,0x20,0x3d,0x3d,0x20,0x32,0x29,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x2d,
0x31,0x2e,0x35,0x37,0x30,0x37,0x39,0x36,0x33,0x37,0x30,0x35,0x30,0x36,0x32,0x38,
0x36,0x36,0x32,0x31,0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x20,
0x3d,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x7a,0x28,0x70,0x61,0x72,
0x61,0x6d,0x5f,0x31,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x38,0x32,0x20,0x3d,0x3d,0x20,0x33,
0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,
0x72,0x61,0x6d,0x5f,0x32,0x20,0x3d,0x20,0x31,0x2e,0x35,0x37,0x30,0x37,0x39,0x36,
0x33,0x37,0x30,0x35,0x30,0x36,0x32,0x38,0x36,0x36,0x32,0x31,0x30,0x39,0x33,0x37,
0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x67,0x62,
0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x7a,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x69,0x66,0x20,0x28,0x5f,0x38,0x32,0x20,0x3d,0x3d,0x20,0x34,0x29,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x31,0x2e,0x35,0x37,
0x30,0x37,0x39,0x36,0x33,0x37,0x30,0x35,0x30,0x36,0x32,0x38,0x36,0x36,0x32,0x31,
0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,
0x61,0x73,0x65,0x20,0x3d,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x78,
0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x33,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,
0x72,0x61,0x6d,0x5f,0x34,0x20,0x3d,0x20,0x2d,0x31,0x2e,0x35,0x37,0x30,0x37,0x39,
0x36,0x33,0x37,0x30,0x35,0x30,0x36,0x32,0x38,0x36,0x36,0x32,0x31,0x30,0x39,0x33,
0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,0x65,
0x20,0x3d,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x78,0x28,0x70,0x61,
0x72,0x61,0x6d,0x5f,0x34,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,
0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x6f,0x72,0x69,0x20,0x25,0x20,0x34,0x29,
0x20,0x2a,0x20,0x31,0x2e,0x35,0x37,0x30,0x37,0x39,0x36,0x33,0x37,0x30,0x35,0x30,
0x36,0x32,0x38,0x36,0x36,0x32,0x31,0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x62,0x61,0x73,0x65,0x20,0x2a,0x20,
0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x79,0x28,0x70,0x61,0x72,0x61,0x6d,
0x5f,0x35,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,
0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,
0x36,0x31,0x2e,0x69,0x73,0x47,0x72,0x6f,0x75,0x6e,0x64,0x20,0x3d,0x3d,0x20,0x31,
0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x38,0x36,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,
0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x78,0x20,0x2a,0x20,0x31,0x30,
0x30,0x2e,0x30,0x2c,0x20,0x5f,0x31,0x36,0x31,0x2e,0x70,0x6c,0x61,0x6e,0x65,0x48,
0x65,0x69,0x67,0x68,0x74,0x2c,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,
0x7a,0x20,0x2a,0x20,0x31,0x30,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x36,0x31,0x2e,0x6d,0x76,0x70,0x20,
0x2a,0x20,0x5f,0x31,0x38,0x36,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,0x70,0x6f,0x73,0x20,0x3d,
0x20,0x28,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,
0x69,0x78,0x20,0x2a,0x20,0x5f,0x31,0x38,0x36,0x29,0x2e,0x78,0x79,0x7a,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,
0x63,0x65,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x6d,0x61,0x74,0x33,
0x28,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,
0x78,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x5f,0x31,0x36,0x31,0x2e,0x76,
0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x5b,0x31,0x5d,0x2e,0x78,0x79,
0x7a,0x2c,0x20,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,
0x72,0x69,0x78,0x5b,0x32,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,0x20,0x6e,0x6f,
0x72,0x6d,0x61,0x6c,0x2e,0x78,0x79,0x7a,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,0x6e,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,
0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x72,0x6f,0x75,0x6e,0x64,0x28,0x69,0x6e,0x73,
0x74,0x61,0x6e,0x63,0x65,0x2e,0x77,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x6d,0x61,0x74,0x33,0x20,0x5f,0x32,0x33,0x33,0x20,0x3d,0x20,0x67,
0x62,0x75,0x66,0x5f,0x67,0x65,0x74,0x5f,0x6f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,
0x69,0x6f,0x6e,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x28,0x70,0x61,0x72,0x61,0x6d,
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,
0x5f,0x32,0x35,0x34,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x28,0x5f,0x32,
0x33,0x33,0x20,0x2a,0x20,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x78,
0x79,0x7a,0x20,0x2d,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x29,
0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x35,0x29,0x29,0x20,0x2b,0x20,
0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x36,0x31,0x2e,0x6d,
0x76,0x70,0x20,0x2a,0x20,0x5f,0x32,0x35,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,0x70,0x6f,
0x73,0x20,0x3d,0x20,0x28,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,
0x61,0x74,0x72,0x69,0x78,0x20,0x2a,0x20,0x5f,0x32,0x35,0x34,0x29,0x2e,0x78,0x79,
0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x69,0x65,0x77,0x5f,
0x73,0x70,0x61,0x63,0x65,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x6d,
0x61,0x74,0x33,0x28,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,
0x74,0x72,0x69,0x78,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x5f,0x31,0x36,
0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x5b,0x31,0x5d,
0x2e,0x78,0x79,0x7a,0x2c,0x20,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,
0x6d,0x61,0x74,0x72,0x69,0x78,0x5b,0x32,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,
0x20,0x28,0x5f,0x32,0x33,0x33,0x20,0x2a,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,
0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x7d,0x0a,0x0a,0x00,
];
/*
#version 300 es
precision mediump float;
precision highp int;
layout(location = 0) out highp vec4 out_position;
in highp vec3 view_space_pos;
layout(location = 1) out highp vec4 out_normal;
in highp vec3 view_space_normal;
void main()
{
out_position = vec4(view_space_pos, 1.0);
out_normal = vec4(normalize(view_space_normal), 1.0);
}
*/
fs_g_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,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,0x6f,0x75,0x74,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,
0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,
0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,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,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,
0x63,0x34,0x20,0x6f,0x75,0x74,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x69,
0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x76,0x69,0x65,
0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,
0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,
0x20,0x20,0x20,0x6f,0x75,0x74,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,
0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,
0x65,0x5f,0x70,0x6f,0x73,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x6f,0x75,0x74,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x76,0x65,
0x63,0x34,0x28,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x76,0x69,0x65,
0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x2c,
0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
];
/*
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct gbuffer_vs_params
{
float4x4 mvp;
float4x4 view_matrix;
int isGround;
float planeHeight;
};
struct main0_out
{
float3 view_space_pos [[user(locn0)]];
float3 view_space_normal [[user(locn1)]];
float4 gl_Position [[position]];
};
struct main0_in
{
float4 position [[attribute(0)]];
float4 normal [[attribute(1)]];
float4 instance [[attribute(3)]];
};
static inline __attribute__((always_inline))
float3x3 gbuf_rot_x(thread const float& a)
{
float _28 = cos(a);
float _31 = sin(a);
return float3x3(float3(1.0, 0.0, 0.0), float3(0.0, _28, -_31), float3(0.0, _31, _28));
}
static inline __attribute__((always_inline))
float3x3 gbuf_rot_z(thread const float& a)
{
float _47 = cos(a);
float _50 = sin(a);
return float3x3(float3(_47, -_50, 0.0), float3(_50, _47, 0.0), float3(0.0, 0.0, 1.0));
}
static inline __attribute__((always_inline))
float3x3 gbuf_rot_y(thread const float& a)
{
float _64 = cos(a);
float _67 = sin(a);
return float3x3(float3(_64, 0.0, _67), float3(0.0, 1.0, 0.0), float3(-_67, 0.0, _64));
}
static inline __attribute__((always_inline))
float3x3 gbuf_get_orientation_matrix(thread const int& ori)
{
int _82 = ori / 4;
float3x3 base;
if (_82 == 0)
{
base = float3x3(float3(1.0, 0.0, 0.0), float3(0.0, 1.0, 0.0), float3(0.0, 0.0, 1.0));
}
else
{
if (_82 == 1)
{
float param = 3.1415927410125732421875;
base = gbuf_rot_x(param);
}
else
{
if (_82 == 2)
{
float param_1 = -1.57079637050628662109375;
base = gbuf_rot_z(param_1);
}
else
{
if (_82 == 3)
{
float param_2 = 1.57079637050628662109375;
base = gbuf_rot_z(param_2);
}
else
{
if (_82 == 4)
{
float param_3 = 1.57079637050628662109375;
base = gbuf_rot_x(param_3);
}
else
{
float param_4 = -1.57079637050628662109375;
base = gbuf_rot_x(param_4);
}
}
}
}
}
float param_5 = float(ori % 4) * 1.57079637050628662109375;
return base * gbuf_rot_y(param_5);
}
vertex main0_out main0(main0_in in [[stage_in]], constant gbuffer_vs_params& _161 [[buffer(0)]])
{
main0_out out = {};
if (_161.isGround == 1)
{
float4 _186 = float4(in.position.x * 100.0, _161.planeHeight, in.position.z * 100.0, 1.0);
out.gl_Position = _161.mvp * _186;
out.view_space_pos = (_161.view_matrix * _186).xyz;
out.view_space_normal = float3x3(_161.view_matrix[0].xyz, _161.view_matrix[1].xyz, _161.view_matrix[2].xyz) * in.normal.xyz;
}
else
{
int param = int(round(in.instance.w));
float3x3 _233 = gbuf_get_orientation_matrix(param);
float4 _254 = float4(((_233 * (in.position.xyz - float3(0.5))) + float3(0.5)) + in.instance.xyz, 1.0);
out.gl_Position = _161.mvp * _254;
out.view_space_pos = (_161.view_matrix * _254).xyz;
out.view_space_normal = float3x3(_161.view_matrix[0].xyz, _161.view_matrix[1].xyz, _161.view_matrix[2].xyz) * (_233 * in.normal.xyz);
}
return out;
}
*/
vs_g_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,0x67,0x62,0x75,0x66,0x66,0x65,0x72,0x5f,
0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x6d,0x76,0x70,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x78,0x34,0x20,0x76,0x69,0x65,0x77,0x5f,
0x6d,0x61,0x74,0x72,0x69,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,
0x69,0x73,0x47,0x72,0x6f,0x75,0x6e,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x70,0x6c,0x61,0x6e,0x65,0x48,0x65,0x69,0x67,0x68,0x74,0x3b,
0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,
0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x33,0x20,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,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,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x76,0x69,
0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,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,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,0x61,0x6e,0x63,0x65,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,
0x69,0x62,0x75,0x74,0x65,0x28,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,0x78,0x33,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x78,
0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x26,0x20,0x61,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x5f,0x32,0x38,0x20,0x3d,0x20,0x63,0x6f,0x73,0x28,0x61,0x29,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x33,0x31,0x20,
0x3d,0x20,0x73,0x69,0x6e,0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
0x74,0x75,0x72,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x78,0x33,0x28,0x66,0x6c,
0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,
0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x2c,
0x20,0x5f,0x32,0x38,0x2c,0x20,0x2d,0x5f,0x33,0x31,0x29,0x2c,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x33,0x31,0x2c,0x20,0x5f,0x32,
0x38,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,0x33,0x78,0x33,0x20,0x67,0x62,
0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x7a,0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,
0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,0x6f,0x61,0x74,0x26,0x20,0x61,0x29,0x0a,
0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x34,0x37,0x20,
0x3d,0x20,0x63,0x6f,0x73,0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x5f,0x35,0x30,0x20,0x3d,0x20,0x73,0x69,0x6e,0x28,0x61,0x29,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x6c,0x6f,
0x61,0x74,0x33,0x78,0x33,0x28,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x34,0x37,
0x2c,0x20,0x2d,0x5f,0x35,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x33,0x28,0x5f,0x35,0x30,0x2c,0x20,0x5f,0x34,0x37,0x2c,0x20,0x30,
0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x2c,
0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,
0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x20,0x5f,0x5f,
0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x5f,0x5f,0x28,0x28,0x61,0x6c,0x77,
0x61,0x79,0x73,0x5f,0x69,0x6e,0x6c,0x69,0x6e,0x65,0x29,0x29,0x0a,0x66,0x6c,0x6f,
0x61,0x74,0x33,0x78,0x33,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x79,
0x28,0x74,0x68,0x72,0x65,0x61,0x64,0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x26,0x20,0x61,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x5f,0x36,0x34,0x20,0x3d,0x20,0x63,0x6f,0x73,0x28,0x61,0x29,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x36,0x37,0x20,
0x3d,0x20,0x73,0x69,0x6e,0x28,0x61,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
0x74,0x75,0x72,0x6e,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x78,0x33,0x28,0x66,0x6c,
0x6f,0x61,0x74,0x33,0x28,0x5f,0x36,0x34,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x5f,
0x36,0x37,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x2c,
0x20,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x33,0x28,0x2d,0x5f,0x36,0x37,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x36,
0x34,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,0x33,0x78,0x33,0x20,0x67,0x62,
0x75,0x66,0x5f,0x67,0x65,0x74,0x5f,0x6f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,
0x6f,0x6e,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x28,0x74,0x68,0x72,0x65,0x61,0x64,
0x20,0x63,0x6f,0x6e,0x73,0x74,0x20,0x69,0x6e,0x74,0x26,0x20,0x6f,0x72,0x69,0x29,
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x5f,0x38,0x32,0x20,0x3d,
0x20,0x6f,0x72,0x69,0x20,0x2f,0x20,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x33,0x78,0x33,0x20,0x62,0x61,0x73,0x65,0x3b,0x0a,0x20,0x20,0x20,
0x20,0x69,0x66,0x20,0x28,0x5f,0x38,0x32,0x20,0x3d,0x3d,0x20,0x30,0x29,0x0a,0x20,
0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,
0x65,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x78,0x33,0x28,0x66,0x6c,0x6f,
0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,
0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,
0x31,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x33,0x28,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,
0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x69,0x66,0x20,0x28,0x5f,0x38,0x32,0x20,0x3d,0x3d,0x20,0x31,0x29,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,
0x3d,0x20,0x33,0x2e,0x31,0x34,0x31,0x35,0x39,0x32,0x37,0x34,0x31,0x30,0x31,0x32,
0x35,0x37,0x33,0x32,0x34,0x32,0x31,0x38,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x67,
0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x78,0x28,0x70,0x61,0x72,0x61,0x6d,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,0x69,
0x66,0x20,0x28,0x5f,0x38,0x32,0x20,0x3d,0x3d,0x20,0x32,0x29,0x0a,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x2d,0x31,0x2e,0x35,0x37,
0x30,0x37,0x39,0x36,0x33,0x37,0x30,0x35,0x30,0x36,0x32,0x38,0x36,0x36,0x32,0x31,
0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x67,0x62,
0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x7a,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,
0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x69,0x66,0x20,0x28,0x5f,0x38,0x32,0x20,0x3d,0x3d,0x20,0x33,0x29,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
0x32,0x20,0x3d,0x20,0x31,0x2e,0x35,0x37,0x30,0x37,0x39,0x36,0x33,0x37,0x30,0x35,
0x30,0x36,0x32,0x38,0x36,0x36,0x32,0x31,0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,
0x6f,0x74,0x5f,0x7a,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x32,0x29,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
0x5f,0x38,0x32,0x20,0x3d,0x3d,0x20,0x34,0x29,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,
0x72,0x61,0x6d,0x5f,0x33,0x20,0x3d,0x20,0x31,0x2e,0x35,0x37,0x30,0x37,0x39,0x36,
0x33,0x37,0x30,0x35,0x30,0x36,0x32,0x38,0x36,0x36,0x32,0x31,0x30,0x39,0x33,0x37,
0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x20,
0x3d,0x20,0x67,0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x78,0x28,0x70,0x61,0x72,
0x61,0x6d,0x5f,0x33,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
0x34,0x20,0x3d,0x20,0x2d,0x31,0x2e,0x35,0x37,0x30,0x37,0x39,0x36,0x33,0x37,0x30,
0x35,0x30,0x36,0x32,0x38,0x36,0x36,0x32,0x31,0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x62,0x61,0x73,0x65,0x20,0x3d,0x20,0x67,
0x62,0x75,0x66,0x5f,0x72,0x6f,0x74,0x5f,0x78,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,
0x34,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x20,0x3d,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x28,0x6f,0x72,0x69,0x20,0x25,0x20,0x34,0x29,0x20,0x2a,0x20,0x31,
0x2e,0x35,0x37,0x30,0x37,0x39,0x36,0x33,0x37,0x30,0x35,0x30,0x36,0x32,0x38,0x36,
0x36,0x32,0x31,0x30,0x39,0x33,0x37,0x35,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,
0x74,0x75,0x72,0x6e,0x20,0x62,0x61,0x73,0x65,0x20,0x2a,0x20,0x67,0x62,0x75,0x66,
0x5f,0x72,0x6f,0x74,0x5f,0x79,0x28,0x70,0x61,0x72,0x61,0x6d,0x5f,0x35,0x29,0x3b,
0x0a,0x7d,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,0x67,0x62,
0x75,0x66,0x66,0x65,0x72,0x5f,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,
0x20,0x5f,0x31,0x36,0x31,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,0x66,0x20,0x28,0x5f,0x31,0x36,0x31,0x2e,0x69,0x73,0x47,0x72,
0x6f,0x75,0x6e,0x64,0x20,0x3d,0x3d,0x20,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
0x5f,0x31,0x38,0x36,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x69,0x6e,
0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x78,0x20,0x2a,0x20,0x31,0x30,
0x30,0x2e,0x30,0x2c,0x20,0x5f,0x31,0x36,0x31,0x2e,0x70,0x6c,0x61,0x6e,0x65,0x48,
0x65,0x69,0x67,0x68,0x74,0x2c,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,
0x6f,0x6e,0x2e,0x7a,0x20,0x2a,0x20,0x31,0x30,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,
0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x31,
0x36,0x31,0x2e,0x6d,0x76,0x70,0x20,0x2a,0x20,0x5f,0x31,0x38,0x36,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x69,0x65,0x77,0x5f,
0x73,0x70,0x61,0x63,0x65,0x5f,0x70,0x6f,0x73,0x20,0x3d,0x20,0x28,0x5f,0x31,0x36,
0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x20,0x2a,0x20,
0x5f,0x31,0x38,0x36,0x29,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,
0x65,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x33,0x78,0x33,0x28,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,
0x74,0x72,0x69,0x78,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x5f,0x31,0x36,
0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x5b,0x31,0x5d,
0x2e,0x78,0x79,0x7a,0x2c,0x20,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,
0x6d,0x61,0x74,0x72,0x69,0x78,0x5b,0x32,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,
0x20,0x69,0x6e,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x78,0x79,0x7a,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,0x6e,0x74,
0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x72,0x6f,0x75,
0x6e,0x64,0x28,0x69,0x6e,0x2e,0x69,0x6e,0x73,0x74,0x61,0x6e,0x63,0x65,0x2e,0x77,
0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x33,0x78,0x33,0x20,0x5f,0x32,0x33,0x33,0x20,0x3d,0x20,0x67,0x62,0x75,0x66,
0x5f,0x67,0x65,0x74,0x5f,0x6f,0x72,0x69,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,
0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,
0x32,0x35,0x34,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x28,0x28,0x5f,
0x32,0x33,0x33,0x20,0x2a,0x20,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,
0x6f,0x6e,0x2e,0x78,0x79,0x7a,0x20,0x2d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,
0x30,0x2e,0x35,0x29,0x29,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,
0x30,0x2e,0x35,0x29,0x29,0x20,0x2b,0x20,0x69,0x6e,0x2e,0x69,0x6e,0x73,0x74,0x61,
0x6e,0x63,0x65,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,
0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x5f,0x31,0x36,0x31,0x2e,0x6d,0x76,
0x70,0x20,0x2a,0x20,0x5f,0x32,0x35,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x20,0x6f,0x75,0x74,0x2e,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,
0x5f,0x70,0x6f,0x73,0x20,0x3d,0x20,0x28,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,
0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x20,0x2a,0x20,0x5f,0x32,0x35,0x34,0x29,
0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x75,
0x74,0x2e,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,0x6e,0x6f,0x72,
0x6d,0x61,0x6c,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x78,0x33,0x28,0x5f,
0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x5b,
0x30,0x5d,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,
0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,0x78,0x5b,0x31,0x5d,0x2e,0x78,0x79,0x7a,0x2c,
0x20,0x5f,0x31,0x36,0x31,0x2e,0x76,0x69,0x65,0x77,0x5f,0x6d,0x61,0x74,0x72,0x69,
0x78,0x5b,0x32,0x5d,0x2e,0x78,0x79,0x7a,0x29,0x20,0x2a,0x20,0x28,0x5f,0x32,0x33,
0x33,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x78,0x79,
0x7a,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,
];
/*
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct main0_out
{
float4 out_position [[color(0)]];
float4 out_normal [[color(1)]];
};
struct main0_in
{
float3 view_space_pos [[user(locn0)]];
float3 view_space_normal [[user(locn1)]];
};
fragment main0_out main0(main0_in in [[stage_in]])
{
main0_out out = {};
out.out_position = float4(in.view_space_pos, 1.0);
out.out_normal = float4(fast::normalize(in.view_space_normal), 1.0);
return out;
}
*/
fs_g_source_metal_macos := u8.[
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x34,0x20,0x6f,0x75,0x74,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,
0x6f,0x6e,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x6f,0x75,0x74,0x5f,
0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x31,
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,0x33,0x20,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,
0x5f,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,0x66,0x6c,0x6f,0x61,0x74,0x33,
0x20,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,0x5f,0x6e,0x6f,0x72,0x6d,
0x61,0x6c,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x31,0x29,
0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,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,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,0x6f,0x75,0x74,
0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x34,0x28,0x69,0x6e,0x2e,0x76,0x69,0x65,0x77,0x5f,0x73,0x70,0x61,0x63,0x65,
0x5f,0x70,0x6f,0x73,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x6f,0x75,0x74,0x2e,0x6f,0x75,0x74,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,
0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x69,0x6e,0x2e,0x76,0x69,0x65,0x77,0x5f,
0x73,0x70,0x61,0x63,0x65,0x5f,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x29,0x2c,0x20,0x31,
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
];
gbuffer_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
desc: sg_shader_desc;
desc.label = "gbuffer_shader";
if backend == {
case .GLCORE;
desc.vertex_func.source = xx *vs_g_source_glsl430;
desc.vertex_func.entry = "main";
desc.fragment_func.source = xx *fs_g_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 = "centre";
desc.attrs[3].base_type = .FLOAT;
desc.attrs[3].glsl_name = "instance";
desc.uniform_blocks[0].stage = .VERTEX;
desc.uniform_blocks[0].layout = .STD140;
desc.uniform_blocks[0].size = 144;
desc.uniform_blocks[0].glsl_uniforms[0].type = .MAT4;
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 0;
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "_161.mvp";
desc.uniform_blocks[0].glsl_uniforms[1].type = .MAT4;
desc.uniform_blocks[0].glsl_uniforms[1].array_count = 0;
desc.uniform_blocks[0].glsl_uniforms[1].glsl_name = "_161.view_matrix";
desc.uniform_blocks[0].glsl_uniforms[2].type = .INT;
desc.uniform_blocks[0].glsl_uniforms[2].array_count = 0;
desc.uniform_blocks[0].glsl_uniforms[2].glsl_name = "_161.isGround";
desc.uniform_blocks[0].glsl_uniforms[3].type = .FLOAT;
desc.uniform_blocks[0].glsl_uniforms[3].array_count = 0;
desc.uniform_blocks[0].glsl_uniforms[3].glsl_name = "_161.planeHeight";
case .GLES3;
desc.vertex_func.source = xx *vs_g_source_glsl300es;
desc.vertex_func.entry = "main";
desc.fragment_func.source = xx *fs_g_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 = "centre";
desc.attrs[3].base_type = .FLOAT;
desc.attrs[3].glsl_name = "instance";
desc.uniform_blocks[0].stage = .VERTEX;
desc.uniform_blocks[0].layout = .STD140;
desc.uniform_blocks[0].size = 144;
desc.uniform_blocks[0].glsl_uniforms[0].type = .MAT4;
desc.uniform_blocks[0].glsl_uniforms[0].array_count = 0;
desc.uniform_blocks[0].glsl_uniforms[0].glsl_name = "_161.mvp";
desc.uniform_blocks[0].glsl_uniforms[1].type = .MAT4;
desc.uniform_blocks[0].glsl_uniforms[1].array_count = 0;
desc.uniform_blocks[0].glsl_uniforms[1].glsl_name = "_161.view_matrix";
desc.uniform_blocks[0].glsl_uniforms[2].type = .INT;
desc.uniform_blocks[0].glsl_uniforms[2].array_count = 0;
desc.uniform_blocks[0].glsl_uniforms[2].glsl_name = "_161.isGround";
desc.uniform_blocks[0].glsl_uniforms[3].type = .FLOAT;
desc.uniform_blocks[0].glsl_uniforms[3].array_count = 0;
desc.uniform_blocks[0].glsl_uniforms[3].glsl_name = "_161.planeHeight";
case .METAL_MACOS;
desc.vertex_func.source = xx *vs_g_source_metal_macos;
desc.vertex_func.entry = "main0";
desc.fragment_func.source = xx *fs_g_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 = 144;
desc.uniform_blocks[0].msl_buffer_n = 0;
}
return desc;
}