trueno/src/shaders/jai/shader_mix.jai
2025-10-24 08:10:52 +03:00

609 lines
31 KiB
Plaintext

/*
#version:1# (machine generated, don't edit!)
Generated by sokol-shdc (https://github.com/floooh/sokol-tools)
Cmdline:
sokol-shdc -i shader_mix.glsl -o ./jai/shader_mix.jai -l glsl430:glsl300es:metal_macos -f sokol_jai
Overview:
=========
Shader program: 'mix':
Get shader desc: mix_shader_desc(sg_query_backend())
Vertex Shader: vs_mix
Fragment Shader: fs_mix
Attributes:
ATTR_mix_position => 0
ATTR_mix_uv => 1
Bindings:
Uniform block 'mix_fs_params':
Jai struct: Mix_Fs_Params
Bind slot: UB_mix_fs_params => 1
Image 'mixtex_a':
Image type: ._2D
Sample type: .FLOAT
Multisampled: false
Bind slot: IMG_mixtex_a => 0
Image 'mixtex_b':
Image type: ._2D
Sample type: .FLOAT
Multisampled: false
Bind slot: IMG_mixtex_b => 1
Image 'mixtex_c':
Image type: ._2D
Sample type: .FLOAT
Multisampled: false
Bind slot: IMG_mixtex_c => 2
Sampler 'mixsmp':
Type: .FILTERING
Bind slot: SMP_mixsmp => 0
*/
ATTR_mix_position :: 0;
ATTR_mix_uv :: 1;
UB_mix_fs_params :: 1;
IMG_mixtex_a :: 0;
IMG_mixtex_b :: 1;
IMG_mixtex_c :: 2;
SMP_mixsmp :: 0;
Mix_Fs_Params :: struct {
op: s32;
dof_min: float;
dof_max: float;
dof_point: float;
};
/*
#version 430
layout(location = 0) in vec2 position;
layout(location = 0) out vec2 texcoord;
layout(location = 1) in vec2 uv;
void main()
{
gl_Position = vec4(position, 0.5, 1.0);
texcoord = uv;
}
*/
vs_mix_source_glsl430 := u8.[
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x6c,0x61,
0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,
0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x6f,0x73,0x69,0x74,
0x69,0x6f,0x6e,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,
0x63,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x3b,0x0a,0x6c,0x61,0x79,
0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,
0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x0a,0x76,
0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,
0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,
0x65,0x63,0x34,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x30,0x2e,
0x35,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x74,0x65,0x78,
0x63,0x6f,0x6f,0x72,0x64,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
];
/*
#version 430
struct mix_fs_params
{
int op;
float dof_min;
float dof_max;
float dof_point;
};
uniform mix_fs_params _10;
layout(binding = 16) uniform sampler2D mixtex_b_mixsmp;
layout(binding = 17) uniform sampler2D mixtex_a_mixsmp;
layout(binding = 18) uniform sampler2D mixtex_c_mixsmp;
layout(location = 0) in vec2 texcoord;
layout(location = 0) out vec4 frag_color;
void main()
{
if (_10.op == 0)
{
frag_color = vec4(mix(texture(mixtex_b_mixsmp, texcoord).xyz, texture(mixtex_a_mixsmp, texcoord).xyz, vec3(smoothstep(_10.dof_min, _10.dof_max, abs(texture(mixtex_c_mixsmp, texcoord).z + _10.dof_point)))), 1.0);
}
else
{
if (_10.op == 1)
{
frag_color = vec4(texture(mixtex_b_mixsmp, texcoord).xyz + texture(mixtex_a_mixsmp, texcoord).xyz, 1.0);
}
}
}
*/
fs_mix_source_glsl430 := u8.[
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x73,0x74,
0x72,0x75,0x63,0x74,0x20,0x6d,0x69,0x78,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,
0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x6f,0x70,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x6f,0x66,0x5f,0x6d,
0x69,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x6f,
0x66,0x5f,0x6d,0x61,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x20,0x64,0x6f,0x66,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,
0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x6d,0x69,0x78,0x5f,0x66,0x73,0x5f,0x70,
0x61,0x72,0x61,0x6d,0x73,0x20,0x5f,0x31,0x30,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,
0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x36,0x29,
0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,
0x32,0x44,0x20,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x62,0x5f,0x6d,0x69,0x78,0x73,
0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,
0x6e,0x67,0x20,0x3d,0x20,0x31,0x37,0x29,0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,
0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x6d,0x69,0x78,0x74,0x65,
0x78,0x5f,0x61,0x5f,0x6d,0x69,0x78,0x73,0x6d,0x70,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
0x75,0x74,0x28,0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x20,0x3d,0x20,0x31,0x38,0x29,
0x20,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,
0x32,0x44,0x20,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x63,0x5f,0x6d,0x69,0x78,0x73,
0x6d,0x70,0x3b,0x0a,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,
0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x3b,0x0a,0x6c,0x61,0x79,0x6f,
0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,
0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,
0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,
0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x30,
0x2e,0x6f,0x70,0x20,0x3d,0x3d,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x6d,0x69,0x78,0x28,0x74,0x65,
0x78,0x74,0x75,0x72,0x65,0x28,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x62,0x5f,0x6d,
0x69,0x78,0x73,0x6d,0x70,0x2c,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x29,
0x2e,0x78,0x79,0x7a,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6d,0x69,
0x78,0x74,0x65,0x78,0x5f,0x61,0x5f,0x6d,0x69,0x78,0x73,0x6d,0x70,0x2c,0x20,0x74,
0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,
0x63,0x33,0x28,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x5f,0x31,
0x30,0x2e,0x64,0x6f,0x66,0x5f,0x6d,0x69,0x6e,0x2c,0x20,0x5f,0x31,0x30,0x2e,0x64,
0x6f,0x66,0x5f,0x6d,0x61,0x78,0x2c,0x20,0x61,0x62,0x73,0x28,0x74,0x65,0x78,0x74,
0x75,0x72,0x65,0x28,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x63,0x5f,0x6d,0x69,0x78,
0x73,0x6d,0x70,0x2c,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x29,0x2e,0x7a,
0x20,0x2b,0x20,0x5f,0x31,0x30,0x2e,0x64,0x6f,0x66,0x5f,0x70,0x6f,0x69,0x6e,0x74,
0x29,0x29,0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
0x7d,0x0a,0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x30,
0x2e,0x6f,0x70,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,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,
0x34,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6d,0x69,0x78,0x74,0x65,0x78,
0x5f,0x62,0x5f,0x6d,0x69,0x78,0x73,0x6d,0x70,0x2c,0x20,0x74,0x65,0x78,0x63,0x6f,
0x6f,0x72,0x64,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,
0x72,0x65,0x28,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x61,0x5f,0x6d,0x69,0x78,0x73,
0x6d,0x70,0x2c,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x29,0x2e,0x78,0x79,
0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x7d,0x0a,0x0a,0x00,
];
/*
#version 300 es
layout(location = 0) in vec2 position;
out vec2 texcoord;
layout(location = 1) in vec2 uv;
void main()
{
gl_Position = vec4(position, 0.5, 1.0);
texcoord = uv;
}
*/
vs_mix_source_glsl300es := u8.[
0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a,
0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,
0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x70,0x6f,
0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,
0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,
0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x31,0x29,0x20,
0x69,0x6e,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x0a,0x76,0x6f,0x69,
0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,
0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,
0x34,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x30,0x2e,0x35,0x2c,
0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x74,0x65,0x78,0x63,0x6f,
0x6f,0x72,0x64,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
];
/*
#version 300 es
precision mediump float;
precision highp int;
struct mix_fs_params
{
int op;
highp float dof_min;
highp float dof_max;
highp float dof_point;
};
uniform mix_fs_params _10;
uniform highp sampler2D mixtex_b_mixsmp;
uniform highp sampler2D mixtex_a_mixsmp;
uniform highp sampler2D mixtex_c_mixsmp;
in highp vec2 texcoord;
layout(location = 0) out highp vec4 frag_color;
void main()
{
if (_10.op == 0)
{
frag_color = vec4(mix(texture(mixtex_b_mixsmp, texcoord).xyz, texture(mixtex_a_mixsmp, texcoord).xyz, vec3(smoothstep(_10.dof_min, _10.dof_max, abs(texture(mixtex_c_mixsmp, texcoord).z + _10.dof_point)))), 1.0);
}
else
{
if (_10.op == 1)
{
frag_color = vec4(texture(mixtex_b_mixsmp, texcoord).xyz + texture(mixtex_a_mixsmp, texcoord).xyz, 1.0);
}
}
}
*/
fs_mix_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,0x6d,0x69,0x78,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,
0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x6f,0x70,
0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,
0x74,0x20,0x64,0x6f,0x66,0x5f,0x6d,0x69,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x6f,0x66,0x5f,0x6d,
0x61,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,
0x6f,0x61,0x74,0x20,0x64,0x6f,0x66,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x3b,0x0a,0x7d,
0x3b,0x0a,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x6d,0x69,0x78,0x5f,0x66,
0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x5f,0x31,0x30,0x3b,0x0a,0x0a,0x75,
0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,
0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x62,0x5f,
0x6d,0x69,0x78,0x73,0x6d,0x70,0x3b,0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,
0x68,0x69,0x67,0x68,0x70,0x20,0x73,0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,
0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x61,0x5f,0x6d,0x69,0x78,0x73,0x6d,0x70,0x3b,
0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x73,
0x61,0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,
0x63,0x5f,0x6d,0x69,0x78,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x69,0x6e,0x20,0x68,0x69,
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,
0x64,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,
0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x68,0x69,0x67,0x68,
0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,
0x72,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,
0x7b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x30,0x2e,0x6f,0x70,
0x20,0x3d,0x3d,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,
0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x6d,0x69,0x78,0x28,0x74,0x65,0x78,0x74,0x75,
0x72,0x65,0x28,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x62,0x5f,0x6d,0x69,0x78,0x73,
0x6d,0x70,0x2c,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x29,0x2e,0x78,0x79,
0x7a,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6d,0x69,0x78,0x74,0x65,
0x78,0x5f,0x61,0x5f,0x6d,0x69,0x78,0x73,0x6d,0x70,0x2c,0x20,0x74,0x65,0x78,0x63,
0x6f,0x6f,0x72,0x64,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,
0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x5f,0x31,0x30,0x2e,0x64,
0x6f,0x66,0x5f,0x6d,0x69,0x6e,0x2c,0x20,0x5f,0x31,0x30,0x2e,0x64,0x6f,0x66,0x5f,
0x6d,0x61,0x78,0x2c,0x20,0x61,0x62,0x73,0x28,0x74,0x65,0x78,0x74,0x75,0x72,0x65,
0x28,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x63,0x5f,0x6d,0x69,0x78,0x73,0x6d,0x70,
0x2c,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x29,0x2e,0x7a,0x20,0x2b,0x20,
0x5f,0x31,0x30,0x2e,0x64,0x6f,0x66,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x29,0x29,0x29,
0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x30,0x2e,0x6f,0x70,
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,0x72,0x61,
0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x74,
0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x62,0x5f,
0x6d,0x69,0x78,0x73,0x6d,0x70,0x2c,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,
0x29,0x2e,0x78,0x79,0x7a,0x20,0x2b,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,
0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x61,0x5f,0x6d,0x69,0x78,0x73,0x6d,0x70,0x2c,
0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,
0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,
0x20,0x20,0x20,0x20,0x7d,0x0a,0x7d,0x0a,0x0a,0x00,
];
/*
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct main0_out
{
float2 texcoord [[user(locn0)]];
float4 gl_Position [[position]];
};
struct main0_in
{
float2 position [[attribute(0)]];
float2 uv [[attribute(1)]];
};
vertex main0_out main0(main0_in in [[stage_in]])
{
main0_out out = {};
out.gl_Position = float4(in.position, 0.5, 1.0);
out.texcoord = in.uv;
return out;
}
*/
vs_mix_source_metal_macos := u8.[
0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x20,0x3c,0x6d,0x65,0x74,0x61,0x6c,0x5f,
0x73,0x74,0x64,0x6c,0x69,0x62,0x3e,0x0a,0x23,0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,
0x20,0x3c,0x73,0x69,0x6d,0x64,0x2f,0x73,0x69,0x6d,0x64,0x2e,0x68,0x3e,0x0a,0x0a,
0x75,0x73,0x69,0x6e,0x67,0x20,0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,0x20,
0x6d,0x65,0x74,0x61,0x6c,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,
0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x20,0x5b,
0x5b,0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,
0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
0x6e,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x32,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,
0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x30,0x29,0x5d,0x5d,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x5b,
0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x31,0x29,0x5d,0x5d,0x3b,
0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,
0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,
0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,
0x69,0x6e,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,
0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,
0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x69,0x6e,0x2e,
0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x30,0x2e,0x35,0x2c,0x20,0x31,
0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x74,0x65,0x78,
0x63,0x6f,0x6f,0x72,0x64,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x75,0x76,0x3b,0x0a,0x20,
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,
0x0a,0x0a,0x00,
];
/*
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct mix_fs_params
{
int op;
float dof_min;
float dof_max;
float dof_point;
};
struct main0_out
{
float4 frag_color [[color(0)]];
};
struct main0_in
{
float2 texcoord [[user(locn0)]];
};
fragment main0_out main0(main0_in in [[stage_in]], constant mix_fs_params& _10 [[buffer(0)]], texture2d<float> mixtex_a [[texture(0)]], texture2d<float> mixtex_b [[texture(1)]], texture2d<float> mixtex_c [[texture(2)]], sampler mixsmp [[sampler(0)]])
{
main0_out out = {};
if (_10.op == 0)
{
out.frag_color = float4(mix(mixtex_b.sample(mixsmp, in.texcoord).xyz, mixtex_a.sample(mixsmp, in.texcoord).xyz, float3(smoothstep(_10.dof_min, _10.dof_max, abs(mixtex_c.sample(mixsmp, in.texcoord).z + _10.dof_point)))), 1.0);
}
else
{
if (_10.op == 1)
{
out.frag_color = float4(mixtex_b.sample(mixsmp, in.texcoord).xyz + mixtex_a.sample(mixsmp, in.texcoord).xyz, 1.0);
}
}
return out;
}
*/
fs_mix_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,
0x69,0x78,0x5f,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x0a,0x7b,0x0a,0x20,
0x20,0x20,0x20,0x69,0x6e,0x74,0x20,0x6f,0x70,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x20,0x64,0x6f,0x66,0x5f,0x6d,0x69,0x6e,0x3b,0x0a,0x20,0x20,
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x6f,0x66,0x5f,0x6d,0x61,0x78,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x64,0x6f,0x66,0x5f,0x70,
0x6f,0x69,0x6e,0x74,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,
0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,
0x6f,0x72,0x20,0x5b,0x5b,0x63,0x6f,0x6c,0x6f,0x72,0x28,0x30,0x29,0x5d,0x5d,0x3b,
0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,
0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x20,0x5b,0x5b,0x75,0x73,0x65,
0x72,0x28,0x6c,0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,
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,0x6d,0x69,0x78,0x5f,
0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x30,0x20,0x5b,
0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,
0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x6d,
0x69,0x78,0x74,0x65,0x78,0x5f,0x61,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,
0x65,0x28,0x30,0x29,0x5d,0x5d,0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,
0x64,0x3c,0x66,0x6c,0x6f,0x61,0x74,0x3e,0x20,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,
0x62,0x20,0x5b,0x5b,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x31,0x29,0x5d,0x5d,
0x2c,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x32,0x64,0x3c,0x66,0x6c,0x6f,0x61,
0x74,0x3e,0x20,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x63,0x20,0x5b,0x5b,0x74,0x65,
0x78,0x74,0x75,0x72,0x65,0x28,0x32,0x29,0x5d,0x5d,0x2c,0x20,0x73,0x61,0x6d,0x70,
0x6c,0x65,0x72,0x20,0x6d,0x69,0x78,0x73,0x6d,0x70,0x20,0x5b,0x5b,0x73,0x61,0x6d,
0x70,0x6c,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,0x30,
0x2e,0x6f,0x70,0x20,0x3d,0x3d,0x20,0x30,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,
0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,
0x6d,0x69,0x78,0x28,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x62,0x2e,0x73,0x61,0x6d,
0x70,0x6c,0x65,0x28,0x6d,0x69,0x78,0x73,0x6d,0x70,0x2c,0x20,0x69,0x6e,0x2e,0x74,
0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x6d,0x69,
0x78,0x74,0x65,0x78,0x5f,0x61,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x6d,0x69,
0x78,0x73,0x6d,0x70,0x2c,0x20,0x69,0x6e,0x2e,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,
0x64,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x73,
0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x5f,0x31,0x30,0x2e,0x64,0x6f,
0x66,0x5f,0x6d,0x69,0x6e,0x2c,0x20,0x5f,0x31,0x30,0x2e,0x64,0x6f,0x66,0x5f,0x6d,
0x61,0x78,0x2c,0x20,0x61,0x62,0x73,0x28,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x63,
0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,0x28,0x6d,0x69,0x78,0x73,0x6d,0x70,0x2c,0x20,
0x69,0x6e,0x2e,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x29,0x2e,0x7a,0x20,0x2b,
0x20,0x5f,0x31,0x30,0x2e,0x64,0x6f,0x66,0x5f,0x70,0x6f,0x69,0x6e,0x74,0x29,0x29,
0x29,0x29,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
0x20,0x20,0x20,0x20,0x65,0x6c,0x73,0x65,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x30,0x2e,0x6f,
0x70,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,0x6f,0x75,
0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,
0x6c,0x6f,0x61,0x74,0x34,0x28,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x62,0x2e,0x73,
0x61,0x6d,0x70,0x6c,0x65,0x28,0x6d,0x69,0x78,0x73,0x6d,0x70,0x2c,0x20,0x69,0x6e,
0x2e,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x29,0x2e,0x78,0x79,0x7a,0x20,0x2b,
0x20,0x6d,0x69,0x78,0x74,0x65,0x78,0x5f,0x61,0x2e,0x73,0x61,0x6d,0x70,0x6c,0x65,
0x28,0x6d,0x69,0x78,0x73,0x6d,0x70,0x2c,0x20,0x69,0x6e,0x2e,0x74,0x65,0x78,0x63,
0x6f,0x6f,0x72,0x64,0x29,0x2e,0x78,0x79,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,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,
];
mix_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
desc: sg_shader_desc;
desc.label = "mix_shader";
if backend == {
case .GLCORE;
desc.vertex_func.source = xx *vs_mix_source_glsl430;
desc.vertex_func.entry = "main";
desc.fragment_func.source = xx *fs_mix_source_glsl430;
desc.fragment_func.entry = "main";
desc.attrs[0].base_type = .FLOAT;
desc.attrs[0].glsl_name = "position";
desc.attrs[1].base_type = .FLOAT;
desc.attrs[1].glsl_name = "uv";
desc.uniform_blocks[1].stage = .FRAGMENT;
desc.uniform_blocks[1].layout = .STD140;
desc.uniform_blocks[1].size = 16;
desc.uniform_blocks[1].glsl_uniforms[0].type = .INT;
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "_10.op";
desc.uniform_blocks[1].glsl_uniforms[1].type = .FLOAT;
desc.uniform_blocks[1].glsl_uniforms[1].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[1].glsl_name = "_10.dof_min";
desc.uniform_blocks[1].glsl_uniforms[2].type = .FLOAT;
desc.uniform_blocks[1].glsl_uniforms[2].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[2].glsl_name = "_10.dof_max";
desc.uniform_blocks[1].glsl_uniforms[3].type = .FLOAT;
desc.uniform_blocks[1].glsl_uniforms[3].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[3].glsl_name = "_10.dof_point";
desc.images[0].stage = .FRAGMENT;
desc.images[0].multisampled = false;
desc.images[0].image_type = ._2D;
desc.images[0].sample_type = .FLOAT;
desc.images[1].stage = .FRAGMENT;
desc.images[1].multisampled = false;
desc.images[1].image_type = ._2D;
desc.images[1].sample_type = .FLOAT;
desc.images[2].stage = .FRAGMENT;
desc.images[2].multisampled = false;
desc.images[2].image_type = ._2D;
desc.images[2].sample_type = .FLOAT;
desc.samplers[0].stage = .FRAGMENT;
desc.samplers[0].sampler_type = .FILTERING;
desc.image_sampler_pairs[0].stage = .FRAGMENT;
desc.image_sampler_pairs[0].image_slot = 1;
desc.image_sampler_pairs[0].sampler_slot = 0;
desc.image_sampler_pairs[0].glsl_name = "mixtex_b_mixsmp";
desc.image_sampler_pairs[1].stage = .FRAGMENT;
desc.image_sampler_pairs[1].image_slot = 0;
desc.image_sampler_pairs[1].sampler_slot = 0;
desc.image_sampler_pairs[1].glsl_name = "mixtex_a_mixsmp";
desc.image_sampler_pairs[2].stage = .FRAGMENT;
desc.image_sampler_pairs[2].image_slot = 2;
desc.image_sampler_pairs[2].sampler_slot = 0;
desc.image_sampler_pairs[2].glsl_name = "mixtex_c_mixsmp";
case .GLES3;
desc.vertex_func.source = xx *vs_mix_source_glsl300es;
desc.vertex_func.entry = "main";
desc.fragment_func.source = xx *fs_mix_source_glsl300es;
desc.fragment_func.entry = "main";
desc.attrs[0].base_type = .FLOAT;
desc.attrs[0].glsl_name = "position";
desc.attrs[1].base_type = .FLOAT;
desc.attrs[1].glsl_name = "uv";
desc.uniform_blocks[1].stage = .FRAGMENT;
desc.uniform_blocks[1].layout = .STD140;
desc.uniform_blocks[1].size = 16;
desc.uniform_blocks[1].glsl_uniforms[0].type = .INT;
desc.uniform_blocks[1].glsl_uniforms[0].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[0].glsl_name = "_10.op";
desc.uniform_blocks[1].glsl_uniforms[1].type = .FLOAT;
desc.uniform_blocks[1].glsl_uniforms[1].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[1].glsl_name = "_10.dof_min";
desc.uniform_blocks[1].glsl_uniforms[2].type = .FLOAT;
desc.uniform_blocks[1].glsl_uniforms[2].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[2].glsl_name = "_10.dof_max";
desc.uniform_blocks[1].glsl_uniforms[3].type = .FLOAT;
desc.uniform_blocks[1].glsl_uniforms[3].array_count = 0;
desc.uniform_blocks[1].glsl_uniforms[3].glsl_name = "_10.dof_point";
desc.images[0].stage = .FRAGMENT;
desc.images[0].multisampled = false;
desc.images[0].image_type = ._2D;
desc.images[0].sample_type = .FLOAT;
desc.images[1].stage = .FRAGMENT;
desc.images[1].multisampled = false;
desc.images[1].image_type = ._2D;
desc.images[1].sample_type = .FLOAT;
desc.images[2].stage = .FRAGMENT;
desc.images[2].multisampled = false;
desc.images[2].image_type = ._2D;
desc.images[2].sample_type = .FLOAT;
desc.samplers[0].stage = .FRAGMENT;
desc.samplers[0].sampler_type = .FILTERING;
desc.image_sampler_pairs[0].stage = .FRAGMENT;
desc.image_sampler_pairs[0].image_slot = 1;
desc.image_sampler_pairs[0].sampler_slot = 0;
desc.image_sampler_pairs[0].glsl_name = "mixtex_b_mixsmp";
desc.image_sampler_pairs[1].stage = .FRAGMENT;
desc.image_sampler_pairs[1].image_slot = 0;
desc.image_sampler_pairs[1].sampler_slot = 0;
desc.image_sampler_pairs[1].glsl_name = "mixtex_a_mixsmp";
desc.image_sampler_pairs[2].stage = .FRAGMENT;
desc.image_sampler_pairs[2].image_slot = 2;
desc.image_sampler_pairs[2].sampler_slot = 0;
desc.image_sampler_pairs[2].glsl_name = "mixtex_c_mixsmp";
case .METAL_MACOS;
desc.vertex_func.source = xx *vs_mix_source_metal_macos;
desc.vertex_func.entry = "main0";
desc.fragment_func.source = xx *fs_mix_source_metal_macos;
desc.fragment_func.entry = "main0";
desc.attrs[0].base_type = .FLOAT;
desc.attrs[1].base_type = .FLOAT;
desc.uniform_blocks[1].stage = .FRAGMENT;
desc.uniform_blocks[1].layout = .STD140;
desc.uniform_blocks[1].size = 16;
desc.uniform_blocks[1].msl_buffer_n = 0;
desc.images[0].stage = .FRAGMENT;
desc.images[0].multisampled = false;
desc.images[0].image_type = ._2D;
desc.images[0].sample_type = .FLOAT;
desc.images[0].msl_texture_n = 0;
desc.images[1].stage = .FRAGMENT;
desc.images[1].multisampled = false;
desc.images[1].image_type = ._2D;
desc.images[1].sample_type = .FLOAT;
desc.images[1].msl_texture_n = 1;
desc.images[2].stage = .FRAGMENT;
desc.images[2].multisampled = false;
desc.images[2].image_type = ._2D;
desc.images[2].sample_type = .FLOAT;
desc.images[2].msl_texture_n = 2;
desc.samplers[0].stage = .FRAGMENT;
desc.samplers[0].sampler_type = .FILTERING;
desc.samplers[0].msl_sampler_n = 0;
desc.image_sampler_pairs[0].stage = .FRAGMENT;
desc.image_sampler_pairs[0].image_slot = 1;
desc.image_sampler_pairs[0].sampler_slot = 0;
desc.image_sampler_pairs[1].stage = .FRAGMENT;
desc.image_sampler_pairs[1].image_slot = 0;
desc.image_sampler_pairs[1].sampler_slot = 0;
desc.image_sampler_pairs[2].stage = .FRAGMENT;
desc.image_sampler_pairs[2].image_slot = 2;
desc.image_sampler_pairs[2].sampler_slot = 0;
}
return desc;
}