diff --git a/assets/shaders/default-mesh.glsl b/assets/shaders/default-mesh.glsl index 644c1eb7..ad9f1eb1 100644 --- a/assets/shaders/default-mesh.glsl +++ b/assets/shaders/default-mesh.glsl @@ -23,11 +23,15 @@ in vec4 tangents; out vec4 color; out vec2 uv; +out vec3 normal; +out vec4 tangent; void main() { gl_Position = u_projViewMatrix * u_modelMatrix * pos; color = color0 * u_color; uv = texcoord0 + u_tex_pan.xy; + normal = normals; + tangent = tangents; } #pragma sokol @end @@ -41,6 +45,8 @@ uniform fs_params { in vec4 color; in vec2 uv; +in vec3 normal; +in vec4 tangent; out vec4 frag_color; void main() { @@ -55,6 +61,10 @@ void main() { float override_mod = 1.0 - u_color_override.a; c.rgb = (c.rgb * override_mod) + (u_color_override.rgb * u_color_override.a); + // test if these values were being optimized away + float test = normal.x; + float test2 = tangent.x; + frag_color = c; } #pragma sokol @end diff --git a/assets/shaders/emissive.glsl b/assets/shaders/emissive.glsl index 9701eba4..d5153310 100644 --- a/assets/shaders/emissive.glsl +++ b/assets/shaders/emissive.glsl @@ -70,6 +70,10 @@ void main() { float override_mod = 1.0 - u_color_override.a; c.rgb = (c.rgb * override_mod) + (u_color_override.rgb * u_color_override.a); + // test if these values were being optimized away + float test = normal.x; + float test2 = tangent.x; + frag_color = c; } #pragma sokol @end diff --git a/src/framework/graphics/shaders/default-mesh.glsl.zig b/src/framework/graphics/shaders/default-mesh.glsl.zig index c1147405..a3e0b76e 100644 --- a/src/framework/graphics/shaders/default-mesh.glsl.zig +++ b/src/framework/graphics/shaders/default-mesh.glsl.zig @@ -68,7 +68,9 @@ pub const FsParams = extern struct { // layout(location = 1) in vec4 color0; // layout(location = 1) out vec2 uv; // layout(location = 2) in vec2 texcoord0; +// layout(location = 2) out vec3 normal; // layout(location = 3) in vec3 normals; +// layout(location = 3) out vec4 tangent; // layout(location = 4) in vec4 tangents; // // void main() @@ -76,10 +78,12 @@ pub const FsParams = extern struct { // gl_Position = (mat4(vs_params[0], vs_params[1], vs_params[2], vs_params[3]) * mat4(vs_params[4], vs_params[5], vs_params[6], vs_params[7])) * pos; // color = color0 * vs_params[8]; // uv = texcoord0 + vs_params[9].xy; +// normal = normals; +// tangent = tangents; // } // // -const vs_source_glsl430 = [544]u8 { +const vs_source_glsl430 = [667]u8 { 0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e, 0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x73,0x5f,0x70,0x61, 0x72,0x61,0x6d,0x73,0x5b,0x31,0x30,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74, @@ -95,26 +99,33 @@ const vs_source_glsl430 = [544]u8 { 0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20, 0x76,0x65,0x63,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a, 0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20, - 0x3d,0x20,0x33,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,0x20,0x6e,0x6f,0x72, - 0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63, - 0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x34,0x29,0x20,0x69,0x6e,0x20,0x76,0x65, - 0x63,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,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,0x28,0x6d, - 0x61,0x74,0x34,0x28,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d, - 0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20, - 0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x73, - 0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x6d,0x61, - 0x74,0x34,0x28,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x2c, - 0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x2c,0x20,0x76, - 0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x36,0x5d,0x2c,0x20,0x76,0x73,0x5f, - 0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x37,0x5d,0x29,0x29,0x20,0x2a,0x20,0x70,0x6f, - 0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63, - 0x6f,0x6c,0x6f,0x72,0x30,0x20,0x2a,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d, - 0x73,0x5b,0x38,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x74, - 0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x2b,0x20,0x76,0x73,0x5f,0x70,0x61, - 0x72,0x61,0x6d,0x73,0x5b,0x39,0x5d,0x2e,0x78,0x79,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, - + 0x3d,0x20,0x32,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x33,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,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x6c,0x61,0x79,0x6f, + 0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x33,0x29, + 0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e, + 0x74,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69, + 0x6f,0x6e,0x20,0x3d,0x20,0x34,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20, + 0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,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,0x28,0x6d,0x61,0x74,0x34, + 0x28,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76, + 0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x73,0x5f, + 0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61, + 0x72,0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x6d,0x61,0x74,0x34,0x28, + 0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x2c,0x20,0x76,0x73, + 0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70, + 0x61,0x72,0x61,0x6d,0x73,0x5b,0x36,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72, + 0x61,0x6d,0x73,0x5b,0x37,0x5d,0x29,0x29,0x20,0x2a,0x20,0x70,0x6f,0x73,0x3b,0x0a, + 0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f, + 0x72,0x30,0x20,0x2a,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38, + 0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x74,0x65,0x78,0x63, + 0x6f,0x6f,0x72,0x64,0x30,0x20,0x2b,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d, + 0x73,0x5b,0x39,0x5d,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x72, + 0x6d,0x61,0x6c,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x3d,0x20,0x74,0x61,0x6e, + 0x67,0x65,0x6e,0x74,0x73,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; // // #version 430 @@ -124,6 +135,8 @@ const vs_source_glsl430 = [544]u8 { // // layout(location = 1) in vec2 uv; // layout(location = 0) in vec4 color; +// layout(location = 2) in vec3 normal; +// layout(location = 3) in vec4 tangent; // layout(location = 0) out vec4 frag_color; // // void main() @@ -136,16 +149,16 @@ const vs_source_glsl430 = [544]u8 { // } // vec4 _54 = c; // vec3 _65 = (_54.xyz * (1.0 - fs_params[0].w)) + (fs_params[0].xyz * fs_params[0].w); -// vec4 _80 = _54; -// _80.x = _65.x; -// _80.y = _65.y; -// _80.z = _65.z; -// c = _80; -// frag_color = _80; +// vec4 _90 = _54; +// _90.x = _65.x; +// _90.y = _65.y; +// _90.z = _65.z; +// c = _90; +// frag_color = _90; // } // // -const fs_source_glsl430 = [563]u8 { +const fs_source_glsl430 = [638]u8 { 0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x33,0x30,0x0a,0x0a,0x75,0x6e, 0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x66,0x73,0x5f,0x70,0x61, 0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28, @@ -157,31 +170,35 @@ const fs_source_glsl430 = [563]u8 { 0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69, 0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x6c,0x61, 0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20, - 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,0x76,0x65,0x63,0x34,0x20, - 0x5f,0x32,0x38,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,0x65, - 0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x20,0x2a,0x20,0x63,0x6f,0x6c, - 0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x20,0x3d, - 0x20,0x5f,0x32,0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x32, - 0x38,0x2e,0x77,0x20,0x3c,0x3d,0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73, - 0x5b,0x31,0x5d,0x2e,0x78,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20, - 0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x35,0x34, - 0x20,0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f, - 0x36,0x35,0x20,0x3d,0x20,0x28,0x5f,0x35,0x34,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20, - 0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73, - 0x5b,0x30,0x5d,0x2e,0x77,0x29,0x29,0x20,0x2b,0x20,0x28,0x66,0x73,0x5f,0x70,0x61, - 0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x66,0x73, - 0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x29,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x38,0x30,0x20,0x3d,0x20,0x5f,0x35, - 0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f, - 0x36,0x35,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x79,0x20, - 0x3d,0x20,0x5f,0x36,0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30, - 0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20, - 0x63,0x20,0x3d,0x20,0x5f,0x38,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61, - 0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x38,0x30,0x3b,0x0a,0x7d, - 0x0a,0x0a,0x00, + 0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,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, + 0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,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,0x76,0x65,0x63,0x34,0x20,0x5f,0x32,0x38,0x20,0x3d, + 0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70, + 0x2c,0x20,0x75,0x76,0x29,0x20,0x2a,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x20,0x3d,0x20,0x5f,0x32,0x38,0x3b, + 0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x32,0x38,0x2e,0x77,0x20,0x3c, + 0x3d,0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2e,0x78, + 0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, + 0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20, + 0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x35,0x34,0x20,0x3d,0x20,0x63,0x3b, + 0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x36,0x35,0x20,0x3d,0x20, + 0x28,0x5f,0x35,0x34,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20, + 0x2d,0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77, + 0x29,0x29,0x20,0x2b,0x20,0x28,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b, + 0x30,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61, + 0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65, + 0x63,0x34,0x20,0x5f,0x39,0x30,0x20,0x3d,0x20,0x5f,0x35,0x34,0x3b,0x0a,0x20,0x20, + 0x20,0x20,0x5f,0x39,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x78,0x3b, + 0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x36,0x35, + 0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x7a,0x20,0x3d,0x20, + 0x5f,0x36,0x35,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d,0x20,0x5f, + 0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c, + 0x6f,0x72,0x20,0x3d,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; // // #version 300 es @@ -192,7 +209,9 @@ const fs_source_glsl430 = [563]u8 { // layout(location = 1) in vec4 color0; // out vec2 uv; // layout(location = 2) in vec2 texcoord0; +// out vec3 normal; // layout(location = 3) in vec3 normals; +// out vec4 tangent; // layout(location = 4) in vec4 tangents; // // void main() @@ -200,10 +219,12 @@ const fs_source_glsl430 = [563]u8 { // gl_Position = (mat4(vs_params[0], vs_params[1], vs_params[2], vs_params[3]) * mat4(vs_params[4], vs_params[5], vs_params[6], vs_params[7])) * pos; // color = color0 * vs_params[8]; // uv = texcoord0 + vs_params[9].xy; +// normal = normals; +// tangent = tangents; // } // // -const vs_source_glsl300es = [505]u8 { +const vs_source_glsl300es = [586]u8 { 0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a, 0x0a,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d,0x20,0x76,0x65,0x63,0x34,0x20,0x76,0x73, 0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x30,0x5d,0x3b,0x0a,0x6c,0x61,0x79, @@ -215,27 +236,32 @@ const vs_source_glsl300es = [505]u8 { 0x72,0x30,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,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,0x32,0x20,0x74,0x65, - 0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28, - 0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x33,0x29,0x20,0x69,0x6e, - 0x20,0x76,0x65,0x63,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x6c, - 0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d, - 0x20,0x34,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x74,0x61,0x6e,0x67, - 0x65,0x6e,0x74,0x73,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,0x28,0x6d,0x61,0x74,0x34,0x28,0x76,0x73,0x5f, - 0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61, - 0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61, - 0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73, - 0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x6d,0x61,0x74,0x34,0x28,0x76,0x73,0x5f,0x70, - 0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72, - 0x61,0x6d,0x73,0x5b,0x35,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d, - 0x73,0x5b,0x36,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b, - 0x37,0x5d,0x29,0x29,0x20,0x2a,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20, - 0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x2a, - 0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64, - 0x30,0x20,0x2b,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x39,0x5d, - 0x2e,0x78,0x79,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, + 0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63, + 0x33,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,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x3b,0x0a, + 0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74, + 0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f, + 0x6e,0x20,0x3d,0x20,0x34,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x74, + 0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,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,0x28,0x6d,0x61,0x74,0x34,0x28, + 0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2c,0x20,0x76,0x73, + 0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70, + 0x61,0x72,0x61,0x6d,0x73,0x5b,0x32,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72, + 0x61,0x6d,0x73,0x5b,0x33,0x5d,0x29,0x20,0x2a,0x20,0x6d,0x61,0x74,0x34,0x28,0x76, + 0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x34,0x5d,0x2c,0x20,0x76,0x73,0x5f, + 0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x35,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61, + 0x72,0x61,0x6d,0x73,0x5b,0x36,0x5d,0x2c,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61, + 0x6d,0x73,0x5b,0x37,0x5d,0x29,0x29,0x20,0x2a,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72, + 0x30,0x20,0x2a,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x38,0x5d, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f, + 0x6f,0x72,0x64,0x30,0x20,0x2b,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73, + 0x5b,0x39,0x5d,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x72,0x6d, + 0x61,0x6c,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x20,0x20, + 0x20,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x3d,0x20,0x74,0x61,0x6e,0x67, + 0x65,0x6e,0x74,0x73,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; // // #version 300 es @@ -247,6 +273,8 @@ const vs_source_glsl300es = [505]u8 { // // in highp vec2 uv; // in highp vec4 color; +// in highp vec3 normal; +// in highp vec4 tangent; // layout(location = 0) out highp vec4 frag_color; // // void main() @@ -259,16 +287,16 @@ const vs_source_glsl300es = [505]u8 { // } // highp vec4 _54 = c; // highp vec3 _65 = (_54.xyz * (1.0 - fs_params[0].w)) + (fs_params[0].xyz * fs_params[0].w); -// highp vec4 _80 = _54; -// _80.x = _65.x; -// _80.y = _65.y; -// _80.z = _65.z; -// c = _80; -// frag_color = _80; +// highp vec4 _90 = _54; +// _90.x = _65.x; +// _90.y = _65.y; +// _90.z = _65.z; +// c = _90; +// frag_color = _90; // } // // -const fs_source_glsl300es = [610]u8 { +const fs_source_glsl300es = [655]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, @@ -279,35 +307,37 @@ const fs_source_glsl300es = [610]u8 { 0x6d,0x70,0x6c,0x65,0x72,0x32,0x44,0x20,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x3b, 0x0a,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20, 0x75,0x76,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63, - 0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28, - 0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,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,0x68,0x69,0x67,0x68, - 0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x32,0x38,0x20,0x3d,0x20,0x74,0x65,0x78, - 0x74,0x75,0x72,0x65,0x28,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76, - 0x29,0x20,0x2a,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68, - 0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x20,0x3d,0x20,0x5f,0x32, - 0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x32,0x38,0x2e,0x77, - 0x20,0x3c,0x3d,0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d, - 0x2e,0x78,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, - 0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d, - 0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20, - 0x5f,0x35,0x34,0x20,0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67, - 0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x5f,0x36,0x35,0x20,0x3d,0x20,0x28,0x5f, - 0x35,0x34,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20, - 0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x29,0x29, - 0x20,0x2b,0x20,0x28,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d, - 0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73, - 0x5b,0x30,0x5d,0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68, - 0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x38,0x30,0x20,0x3d,0x20,0x5f,0x35,0x34, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x36, - 0x35,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x79,0x20,0x3d, - 0x20,0x5f,0x36,0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e, - 0x7a,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63, - 0x20,0x3d,0x20,0x5f,0x38,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67, - 0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x38,0x30,0x3b,0x0a,0x7d,0x0a, - 0x0a,0x00, + 0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68, + 0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x69, + 0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x74,0x61,0x6e, + 0x67,0x65,0x6e,0x74,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,0x68,0x69,0x67,0x68,0x70,0x20,0x76, + 0x65,0x63,0x34,0x20,0x5f,0x32,0x38,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72, + 0x65,0x28,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x20,0x2a, + 0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68, + 0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x20,0x3d,0x20,0x5f,0x32,0x38,0x3b,0x0a, + 0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x32,0x38,0x2e,0x77,0x20,0x3c,0x3d, + 0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x31,0x5d,0x2e,0x78,0x29, + 0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64, + 0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20, + 0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x35,0x34, + 0x20,0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20, + 0x76,0x65,0x63,0x33,0x20,0x5f,0x36,0x35,0x20,0x3d,0x20,0x28,0x5f,0x35,0x34,0x2e, + 0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x66,0x73,0x5f, + 0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x29,0x29,0x20,0x2b,0x20, + 0x28,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79, + 0x7a,0x20,0x2a,0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d, + 0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76, + 0x65,0x63,0x34,0x20,0x5f,0x39,0x30,0x20,0x3d,0x20,0x5f,0x35,0x34,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x78, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x36, + 0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x7a,0x20,0x3d, + 0x20,0x5f,0x36,0x35,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d,0x20, + 0x5f,0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f, + 0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; // // cbuffer vs_params : register(b0) @@ -325,7 +355,9 @@ const fs_source_glsl300es = [610]u8 { // static float4 color0; // static float2 uv; // static float2 texcoord0; +// static float3 normal; // static float3 normals; +// static float4 tangent; // static float4 tangents; // // struct SPIRV_Cross_Input @@ -341,6 +373,8 @@ const fs_source_glsl300es = [610]u8 { // { // float4 color : TEXCOORD0; // float2 uv : TEXCOORD1; +// float3 normal : TEXCOORD2; +// float4 tangent : TEXCOORD3; // float4 gl_Position : SV_Position; // }; // @@ -349,6 +383,8 @@ const fs_source_glsl300es = [610]u8 { // gl_Position = mul(pos, mul(_19_u_modelMatrix, _19_u_projViewMatrix)); // color = color0 * _19_u_color; // uv = texcoord0 + _19_u_tex_pan.xy; +// normal = normals; +// tangent = tangents; // } // // SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) @@ -363,10 +399,12 @@ const fs_source_glsl300es = [610]u8 { // stage_output.gl_Position = gl_Position; // stage_output.color = color; // stage_output.uv = uv; +// stage_output.normal = normal; +// stage_output.tangent = tangent; // return stage_output; // } // -const vs_source_hlsl4 = [1322]u8 { +const vs_source_hlsl4 = [1546]u8 { 0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x76,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d, 0x73,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x62,0x30,0x29, 0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x72,0x6f,0x77,0x5f,0x6d,0x61,0x6a,0x6f,0x72, @@ -391,63 +429,77 @@ const vs_source_hlsl4 = [1322]u8 { 0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x3b,0x0a, 0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x74,0x65, 0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20, - 0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x3b,0x0a, - 0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61, - 0x6e,0x67,0x65,0x6e,0x74,0x73,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20, + 0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x73, + 0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x6e,0x6f,0x72, + 0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f, + 0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x3b,0x0a,0x73,0x74,0x61, + 0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65, + 0x6e,0x74,0x73,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49, + 0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b, + 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,0x20, + 0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x3a, + 0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20, + 0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30, + 0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x32,0x3b,0x0a,0x20,0x20, + 0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73, + 0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x33,0x3b,0x0a,0x20,0x20, + 0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74, + 0x73,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x34,0x3b,0x0a,0x7d, + 0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f, + 0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20, + 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20, + 0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x3a,0x20,0x54,0x45,0x58, + 0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61, + 0x74,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3a,0x20,0x54,0x45,0x58,0x43, + 0x4f,0x4f,0x52,0x44,0x32,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74, + 0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x3a,0x20,0x54,0x45,0x58,0x43, + 0x4f,0x4f,0x52,0x44,0x33,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,0x3a,0x20, + 0x53,0x56,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a, + 0x0a,0x76,0x6f,0x69,0x64,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28, + 0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74, + 0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x75,0x6c,0x28,0x70,0x6f,0x73,0x2c,0x20,0x6d, + 0x75,0x6c,0x28,0x5f,0x31,0x39,0x5f,0x75,0x5f,0x6d,0x6f,0x64,0x65,0x6c,0x4d,0x61, + 0x74,0x72,0x69,0x78,0x2c,0x20,0x5f,0x31,0x39,0x5f,0x75,0x5f,0x70,0x72,0x6f,0x6a, + 0x56,0x69,0x65,0x77,0x4d,0x61,0x74,0x72,0x69,0x78,0x29,0x29,0x3b,0x0a,0x20,0x20, + 0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30, + 0x20,0x2a,0x20,0x5f,0x31,0x39,0x5f,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a, + 0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72, + 0x64,0x30,0x20,0x2b,0x20,0x5f,0x31,0x39,0x5f,0x75,0x5f,0x74,0x65,0x78,0x5f,0x70, + 0x61,0x6e,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61, + 0x6c,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x3d,0x20,0x74,0x61,0x6e,0x67,0x65, + 0x6e,0x74,0x73,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72, + 0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x28, 0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75, - 0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70, - 0x6f,0x73,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a, - 0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72, - 0x30,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x31,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f, - 0x72,0x64,0x30,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x32,0x3b, - 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x6e,0x6f,0x72,0x6d, - 0x61,0x6c,0x73,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x33,0x3b, - 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67, - 0x65,0x6e,0x74,0x73,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x34, - 0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49, - 0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x0a, - 0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c, - 0x6f,0x72,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a, - 0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x3a,0x20, - 0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x31,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,0x3a,0x20,0x53,0x56,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b, - 0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d, - 0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50, - 0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x6d,0x75,0x6c,0x28,0x70,0x6f, - 0x73,0x2c,0x20,0x6d,0x75,0x6c,0x28,0x5f,0x31,0x39,0x5f,0x75,0x5f,0x6d,0x6f,0x64, - 0x65,0x6c,0x4d,0x61,0x74,0x72,0x69,0x78,0x2c,0x20,0x5f,0x31,0x39,0x5f,0x75,0x5f, - 0x70,0x72,0x6f,0x6a,0x56,0x69,0x65,0x77,0x4d,0x61,0x74,0x72,0x69,0x78,0x29,0x29, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f, - 0x6c,0x6f,0x72,0x30,0x20,0x2a,0x20,0x5f,0x31,0x39,0x5f,0x75,0x5f,0x63,0x6f,0x6c, - 0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x74,0x65,0x78, - 0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x2b,0x20,0x5f,0x31,0x39,0x5f,0x75,0x5f,0x74, - 0x65,0x78,0x5f,0x70,0x61,0x6e,0x2e,0x78,0x79,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50, - 0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74, - 0x20,0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73, - 0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e, - 0x70,0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d, - 0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x70,0x6f,0x73, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x3d,0x20,0x73, - 0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72, - 0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30, - 0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x74, - 0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f, - 0x72,0x6d,0x61,0x6c,0x73,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e, - 0x70,0x75,0x74,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,0x20,0x3d,0x20,0x73,0x74,0x61,0x67, - 0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28, - 0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f, - 0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f, - 0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67, - 0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69, - 0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69, - 0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75, - 0x74,0x70,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c, - 0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75, - 0x74,0x70,0x75,0x74,0x2e,0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20, + 0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,0x0a,0x7b, + 0x0a,0x20,0x20,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65, + 0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20, + 0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69, + 0x6e,0x70,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x3d,0x20,0x73,0x74,0x61, + 0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72, + 0x64,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x20, + 0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x6e,0x6f, + 0x72,0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x74,0x61,0x6e,0x67,0x65, + 0x6e,0x74,0x73,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75, + 0x74,0x2e,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20, + 0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74, + 0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70, + 0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d, + 0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20, + 0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x63, + 0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20, + 0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x75, + 0x76,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67, + 0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20, + 0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74, + 0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x74,0x61,0x6e,0x67,0x65, + 0x6e,0x74,0x20,0x3d,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x3b,0x0a,0x20,0x20, 0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f, 0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x00, }; @@ -463,12 +515,16 @@ const vs_source_hlsl4 = [1322]u8 { // // static float2 uv; // static float4 color; +// static float3 normal; +// static float4 tangent; // static float4 frag_color; // // struct SPIRV_Cross_Input // { // float4 color : TEXCOORD0; // float2 uv : TEXCOORD1; +// float3 normal : TEXCOORD2; +// float4 tangent : TEXCOORD3; // }; // // struct SPIRV_Cross_Output @@ -486,25 +542,27 @@ const vs_source_hlsl4 = [1322]u8 { // } // float4 _54 = c; // float3 _65 = (_54.xyz * (1.0f - _36_u_color_override.w)) + (_36_u_color_override.xyz * _36_u_color_override.w); -// float4 _80 = _54; -// _80.x = _65.x; -// _80.y = _65.y; -// _80.z = _65.z; -// c = _80; -// frag_color = _80; +// float4 _90 = _54; +// _90.x = _65.x; +// _90.y = _65.y; +// _90.z = _65.z; +// c = _90; +// frag_color = _90; // } // // SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) // { // uv = stage_input.uv; // color = stage_input.color; +// normal = stage_input.normal; +// tangent = stage_input.tangent; // frag_main(); // SPIRV_Cross_Output stage_output; // stage_output.frag_color = frag_color; // return stage_output; // } // -const fs_source_hlsl4 = [1071]u8 { +const fs_source_hlsl4 = [1247]u8 { 0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d, 0x73,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x62,0x30,0x29, 0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x33, @@ -521,50 +579,61 @@ const fs_source_hlsl4 = [1071]u8 { 0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76, 0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20, 0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c, - 0x6f,0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b, - 0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43, - 0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20, - 0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20, - 0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66, - 0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f, - 0x4f,0x52,0x44,0x31,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74, - 0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74, - 0x70,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,0x3a,0x20,0x53,0x56, - 0x5f,0x54,0x61,0x72,0x67,0x65,0x74,0x30,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f, - 0x69,0x64,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b, - 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x32,0x38,0x20, - 0x3d,0x20,0x74,0x65,0x78,0x2e,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70, - 0x2c,0x20,0x75,0x76,0x29,0x20,0x2a,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x20,0x3d,0x20,0x5f,0x32, - 0x38,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x32,0x38,0x2e,0x77, - 0x20,0x3c,0x3d,0x20,0x5f,0x33,0x36,0x5f,0x75,0x5f,0x61,0x6c,0x70,0x68,0x61,0x5f, - 0x63,0x75,0x74,0x6f,0x66,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20, - 0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20, - 0x5f,0x35,0x34,0x20,0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, - 0x61,0x74,0x33,0x20,0x5f,0x36,0x35,0x20,0x3d,0x20,0x28,0x5f,0x35,0x34,0x2e,0x78, - 0x79,0x7a,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x66,0x20,0x2d,0x20,0x5f,0x33,0x36, - 0x5f,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64, - 0x65,0x2e,0x77,0x29,0x29,0x20,0x2b,0x20,0x28,0x5f,0x33,0x36,0x5f,0x75,0x5f,0x63, - 0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x78,0x79, - 0x7a,0x20,0x2a,0x20,0x5f,0x33,0x36,0x5f,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f, - 0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x38,0x30,0x20,0x3d,0x20,0x5f,0x35, - 0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f, - 0x36,0x35,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x79,0x20, - 0x3d,0x20,0x5f,0x36,0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30, - 0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20, - 0x63,0x20,0x3d,0x20,0x5f,0x38,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61, - 0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x38,0x30,0x3b,0x0a,0x7d, - 0x0a,0x0a,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75, - 0x74,0x70,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f, - 0x43,0x72,0x6f,0x73,0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67, - 0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x75, - 0x76,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e, - 0x75,0x76,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20, - 0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f, - 0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e, + 0x6f,0x61,0x74,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x73,0x74,0x61, + 0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65, + 0x6e,0x74,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74, + 0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x73, + 0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73, + 0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c, + 0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x54,0x45,0x58, + 0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61, + 0x74,0x32,0x20,0x75,0x76,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44, + 0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x6e,0x6f, + 0x72,0x6d,0x61,0x6c,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x32, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e, + 0x67,0x65,0x6e,0x74,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x33, + 0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49, + 0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,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,0x3a,0x20,0x53,0x56,0x5f,0x54,0x61,0x72, + 0x67,0x65,0x74,0x30,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x66, + 0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20, + 0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x32,0x38,0x20,0x3d,0x20,0x74,0x65, + 0x78,0x2e,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76, + 0x29,0x20,0x2a,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66, + 0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x20,0x3d,0x20,0x5f,0x32,0x38,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x32,0x38,0x2e,0x77,0x20,0x3c,0x3d,0x20, + 0x5f,0x33,0x36,0x5f,0x75,0x5f,0x61,0x6c,0x70,0x68,0x61,0x5f,0x63,0x75,0x74,0x6f, + 0x66,0x66,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, + 0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d, + 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x35,0x34,0x20, + 0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20, + 0x5f,0x36,0x35,0x20,0x3d,0x20,0x28,0x5f,0x35,0x34,0x2e,0x78,0x79,0x7a,0x20,0x2a, + 0x20,0x28,0x31,0x2e,0x30,0x66,0x20,0x2d,0x20,0x5f,0x33,0x36,0x5f,0x75,0x5f,0x63, + 0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x77,0x29, + 0x29,0x20,0x2b,0x20,0x28,0x5f,0x33,0x36,0x5f,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72, + 0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20, + 0x5f,0x33,0x36,0x5f,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72, + 0x72,0x69,0x64,0x65,0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, + 0x61,0x74,0x34,0x20,0x5f,0x39,0x30,0x20,0x3d,0x20,0x5f,0x35,0x34,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x78, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x36, + 0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x7a,0x20,0x3d, + 0x20,0x5f,0x36,0x35,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d,0x20, + 0x5f,0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f, + 0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50, + 0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74, + 0x20,0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73, + 0x73,0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e, + 0x70,0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20, + 0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x75,0x76,0x3b,0x0a, + 0x20,0x20,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x73,0x74,0x61,0x67, + 0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x73,0x74,0x61,0x67, + 0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a, + 0x20,0x20,0x20,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x3d,0x20,0x73,0x74, + 0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x74,0x61,0x6e,0x67,0x65,0x6e, + 0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x6d,0x61,0x69,0x6e, 0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72, 0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65, 0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61, @@ -591,6 +660,8 @@ const fs_source_hlsl4 = [1071]u8 { // { // float4 color [[user(locn0)]]; // float2 uv [[user(locn1)]]; +// float3 normal [[user(locn2)]]; +// float4 tangent [[user(locn3)]]; // float4 gl_Position [[position]]; // }; // @@ -599,6 +670,8 @@ const fs_source_hlsl4 = [1071]u8 { // float4 pos [[attribute(0)]]; // float4 color0 [[attribute(1)]]; // float2 texcoord0 [[attribute(2)]]; +// float3 normals [[attribute(3)]]; +// float4 tangents [[attribute(4)]]; // }; // // vertex main0_out main0(main0_in in [[stage_in]], constant vs_params& _19 [[buffer(0)]]) @@ -607,11 +680,13 @@ const fs_source_hlsl4 = [1071]u8 { // out.gl_Position = (_19.u_projViewMatrix * _19.u_modelMatrix) * in.pos; // out.color = in.color0 * _19.u_color; // out.uv = in.texcoord0 + _19.u_tex_pan.xy; +// out.normal = in.normals; +// out.tangent = in.tangents; // return out; // } // // -const vs_source_metal_macos = [747]u8 { +const vs_source_metal_macos = [953]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, @@ -630,35 +705,48 @@ const vs_source_metal_macos = [747]u8 { 0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, 0x61,0x74,0x32,0x20,0x75,0x76,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,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,0x63, - 0x6f,0x6c,0x6f,0x72,0x30,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,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x5b,0x5b,0x61, - 0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x7d, - 0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f, - 0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f, - 0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e, - 0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76,0x73,0x5f, - 0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x39,0x20,0x5b,0x5b,0x62,0x75, - 0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20, - 0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d, - 0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f, - 0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x28,0x5f,0x31,0x39,0x2e, - 0x75,0x5f,0x70,0x72,0x6f,0x6a,0x56,0x69,0x65,0x77,0x4d,0x61,0x74,0x72,0x69,0x78, - 0x20,0x2a,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x6d,0x6f,0x64,0x65,0x6c,0x4d,0x61, - 0x74,0x72,0x69,0x78,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x3b,0x0a, - 0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20, - 0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x2a,0x20,0x5f,0x31,0x39,0x2e, - 0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74, - 0x2e,0x75,0x76,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72, - 0x64,0x30,0x20,0x2b,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x74,0x65,0x78,0x5f,0x70, - 0x61,0x6e,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, + 0x74,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72, + 0x28,0x6c,0x6f,0x63,0x6e,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66, + 0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x5b,0x5b, + 0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73, + 0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e, + 0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d, + 0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c, + 0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,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,0x63,0x6f,0x6c,0x6f,0x72,0x30,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,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f, + 0x72,0x64,0x30,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28, + 0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33, + 0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69, + 0x62,0x75,0x74,0x65,0x28,0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66, + 0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,0x20,0x5b, + 0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x34,0x29,0x5d,0x5d,0x3b, + 0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e, + 0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e, + 0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f, + 0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76, + 0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x39,0x20,0x5b,0x5b, + 0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20, + 0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74, + 0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67, + 0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x28,0x5f,0x31, + 0x39,0x2e,0x75,0x5f,0x70,0x72,0x6f,0x6a,0x56,0x69,0x65,0x77,0x4d,0x61,0x74,0x72, + 0x69,0x78,0x20,0x2a,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x6d,0x6f,0x64,0x65,0x6c, + 0x4d,0x61,0x74,0x72,0x69,0x78,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20, + 0x3d,0x20,0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x2a,0x20,0x5f,0x31, + 0x39,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f, + 0x75,0x74,0x2e,0x75,0x76,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x65,0x78,0x63,0x6f, + 0x6f,0x72,0x64,0x30,0x20,0x2b,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x74,0x65,0x78, + 0x5f,0x70,0x61,0x6e,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74, + 0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x6e,0x6f,0x72, + 0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x74,0x61, + 0x6e,0x67,0x65,0x6e,0x74,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x61,0x6e,0x67,0x65, + 0x6e,0x74,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, + 0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; // // #include @@ -694,12 +782,12 @@ const vs_source_metal_macos = [747]u8 { // } // float4 _54 = c; // float3 _65 = (_54.xyz * (1.0 - _36.u_color_override.w)) + (_36.u_color_override.xyz * _36.u_color_override.w); -// float4 _80 = _54; -// _80.x = _65.x; -// _80.y = _65.y; -// _80.z = _65.z; -// c = _80; -// out.frag_color = _80; +// float4 _90 = _54; +// _90.x = _65.x; +// _90.y = _65.y; +// _90.z = _65.z; +// c = _90; +// out.frag_color = _90; // return out; // } // @@ -753,13 +841,13 @@ const fs_source_metal_macos = [899]u8 { 0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20, 0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72, 0x72,0x69,0x64,0x65,0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, - 0x61,0x74,0x34,0x20,0x5f,0x38,0x30,0x20,0x3d,0x20,0x5f,0x35,0x34,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x78, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x36, - 0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x7a,0x20,0x3d, + 0x61,0x74,0x34,0x20,0x5f,0x39,0x30,0x20,0x3d,0x20,0x5f,0x35,0x34,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x78, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x36, + 0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x7a,0x20,0x3d, 0x20,0x5f,0x36,0x35,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d,0x20, - 0x5f,0x38,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61, - 0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x38,0x30,0x3b,0x0a,0x20, + 0x5f,0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61, + 0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x20, 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d, 0x0a,0x0a,0x00, }; @@ -781,6 +869,8 @@ const fs_source_metal_macos = [899]u8 { // { // float4 color [[user(locn0)]]; // float2 uv [[user(locn1)]]; +// float3 normal [[user(locn2)]]; +// float4 tangent [[user(locn3)]]; // float4 gl_Position [[position]]; // }; // @@ -789,6 +879,8 @@ const fs_source_metal_macos = [899]u8 { // float4 pos [[attribute(0)]]; // float4 color0 [[attribute(1)]]; // float2 texcoord0 [[attribute(2)]]; +// float3 normals [[attribute(3)]]; +// float4 tangents [[attribute(4)]]; // }; // // vertex main0_out main0(main0_in in [[stage_in]], constant vs_params& _19 [[buffer(0)]]) @@ -797,11 +889,13 @@ const fs_source_metal_macos = [899]u8 { // out.gl_Position = (_19.u_projViewMatrix * _19.u_modelMatrix) * in.pos; // out.color = in.color0 * _19.u_color; // out.uv = in.texcoord0 + _19.u_tex_pan.xy; +// out.normal = in.normals; +// out.tangent = in.tangents; // return out; // } // // -const vs_source_metal_ios = [747]u8 { +const vs_source_metal_ios = [953]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, @@ -820,35 +914,48 @@ const vs_source_metal_ios = [747]u8 { 0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, 0x61,0x74,0x32,0x20,0x75,0x76,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,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,0x63, - 0x6f,0x6c,0x6f,0x72,0x30,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,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x5b,0x5b,0x61, - 0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x7d, - 0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f, - 0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f, - 0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e, - 0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76,0x73,0x5f, - 0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x39,0x20,0x5b,0x5b,0x62,0x75, - 0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20, - 0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d, - 0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f, - 0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x28,0x5f,0x31,0x39,0x2e, - 0x75,0x5f,0x70,0x72,0x6f,0x6a,0x56,0x69,0x65,0x77,0x4d,0x61,0x74,0x72,0x69,0x78, - 0x20,0x2a,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x6d,0x6f,0x64,0x65,0x6c,0x4d,0x61, - 0x74,0x72,0x69,0x78,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x3b,0x0a, - 0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20, - 0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x2a,0x20,0x5f,0x31,0x39,0x2e, - 0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74, - 0x2e,0x75,0x76,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72, - 0x64,0x30,0x20,0x2b,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x74,0x65,0x78,0x5f,0x70, - 0x61,0x6e,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, + 0x74,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72, + 0x28,0x6c,0x6f,0x63,0x6e,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66, + 0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x5b,0x5b, + 0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73, + 0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e, + 0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d, + 0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c, + 0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,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,0x63,0x6f,0x6c,0x6f,0x72,0x30,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,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f, + 0x72,0x64,0x30,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28, + 0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33, + 0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69, + 0x62,0x75,0x74,0x65,0x28,0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66, + 0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,0x20,0x5b, + 0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x34,0x29,0x5d,0x5d,0x3b, + 0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e, + 0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e, + 0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f, + 0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76, + 0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x39,0x20,0x5b,0x5b, + 0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20, + 0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74, + 0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67, + 0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x28,0x5f,0x31, + 0x39,0x2e,0x75,0x5f,0x70,0x72,0x6f,0x6a,0x56,0x69,0x65,0x77,0x4d,0x61,0x74,0x72, + 0x69,0x78,0x20,0x2a,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x6d,0x6f,0x64,0x65,0x6c, + 0x4d,0x61,0x74,0x72,0x69,0x78,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20, + 0x3d,0x20,0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x2a,0x20,0x5f,0x31, + 0x39,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f, + 0x75,0x74,0x2e,0x75,0x76,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x65,0x78,0x63,0x6f, + 0x6f,0x72,0x64,0x30,0x20,0x2b,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x74,0x65,0x78, + 0x5f,0x70,0x61,0x6e,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74, + 0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x6e,0x6f,0x72, + 0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x74,0x61, + 0x6e,0x67,0x65,0x6e,0x74,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x61,0x6e,0x67,0x65, + 0x6e,0x74,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, + 0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; // // #include @@ -884,12 +991,12 @@ const vs_source_metal_ios = [747]u8 { // } // float4 _54 = c; // float3 _65 = (_54.xyz * (1.0 - _36.u_color_override.w)) + (_36.u_color_override.xyz * _36.u_color_override.w); -// float4 _80 = _54; -// _80.x = _65.x; -// _80.y = _65.y; -// _80.z = _65.z; -// c = _80; -// out.frag_color = _80; +// float4 _90 = _54; +// _90.x = _65.x; +// _90.y = _65.y; +// _90.z = _65.z; +// c = _90; +// out.frag_color = _90; // return out; // } // @@ -943,13 +1050,13 @@ const fs_source_metal_ios = [899]u8 { 0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20, 0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72, 0x72,0x69,0x64,0x65,0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, - 0x61,0x74,0x34,0x20,0x5f,0x38,0x30,0x20,0x3d,0x20,0x5f,0x35,0x34,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x78, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x36, - 0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x7a,0x20,0x3d, + 0x61,0x74,0x34,0x20,0x5f,0x39,0x30,0x20,0x3d,0x20,0x5f,0x35,0x34,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x78, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x36, + 0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x7a,0x20,0x3d, 0x20,0x5f,0x36,0x35,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d,0x20, - 0x5f,0x38,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61, - 0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x38,0x30,0x3b,0x0a,0x20, + 0x5f,0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61, + 0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x20, 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d, 0x0a,0x0a,0x00, }; @@ -971,6 +1078,8 @@ const fs_source_metal_ios = [899]u8 { // { // float4 color [[user(locn0)]]; // float2 uv [[user(locn1)]]; +// float3 normal [[user(locn2)]]; +// float4 tangent [[user(locn3)]]; // float4 gl_Position [[position]]; // }; // @@ -979,6 +1088,8 @@ const fs_source_metal_ios = [899]u8 { // float4 pos [[attribute(0)]]; // float4 color0 [[attribute(1)]]; // float2 texcoord0 [[attribute(2)]]; +// float3 normals [[attribute(3)]]; +// float4 tangents [[attribute(4)]]; // }; // // vertex main0_out main0(main0_in in [[stage_in]], constant vs_params& _19 [[buffer(0)]]) @@ -987,11 +1098,13 @@ const fs_source_metal_ios = [899]u8 { // out.gl_Position = (_19.u_projViewMatrix * _19.u_modelMatrix) * in.pos; // out.color = in.color0 * _19.u_color; // out.uv = in.texcoord0 + _19.u_tex_pan.xy; +// out.normal = in.normals; +// out.tangent = in.tangents; // return out; // } // // -const vs_source_metal_sim = [747]u8 { +const vs_source_metal_sim = [953]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, @@ -1010,35 +1123,48 @@ const vs_source_metal_sim = [747]u8 { 0x6f,0x63,0x6e,0x30,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, 0x61,0x74,0x32,0x20,0x75,0x76,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,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,0x63, - 0x6f,0x6c,0x6f,0x72,0x30,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,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x5b,0x5b,0x61, - 0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x7d, - 0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f, - 0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f, - 0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e, - 0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76,0x73,0x5f, - 0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x39,0x20,0x5b,0x5b,0x62,0x75, - 0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20, - 0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d, - 0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67,0x6c,0x5f, - 0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x28,0x5f,0x31,0x39,0x2e, - 0x75,0x5f,0x70,0x72,0x6f,0x6a,0x56,0x69,0x65,0x77,0x4d,0x61,0x74,0x72,0x69,0x78, - 0x20,0x2a,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x6d,0x6f,0x64,0x65,0x6c,0x4d,0x61, - 0x74,0x72,0x69,0x78,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x3b,0x0a, - 0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20, - 0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x2a,0x20,0x5f,0x31,0x39,0x2e, - 0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74, - 0x2e,0x75,0x76,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72, - 0x64,0x30,0x20,0x2b,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x74,0x65,0x78,0x5f,0x70, - 0x61,0x6e,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, + 0x74,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x5b,0x5b,0x75,0x73,0x65,0x72, + 0x28,0x6c,0x6f,0x63,0x6e,0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66, + 0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x5b,0x5b, + 0x75,0x73,0x65,0x72,0x28,0x6c,0x6f,0x63,0x6e,0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73, + 0x69,0x74,0x69,0x6f,0x6e,0x20,0x5b,0x5b,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e, + 0x5d,0x5d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d, + 0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c, + 0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,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,0x63,0x6f,0x6c,0x6f,0x72,0x30,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,0x32,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f, + 0x72,0x64,0x30,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28, + 0x32,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33, + 0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x20,0x5b,0x5b,0x61,0x74,0x74,0x72,0x69, + 0x62,0x75,0x74,0x65,0x28,0x33,0x29,0x5d,0x5d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66, + 0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,0x20,0x5b, + 0x5b,0x61,0x74,0x74,0x72,0x69,0x62,0x75,0x74,0x65,0x28,0x34,0x29,0x5d,0x5d,0x3b, + 0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x65,0x72,0x74,0x65,0x78,0x20,0x6d,0x61,0x69,0x6e, + 0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e, + 0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f, + 0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x76, + 0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x26,0x20,0x5f,0x31,0x39,0x20,0x5b,0x5b, + 0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20, + 0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74, + 0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x67, + 0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x28,0x5f,0x31, + 0x39,0x2e,0x75,0x5f,0x70,0x72,0x6f,0x6a,0x56,0x69,0x65,0x77,0x4d,0x61,0x74,0x72, + 0x69,0x78,0x20,0x2a,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x6d,0x6f,0x64,0x65,0x6c, + 0x4d,0x61,0x74,0x72,0x69,0x78,0x29,0x20,0x2a,0x20,0x69,0x6e,0x2e,0x70,0x6f,0x73, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20, + 0x3d,0x20,0x69,0x6e,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x2a,0x20,0x5f,0x31, + 0x39,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f, + 0x75,0x74,0x2e,0x75,0x76,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x65,0x78,0x63,0x6f, + 0x6f,0x72,0x64,0x30,0x20,0x2b,0x20,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x74,0x65,0x78, + 0x5f,0x70,0x61,0x6e,0x2e,0x78,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74, + 0x2e,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x6e,0x6f,0x72, + 0x6d,0x61,0x6c,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x74,0x61, + 0x6e,0x67,0x65,0x6e,0x74,0x20,0x3d,0x20,0x69,0x6e,0x2e,0x74,0x61,0x6e,0x67,0x65, + 0x6e,0x74,0x73,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, + 0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; // // #include @@ -1074,12 +1200,12 @@ const vs_source_metal_sim = [747]u8 { // } // float4 _54 = c; // float3 _65 = (_54.xyz * (1.0 - _36.u_color_override.w)) + (_36.u_color_override.xyz * _36.u_color_override.w); -// float4 _80 = _54; -// _80.x = _65.x; -// _80.y = _65.y; -// _80.z = _65.z; -// c = _80; -// out.frag_color = _80; +// float4 _90 = _54; +// _90.x = _65.x; +// _90.y = _65.y; +// _90.z = _65.z; +// c = _90; +// out.frag_color = _90; // return out; // } // @@ -1133,13 +1259,13 @@ const fs_source_metal_sim = [899]u8 { 0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20, 0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72, 0x72,0x69,0x64,0x65,0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, - 0x61,0x74,0x34,0x20,0x5f,0x38,0x30,0x20,0x3d,0x20,0x5f,0x35,0x34,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x78, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x36, - 0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x38,0x30,0x2e,0x7a,0x20,0x3d, + 0x61,0x74,0x34,0x20,0x5f,0x39,0x30,0x20,0x3d,0x20,0x5f,0x35,0x34,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x36,0x35,0x2e,0x78, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x36, + 0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x39,0x30,0x2e,0x7a,0x20,0x3d, 0x20,0x5f,0x36,0x35,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d,0x20, - 0x5f,0x38,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61, - 0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x38,0x30,0x3b,0x0a,0x20, + 0x5f,0x39,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61, + 0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x39,0x30,0x3b,0x0a,0x20, 0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d, 0x0a,0x0a,0x00, }; @@ -1169,8 +1295,12 @@ const fs_source_metal_sim = [899]u8 { // // var texcoord0 : vec2f; // +// var normal : vec3f; +// // var normals : vec3f; // +// var tangent : vec4f; +// // var tangents : vec4f; // // var gl_Position : vec4f; @@ -1186,6 +1316,10 @@ const fs_source_metal_sim = [899]u8 { // let x_46 : vec2f = texcoord0; // let x_49 : vec4f = x_19.u_tex_pan; // uv = (x_46 + vec2f(x_49.x, x_49.y)); +// let x_57 : vec3f = normals; +// normal = x_57; +// let x_60 : vec4f = tangents; +// tangent = x_60; // return; // } // @@ -1196,6 +1330,10 @@ const fs_source_metal_sim = [899]u8 { // color_1 : vec4f, // @location(1) // uv_1 : vec2f, +// @location(2) +// normal_1 : vec3f, +// @location(3) +// tangent_1 : vec4f, // } // // @vertex @@ -1206,11 +1344,11 @@ const fs_source_metal_sim = [899]u8 { // normals = normals_param; // tangents = tangents_param; // main_1(); -// return main_out(gl_Position, color, uv); +// return main_out(gl_Position, color, uv, normal, tangent); // } // // -const vs_source_wgsl = [1445]u8 { +const vs_source_wgsl = [1690]u8 { 0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20, 0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f, 0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20, @@ -1239,69 +1377,84 @@ const vs_source_wgsl = [1445]u8 { 0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61, 0x74,0x65,0x3e,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x3a,0x20, 0x76,0x65,0x63,0x32,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76, - 0x61,0x74,0x65,0x3e,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x20,0x3a,0x20,0x76, - 0x65,0x63,0x33,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61, - 0x74,0x65,0x3e,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,0x20,0x3a,0x20,0x76, - 0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61, - 0x74,0x65,0x3e,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20, - 0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69, - 0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f, - 0x32,0x32,0x20,0x3a,0x20,0x6d,0x61,0x74,0x34,0x78,0x34,0x66,0x20,0x3d,0x20,0x78, - 0x5f,0x31,0x39,0x2e,0x75,0x5f,0x70,0x72,0x6f,0x6a,0x56,0x69,0x65,0x77,0x4d,0x61, - 0x74,0x72,0x69,0x78,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x35, - 0x20,0x3a,0x20,0x6d,0x61,0x74,0x34,0x78,0x34,0x66,0x20,0x3d,0x20,0x78,0x5f,0x31, - 0x39,0x2e,0x75,0x5f,0x6d,0x6f,0x64,0x65,0x6c,0x4d,0x61,0x74,0x72,0x69,0x78,0x3b, - 0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x39,0x20,0x3a,0x20,0x76,0x65, - 0x63,0x34,0x66,0x20,0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x67,0x6c,0x5f, - 0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x28,0x28,0x78,0x5f,0x32, - 0x32,0x20,0x2a,0x20,0x78,0x5f,0x32,0x35,0x29,0x20,0x2a,0x20,0x78,0x5f,0x32,0x39, - 0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x35,0x20,0x3a,0x20, - 0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a, - 0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x39,0x20,0x3a,0x20,0x76,0x65,0x63, - 0x34,0x66,0x20,0x3d,0x20,0x78,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f, - 0x72,0x3b,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x28,0x78,0x5f, - 0x33,0x35,0x20,0x2a,0x20,0x78,0x5f,0x33,0x39,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65, - 0x74,0x20,0x78,0x5f,0x34,0x36,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d, - 0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x20,0x20,0x6c,0x65, - 0x74,0x20,0x78,0x5f,0x34,0x39,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d, - 0x20,0x78,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x74,0x65,0x78,0x5f,0x70,0x61,0x6e,0x3b, - 0x0a,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x28,0x78,0x5f,0x34,0x36,0x20,0x2b,0x20, - 0x76,0x65,0x63,0x32,0x66,0x28,0x78,0x5f,0x34,0x39,0x2e,0x78,0x2c,0x20,0x78,0x5f, - 0x34,0x39,0x2e,0x79,0x29,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e, - 0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e, - 0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x62,0x75,0x69,0x6c,0x74,0x69, - 0x6e,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x0a,0x20,0x20,0x67,0x6c, - 0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34, - 0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30, - 0x29,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65, - 0x63,0x34,0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e, - 0x28,0x31,0x29,0x0a,0x20,0x20,0x75,0x76,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63, - 0x32,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x76,0x65,0x72,0x74,0x65,0x78,0x0a,0x66, - 0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e, - 0x28,0x30,0x29,0x20,0x70,0x6f,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20, - 0x76,0x65,0x63,0x34,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e, - 0x28,0x31,0x29,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x5f,0x70,0x61,0x72,0x61,0x6d, - 0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74, - 0x69,0x6f,0x6e,0x28,0x32,0x29,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30, - 0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x20, - 0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x33,0x29,0x20,0x6e,0x6f,0x72, - 0x6d,0x61,0x6c,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63, - 0x33,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x34,0x29, - 0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20, - 0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e, - 0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x70,0x6f,0x73,0x20,0x3d,0x20,0x70, - 0x6f,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f, - 0x72,0x30,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x5f,0x70,0x61,0x72,0x61, - 0x6d,0x3b,0x0a,0x20,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x20,0x3d, - 0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x5f,0x70,0x61,0x72,0x61,0x6d, - 0x3b,0x0a,0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x20,0x3d,0x20,0x6e,0x6f, - 0x72,0x6d,0x61,0x6c,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x74, - 0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,0x20,0x3d,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e, - 0x74,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,0x6e, - 0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d, - 0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74, - 0x69,0x6f,0x6e,0x2c,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20,0x75,0x76,0x29,0x3b, - 0x0a,0x7d,0x0a,0x0a,0x00, + 0x61,0x74,0x65,0x3e,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3a,0x20,0x76,0x65, + 0x63,0x33,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74, + 0x65,0x3e,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x20,0x3a,0x20,0x76,0x65,0x63, + 0x33,0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65, + 0x3e,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x3a,0x20,0x76,0x65,0x63,0x34, + 0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e, + 0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,0x20,0x3a,0x20,0x76,0x65,0x63,0x34, + 0x66,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e, + 0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76, + 0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31, + 0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x32,0x20, + 0x3a,0x20,0x6d,0x61,0x74,0x34,0x78,0x34,0x66,0x20,0x3d,0x20,0x78,0x5f,0x31,0x39, + 0x2e,0x75,0x5f,0x70,0x72,0x6f,0x6a,0x56,0x69,0x65,0x77,0x4d,0x61,0x74,0x72,0x69, + 0x78,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x35,0x20,0x3a,0x20, + 0x6d,0x61,0x74,0x34,0x78,0x34,0x66,0x20,0x3d,0x20,0x78,0x5f,0x31,0x39,0x2e,0x75, + 0x5f,0x6d,0x6f,0x64,0x65,0x6c,0x4d,0x61,0x74,0x72,0x69,0x78,0x3b,0x0a,0x20,0x20, + 0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x39,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66, + 0x20,0x3d,0x20,0x70,0x6f,0x73,0x3b,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73, + 0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x28,0x28,0x78,0x5f,0x32,0x32,0x20,0x2a, + 0x20,0x78,0x5f,0x32,0x35,0x29,0x20,0x2a,0x20,0x78,0x5f,0x32,0x39,0x29,0x3b,0x0a, + 0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x35,0x20,0x3a,0x20,0x76,0x65,0x63, + 0x34,0x66,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x3b,0x0a,0x20,0x20,0x6c, + 0x65,0x74,0x20,0x78,0x5f,0x33,0x39,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20, + 0x3d,0x20,0x78,0x5f,0x31,0x39,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a, + 0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x28,0x78,0x5f,0x33,0x35,0x20, + 0x2a,0x20,0x78,0x5f,0x33,0x39,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78, + 0x5f,0x34,0x36,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x74,0x65, + 0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78, + 0x5f,0x34,0x39,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x78,0x5f, + 0x31,0x39,0x2e,0x75,0x5f,0x74,0x65,0x78,0x5f,0x70,0x61,0x6e,0x3b,0x0a,0x20,0x20, + 0x75,0x76,0x20,0x3d,0x20,0x28,0x78,0x5f,0x34,0x36,0x20,0x2b,0x20,0x76,0x65,0x63, + 0x32,0x66,0x28,0x78,0x5f,0x34,0x39,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x34,0x39,0x2e, + 0x79,0x29,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x37,0x20, + 0x3a,0x20,0x76,0x65,0x63,0x33,0x66,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c, + 0x73,0x3b,0x0a,0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x78,0x5f, + 0x35,0x37,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x36,0x30,0x20,0x3a, + 0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74, + 0x73,0x3b,0x0a,0x20,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x3d,0x20,0x78, + 0x5f,0x36,0x30,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d, + 0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75, + 0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x62,0x75,0x69,0x6c,0x74,0x69,0x6e,0x28,0x70, + 0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x0a,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f, + 0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a, + 0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20, + 0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66, + 0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29, + 0x0a,0x20,0x20,0x75,0x76,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c, + 0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x32,0x29,0x0a, + 0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63, + 0x33,0x66,0x2c,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28, + 0x33,0x29,0x0a,0x20,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x5f,0x31,0x20,0x3a, + 0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x76,0x65,0x72,0x74, + 0x65,0x78,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61, + 0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x70,0x6f,0x73,0x5f,0x70,0x61,0x72,0x61, + 0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61, + 0x74,0x69,0x6f,0x6e,0x28,0x31,0x29,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x5f,0x70, + 0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x20,0x40,0x6c, + 0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x32,0x29,0x20,0x74,0x65,0x78,0x63,0x6f, + 0x6f,0x72,0x64,0x30,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63, + 0x32,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x33,0x29, + 0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a, + 0x20,0x76,0x65,0x63,0x33,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f, + 0x6e,0x28,0x34,0x29,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,0x5f,0x70,0x61, + 0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x29,0x20,0x2d,0x3e,0x20, + 0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x70,0x6f,0x73, + 0x20,0x3d,0x20,0x70,0x6f,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20, + 0x63,0x6f,0x6c,0x6f,0x72,0x30,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x30,0x5f, + 0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72, + 0x64,0x30,0x20,0x3d,0x20,0x74,0x65,0x78,0x63,0x6f,0x6f,0x72,0x64,0x30,0x5f,0x70, + 0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x20, + 0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b, + 0x0a,0x20,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x73,0x20,0x3d,0x20,0x74,0x61, + 0x6e,0x67,0x65,0x6e,0x74,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20, + 0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75, + 0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x67,0x6c,0x5f,0x50, + 0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2c,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x2c,0x20, + 0x75,0x76,0x2c,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2c,0x20,0x74,0x61,0x6e,0x67, + 0x65,0x6e,0x74,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; // // diagnostic(off, derivative_uniformity); @@ -1323,11 +1476,17 @@ const vs_source_wgsl = [1445]u8 { // // @group(0) @binding(4) var x_36 : fs_params; // +// var normal : vec3f; +// +// var tangent : vec4f; +// // var frag_color : vec4f; // // fn main_1() { // var c : vec4f; // var override_mod : f32; +// var test : f32; +// var test2 : f32; // let x_23 : vec2f = uv; // let x_24 : vec4f = textureSample(tex, smp, x_23); // let x_27 : vec4f = color; @@ -1347,8 +1506,12 @@ const vs_source_wgsl = [1445]u8 { // c.x = x_65.x; // c.y = x_65.y; // c.z = x_65.z; -// let x_77 : vec4f = c; -// frag_color = x_77; +// let x_80 : f32 = normal.x; +// test = x_80; +// let x_84 : f32 = tangent.x; +// test2 = x_84; +// let x_87 : vec4f = c; +// frag_color = x_87; // return; // } // @@ -1358,15 +1521,17 @@ const vs_source_wgsl = [1445]u8 { // } // // @fragment -// fn main(@location(1) uv_param : vec2f, @location(0) color_param : vec4f) -> main_out { +// fn main(@location(1) uv_param : vec2f, @location(0) color_param : vec4f, @location(2) normal_param : vec3f, @location(3) tangent_param : vec4f) -> main_out { // uv = uv_param; // color = color_param; +// normal = normal_param; +// tangent = tangent_param; // main_1(); // return main_out(frag_color); // } // // -const fs_source_wgsl = [1354]u8 { +const fs_source_wgsl = [1665]u8 { 0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20, 0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f, 0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20, @@ -1390,68 +1555,88 @@ const fs_source_wgsl = [1354]u8 { 0x67,0x28,0x34,0x29,0x20,0x76,0x61,0x72,0x3c,0x75,0x6e,0x69,0x66,0x6f,0x72,0x6d, 0x3e,0x20,0x78,0x5f,0x33,0x36,0x20,0x3a,0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61, 0x6d,0x73,0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65, - 0x3e,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x76, - 0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31, - 0x28,0x29,0x20,0x7b,0x0a,0x20,0x20,0x76,0x61,0x72,0x20,0x63,0x20,0x3a,0x20,0x76, - 0x65,0x63,0x34,0x66,0x3b,0x0a,0x20,0x20,0x76,0x61,0x72,0x20,0x6f,0x76,0x65,0x72, - 0x72,0x69,0x64,0x65,0x5f,0x6d,0x6f,0x64,0x20,0x3a,0x20,0x66,0x33,0x32,0x3b,0x0a, - 0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x33,0x20,0x3a,0x20,0x76,0x65,0x63, - 0x32,0x66,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78, - 0x5f,0x32,0x34,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x74,0x65, - 0x78,0x74,0x75,0x72,0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x74,0x65,0x78,0x2c, - 0x20,0x73,0x6d,0x70,0x2c,0x20,0x78,0x5f,0x32,0x33,0x29,0x3b,0x0a,0x20,0x20,0x6c, - 0x65,0x74,0x20,0x78,0x5f,0x32,0x37,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20, - 0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x63,0x20,0x3d,0x20,0x28, - 0x78,0x5f,0x32,0x34,0x20,0x2a,0x20,0x78,0x5f,0x32,0x37,0x29,0x3b,0x0a,0x20,0x20, - 0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x33,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d, - 0x20,0x63,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x34,0x31, - 0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,0x36,0x2e,0x75,0x5f, - 0x61,0x6c,0x70,0x68,0x61,0x5f,0x63,0x75,0x74,0x6f,0x66,0x66,0x3b,0x0a,0x20,0x20, - 0x69,0x66,0x20,0x28,0x28,0x78,0x5f,0x33,0x33,0x20,0x3c,0x3d,0x20,0x78,0x5f,0x34, - 0x31,0x29,0x29,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72, - 0x64,0x3b,0x0a,0x20,0x20,0x7d,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35, - 0x31,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,0x36,0x2e,0x75, - 0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e, - 0x77,0x3b,0x0a,0x20,0x20,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x5f,0x6d,0x6f, - 0x64,0x20,0x3d,0x20,0x28,0x31,0x2e,0x30,0x66,0x20,0x2d,0x20,0x78,0x5f,0x35,0x31, - 0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x34,0x20,0x3a,0x20, - 0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74, - 0x20,0x78,0x5f,0x35,0x36,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x6f,0x76, - 0x65,0x72,0x72,0x69,0x64,0x65,0x5f,0x6d,0x6f,0x64,0x3b,0x0a,0x20,0x20,0x6c,0x65, - 0x74,0x20,0x78,0x5f,0x36,0x30,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d, - 0x20,0x78,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76, - 0x65,0x72,0x72,0x69,0x64,0x65,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f, - 0x36,0x33,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,0x36,0x2e, - 0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65, - 0x2e,0x77,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x36,0x35,0x20,0x3a, - 0x20,0x76,0x65,0x63,0x33,0x66,0x20,0x3d,0x20,0x28,0x28,0x76,0x65,0x63,0x33,0x66, - 0x28,0x78,0x5f,0x35,0x34,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x35,0x34,0x2e,0x79,0x2c, - 0x20,0x78,0x5f,0x35,0x34,0x2e,0x7a,0x29,0x20,0x2a,0x20,0x78,0x5f,0x35,0x36,0x29, - 0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x36,0x30,0x2e,0x78, - 0x2c,0x20,0x78,0x5f,0x36,0x30,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x36,0x30,0x2e,0x7a, - 0x29,0x20,0x2a,0x20,0x78,0x5f,0x36,0x33,0x29,0x29,0x3b,0x0a,0x20,0x20,0x63,0x2e, - 0x78,0x20,0x3d,0x20,0x78,0x5f,0x36,0x35,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x63,0x2e, - 0x79,0x20,0x3d,0x20,0x78,0x5f,0x36,0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x63,0x2e, - 0x7a,0x20,0x3d,0x20,0x78,0x5f,0x36,0x35,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x6c,0x65, - 0x74,0x20,0x78,0x5f,0x37,0x37,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d, - 0x20,0x63,0x3b,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72, - 0x20,0x3d,0x20,0x78,0x5f,0x37,0x37,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72, - 0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69, - 0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74, - 0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f, - 0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d, - 0x0a,0x0a,0x40,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x66,0x6e,0x20,0x6d, - 0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29, - 0x20,0x75,0x76,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32, - 0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20, - 0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65, - 0x63,0x34,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74, - 0x20,0x7b,0x0a,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x5f,0x70,0x61,0x72, - 0x61,0x6d,0x3b,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f, - 0x6c,0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69, - 0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20, - 0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f, - 0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, + 0x3e,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66, + 0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20, + 0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b, + 0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x66, + 0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x76,0x65,0x63,0x34, + 0x66,0x3b,0x0a,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20, + 0x7b,0x0a,0x20,0x20,0x76,0x61,0x72,0x20,0x63,0x20,0x3a,0x20,0x76,0x65,0x63,0x34, + 0x66,0x3b,0x0a,0x20,0x20,0x76,0x61,0x72,0x20,0x6f,0x76,0x65,0x72,0x72,0x69,0x64, + 0x65,0x5f,0x6d,0x6f,0x64,0x20,0x3a,0x20,0x66,0x33,0x32,0x3b,0x0a,0x20,0x20,0x76, + 0x61,0x72,0x20,0x74,0x65,0x73,0x74,0x20,0x3a,0x20,0x66,0x33,0x32,0x3b,0x0a,0x20, + 0x20,0x76,0x61,0x72,0x20,0x74,0x65,0x73,0x74,0x32,0x20,0x3a,0x20,0x66,0x33,0x32, + 0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x33,0x20,0x3a,0x20,0x76, + 0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74, + 0x20,0x78,0x5f,0x32,0x34,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20, + 0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x74,0x65, + 0x78,0x2c,0x20,0x73,0x6d,0x70,0x2c,0x20,0x78,0x5f,0x32,0x33,0x29,0x3b,0x0a,0x20, + 0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x37,0x20,0x3a,0x20,0x76,0x65,0x63,0x34, + 0x66,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x63,0x20,0x3d, + 0x20,0x28,0x78,0x5f,0x32,0x34,0x20,0x2a,0x20,0x78,0x5f,0x32,0x37,0x29,0x3b,0x0a, + 0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x33,0x20,0x3a,0x20,0x66,0x33,0x32, + 0x20,0x3d,0x20,0x63,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f, + 0x34,0x31,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,0x36,0x2e, + 0x75,0x5f,0x61,0x6c,0x70,0x68,0x61,0x5f,0x63,0x75,0x74,0x6f,0x66,0x66,0x3b,0x0a, + 0x20,0x20,0x69,0x66,0x20,0x28,0x28,0x78,0x5f,0x33,0x33,0x20,0x3c,0x3d,0x20,0x78, + 0x5f,0x34,0x31,0x29,0x29,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63, + 0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x7d,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78, + 0x5f,0x35,0x31,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,0x36, + 0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64, + 0x65,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x5f, + 0x6d,0x6f,0x64,0x20,0x3d,0x20,0x28,0x31,0x2e,0x30,0x66,0x20,0x2d,0x20,0x78,0x5f, + 0x35,0x31,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x34,0x20, + 0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20,0x6c, + 0x65,0x74,0x20,0x78,0x5f,0x35,0x36,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20, + 0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x5f,0x6d,0x6f,0x64,0x3b,0x0a,0x20,0x20, + 0x6c,0x65,0x74,0x20,0x78,0x5f,0x36,0x30,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66, + 0x20,0x3d,0x20,0x78,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f, + 0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20, + 0x78,0x5f,0x36,0x33,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33, + 0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69, + 0x64,0x65,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x36,0x35, + 0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,0x20,0x3d,0x20,0x28,0x28,0x76,0x65,0x63, + 0x33,0x66,0x28,0x78,0x5f,0x35,0x34,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x35,0x34,0x2e, + 0x79,0x2c,0x20,0x78,0x5f,0x35,0x34,0x2e,0x7a,0x29,0x20,0x2a,0x20,0x78,0x5f,0x35, + 0x36,0x29,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x36,0x30, + 0x2e,0x78,0x2c,0x20,0x78,0x5f,0x36,0x30,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x36,0x30, + 0x2e,0x7a,0x29,0x20,0x2a,0x20,0x78,0x5f,0x36,0x33,0x29,0x29,0x3b,0x0a,0x20,0x20, + 0x63,0x2e,0x78,0x20,0x3d,0x20,0x78,0x5f,0x36,0x35,0x2e,0x78,0x3b,0x0a,0x20,0x20, + 0x63,0x2e,0x79,0x20,0x3d,0x20,0x78,0x5f,0x36,0x35,0x2e,0x79,0x3b,0x0a,0x20,0x20, + 0x63,0x2e,0x7a,0x20,0x3d,0x20,0x78,0x5f,0x36,0x35,0x2e,0x7a,0x3b,0x0a,0x20,0x20, + 0x6c,0x65,0x74,0x20,0x78,0x5f,0x38,0x30,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d, + 0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x74,0x65,0x73, + 0x74,0x20,0x3d,0x20,0x78,0x5f,0x38,0x30,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20, + 0x78,0x5f,0x38,0x34,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x74,0x61,0x6e, + 0x67,0x65,0x6e,0x74,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x74,0x65,0x73,0x74,0x32,0x20, + 0x3d,0x20,0x78,0x5f,0x38,0x34,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f, + 0x38,0x37,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x63,0x3b,0x0a, + 0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x78, + 0x5f,0x38,0x37,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d, + 0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75, + 0x74,0x20,0x7b,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28, + 0x30,0x29,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f, + 0x31,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x66, + 0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28, + 0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29,0x20,0x75,0x76,0x5f, + 0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x20,0x40, + 0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x63,0x6f,0x6c,0x6f, + 0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c, + 0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x32,0x29,0x20,0x6e,0x6f, + 0x72,0x6d,0x61,0x6c,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63, + 0x33,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x33,0x29, + 0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a, + 0x20,0x76,0x65,0x63,0x34,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f, + 0x6f,0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x5f, + 0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d, + 0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20, + 0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f, + 0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74, + 0x20,0x3d,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d, + 0x3b,0x0a,0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20, + 0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28, + 0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x7d,0x0a,0x0a, + 0x00, }; pub fn defaultShaderDesc(backend: sg.Backend) sg.ShaderDesc { var desc: sg.ShaderDesc = .{}; diff --git a/src/framework/graphics/shaders/emissive.glsl.zig b/src/framework/graphics/shaders/emissive.glsl.zig index bbf393f9..552e26cd 100644 --- a/src/framework/graphics/shaders/emissive.glsl.zig +++ b/src/framework/graphics/shaders/emissive.glsl.zig @@ -145,9 +145,9 @@ const vs_source_glsl430 = [667]u8 { // // layout(location = 1) in vec2 uv; // layout(location = 0) in vec4 color; -// layout(location = 0) out vec4 frag_color; // layout(location = 2) in vec3 normal; // layout(location = 3) in vec4 tangent; +// layout(location = 0) out vec4 frag_color; // // void main() // { @@ -160,17 +160,17 @@ const vs_source_glsl430 = [667]u8 { // vec4 _53 = texture(tex_emissive_smp, uv); // vec4 _69 = c; // vec3 _76 = (_69.xyz * (1.0 - min((_53.x + _53.y) + _53.z, 1.0))) + _53.xyz; -// vec4 _117 = _69; -// _117.x = _76.x; -// _117.y = _76.y; -// _117.z = _76.z; -// vec3 _99 = (_117.xyz * (1.0 - fs_params[0].w)) + (fs_params[0].xyz * fs_params[0].w); -// vec4 _123 = _117; -// _123.x = _99.x; -// _123.y = _99.y; -// _123.z = _99.z; -// c = _123; -// frag_color = _123; +// vec4 _124 = _69; +// _124.x = _76.x; +// _124.y = _76.y; +// _124.z = _76.z; +// vec3 _99 = (_124.xyz * (1.0 - fs_params[0].w)) + (fs_params[0].xyz * fs_params[0].w); +// vec4 _130 = _124; +// _130.x = _99.x; +// _130.y = _99.y; +// _130.z = _99.z; +// c = _130; +// frag_color = _130; // } // // @@ -189,13 +189,13 @@ const fs_source_glsl430 = [909]u8 { 0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f, 0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x34,0x20,0x63, 0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63, - 0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76, - 0x65,0x63,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a, - 0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20, - 0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65,0x63,0x33,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,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64, + 0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x32,0x29,0x20,0x69,0x6e,0x20,0x76,0x65, + 0x63,0x33,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,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,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,0x76,0x65, 0x63,0x34,0x20,0x5f,0x32,0x38,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65, 0x28,0x74,0x65,0x78,0x5f,0x73,0x6d,0x70,0x2c,0x20,0x75,0x76,0x29,0x20,0x2a,0x20, @@ -214,24 +214,24 @@ const fs_source_glsl430 = [909]u8 { 0x2e,0x78,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e,0x79,0x29,0x20,0x2b,0x20,0x5f,0x35, 0x33,0x2e,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x29,0x20,0x2b,0x20,0x5f,0x35, 0x33,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20, - 0x5f,0x31,0x31,0x37,0x20,0x3d,0x20,0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20, - 0x5f,0x31,0x31,0x37,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78,0x3b,0x0a, - 0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x37,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x37,0x36, - 0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x37,0x2e,0x7a,0x20,0x3d, + 0x5f,0x31,0x32,0x34,0x20,0x3d,0x20,0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20, + 0x5f,0x31,0x32,0x34,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78,0x3b,0x0a, + 0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x34,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x37,0x36, + 0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x34,0x2e,0x7a,0x20,0x3d, 0x20,0x5f,0x37,0x36,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33, - 0x20,0x5f,0x39,0x39,0x20,0x3d,0x20,0x28,0x5f,0x31,0x31,0x37,0x2e,0x78,0x79,0x7a, + 0x20,0x5f,0x39,0x39,0x20,0x3d,0x20,0x28,0x5f,0x31,0x32,0x34,0x2e,0x78,0x79,0x7a, 0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x66,0x73,0x5f,0x70,0x61,0x72, 0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x29,0x29,0x20,0x2b,0x20,0x28,0x66,0x73, 0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a, 0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x29, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x32,0x33,0x20, - 0x3d,0x20,0x5f,0x31,0x31,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x33, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x33,0x30,0x20, + 0x3d,0x20,0x5f,0x31,0x32,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x30, 0x2e,0x78,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20, - 0x5f,0x31,0x32,0x33,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x79,0x3b,0x0a, - 0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x33,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x39,0x39, - 0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d,0x20,0x5f,0x31,0x32,0x33, + 0x5f,0x31,0x33,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x79,0x3b,0x0a, + 0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x30,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x39,0x39, + 0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d,0x20,0x5f,0x31,0x33,0x30, 0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72, - 0x20,0x3d,0x20,0x5f,0x31,0x32,0x33,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, + 0x20,0x3d,0x20,0x5f,0x31,0x33,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; // // #version 300 es @@ -307,9 +307,9 @@ const vs_source_glsl300es = [586]u8 { // // in highp vec2 uv; // in highp vec4 color; -// layout(location = 0) out highp vec4 frag_color; // in highp vec3 normal; // in highp vec4 tangent; +// layout(location = 0) out highp vec4 frag_color; // // void main() // { @@ -322,17 +322,17 @@ const vs_source_glsl300es = [586]u8 { // highp vec4 _53 = texture(tex_emissive_smp, uv); // highp vec4 _69 = c; // highp vec3 _76 = (_69.xyz * (1.0 - min((_53.x + _53.y) + _53.z, 1.0))) + _53.xyz; -// highp vec4 _117 = _69; -// _117.x = _76.x; -// _117.y = _76.y; -// _117.z = _76.z; -// highp vec3 _99 = (_117.xyz * (1.0 - fs_params[0].w)) + (fs_params[0].xyz * fs_params[0].w); -// highp vec4 _123 = _117; -// _123.x = _99.x; -// _123.y = _99.y; -// _123.z = _99.z; -// c = _123; -// frag_color = _123; +// highp vec4 _124 = _69; +// _124.x = _76.x; +// _124.y = _76.y; +// _124.z = _76.z; +// highp vec3 _99 = (_124.xyz * (1.0 - fs_params[0].w)) + (fs_params[0].xyz * fs_params[0].w); +// highp vec4 _130 = _124; +// _130.x = _99.x; +// _130.y = _99.y; +// _130.z = _99.z; +// c = _130; +// frag_color = _130; // } // // @@ -350,12 +350,12 @@ const fs_source_glsl300es = [930]u8 { 0x73,0x73,0x69,0x76,0x65,0x5f,0x73,0x6d,0x70,0x3b,0x0a,0x0a,0x69,0x6e,0x20,0x68, 0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x69,0x6e, 0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x63,0x6f,0x6c,0x6f, - 0x72,0x3b,0x0a,0x6c,0x61,0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69, - 0x6f,0x6e,0x20,0x3d,0x20,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,0x69,0x6e,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33, 0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x69,0x6e,0x20,0x68,0x69,0x67,0x68, 0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,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,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x32, 0x38,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x28,0x74,0x65,0x78,0x5f, @@ -376,25 +376,25 @@ const fs_source_glsl300es = [930]u8 { 0x5f,0x35,0x33,0x2e,0x78,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e,0x79,0x29,0x20,0x2b, 0x20,0x5f,0x35,0x33,0x2e,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x29,0x20,0x2b, 0x20,0x5f,0x35,0x33,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69, - 0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x31,0x37,0x20,0x3d,0x20, - 0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x37,0x2e,0x78,0x20, - 0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x31, - 0x37,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x5f,0x31,0x31,0x37,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x7a,0x3b, + 0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20,0x5f,0x31,0x32,0x34,0x20,0x3d,0x20, + 0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x34,0x2e,0x78,0x20, + 0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32, + 0x34,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x5f,0x31,0x32,0x34,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x7a,0x3b, 0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20, - 0x5f,0x39,0x39,0x20,0x3d,0x20,0x28,0x5f,0x31,0x31,0x37,0x2e,0x78,0x79,0x7a,0x20, + 0x5f,0x39,0x39,0x20,0x3d,0x20,0x28,0x5f,0x31,0x32,0x34,0x2e,0x78,0x79,0x7a,0x20, 0x2a,0x20,0x28,0x31,0x2e,0x30,0x20,0x2d,0x20,0x66,0x73,0x5f,0x70,0x61,0x72,0x61, 0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x29,0x29,0x20,0x2b,0x20,0x28,0x66,0x73,0x5f, 0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20, 0x66,0x73,0x5f,0x70,0x61,0x72,0x61,0x6d,0x73,0x5b,0x30,0x5d,0x2e,0x77,0x29,0x3b, 0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x34,0x20, - 0x5f,0x31,0x32,0x33,0x20,0x3d,0x20,0x5f,0x31,0x31,0x37,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x5f,0x31,0x32,0x33,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x78,0x3b, - 0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x33,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39, - 0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x33,0x2e,0x7a,0x20, + 0x5f,0x31,0x33,0x30,0x20,0x3d,0x20,0x5f,0x31,0x32,0x34,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x5f,0x31,0x33,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x78,0x3b, + 0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39, + 0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x30,0x2e,0x7a,0x20, 0x3d,0x20,0x5f,0x39,0x39,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d, - 0x20,0x5f,0x31,0x32,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f, - 0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x32,0x33,0x3b,0x0a,0x7d,0x0a, + 0x20,0x5f,0x31,0x33,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f, + 0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x33,0x30,0x3b,0x0a,0x7d,0x0a, 0x0a,0x00, }; // @@ -574,9 +574,9 @@ const vs_source_hlsl4 = [1546]u8 { // // static float2 uv; // static float4 color; -// static float4 frag_color; // static float3 normal; // static float4 tangent; +// static float4 frag_color; // // struct SPIRV_Cross_Input // { @@ -602,17 +602,17 @@ const vs_source_hlsl4 = [1546]u8 { // float4 _53 = tex_emissive.Sample(smp, uv); // float4 _69 = c; // float3 _76 = (_69.xyz * (1.0f - min((_53.x + _53.y) + _53.z, 1.0f))) + _53.xyz; -// float4 _117 = _69; -// _117.x = _76.x; -// _117.y = _76.y; -// _117.z = _76.z; -// float3 _99 = (_117.xyz * (1.0f - _36_u_color_override.w)) + (_36_u_color_override.xyz * _36_u_color_override.w); -// float4 _123 = _117; -// _123.x = _99.x; -// _123.y = _99.y; -// _123.z = _99.z; -// c = _123; -// frag_color = _123; +// float4 _124 = _69; +// _124.x = _76.x; +// _124.y = _76.y; +// _124.z = _76.z; +// float3 _99 = (_124.xyz * (1.0f - _36_u_color_override.w)) + (_36_u_color_override.xyz * _36_u_color_override.w); +// float4 _130 = _124; +// _130.x = _99.x; +// _130.y = _99.y; +// _130.z = _99.z; +// c = _130; +// frag_color = _130; // } // // SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) @@ -647,10 +647,10 @@ const fs_source_hlsl4 = [1516]u8 { 0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x20,0x75,0x76,0x3b, 0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63, 0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f, - 0x61,0x74,0x34,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a, - 0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x6e,0x6f, - 0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f, - 0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x3b,0x0a,0x0a,0x73,0x74, + 0x61,0x74,0x33,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3b,0x0a,0x73,0x74,0x61,0x74, + 0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e, + 0x74,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34, + 0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x0a,0x73,0x74, 0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73, 0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f, 0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x54,0x45,0x58,0x43, @@ -684,26 +684,26 @@ const fs_source_hlsl4 = [1516]u8 { 0x78,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e,0x79,0x29,0x20,0x2b,0x20,0x5f,0x35,0x33, 0x2e,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x29,0x29,0x20,0x2b,0x20,0x5f,0x35, 0x33,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74, - 0x34,0x20,0x5f,0x31,0x31,0x37,0x20,0x3d,0x20,0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20, - 0x20,0x20,0x5f,0x31,0x31,0x37,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78, - 0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x37,0x2e,0x79,0x20,0x3d,0x20,0x5f, - 0x37,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x37,0x2e,0x7a, + 0x34,0x20,0x5f,0x31,0x32,0x34,0x20,0x3d,0x20,0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20, + 0x20,0x20,0x5f,0x31,0x32,0x34,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78, + 0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x34,0x2e,0x79,0x20,0x3d,0x20,0x5f, + 0x37,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x34,0x2e,0x7a, 0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c, - 0x6f,0x61,0x74,0x33,0x20,0x5f,0x39,0x39,0x20,0x3d,0x20,0x28,0x5f,0x31,0x31,0x37, + 0x6f,0x61,0x74,0x33,0x20,0x5f,0x39,0x39,0x20,0x3d,0x20,0x28,0x5f,0x31,0x32,0x34, 0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30,0x66,0x20,0x2d,0x20,0x5f, 0x33,0x36,0x5f,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72, 0x69,0x64,0x65,0x2e,0x77,0x29,0x29,0x20,0x2b,0x20,0x28,0x5f,0x33,0x36,0x5f,0x75, 0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e, 0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x33,0x36,0x5f,0x75,0x5f,0x63,0x6f,0x6c,0x6f, 0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x77,0x29,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x32,0x33,0x20,0x3d, - 0x20,0x5f,0x31,0x31,0x37,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x33,0x2e, + 0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x33,0x30,0x20,0x3d, + 0x20,0x5f,0x31,0x32,0x34,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x30,0x2e, 0x78,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f, - 0x31,0x32,0x33,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x79,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x5f,0x31,0x32,0x33,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e, - 0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d,0x20,0x5f,0x31,0x32,0x33,0x3b, + 0x31,0x33,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x79,0x3b,0x0a,0x20, + 0x20,0x20,0x20,0x5f,0x31,0x33,0x30,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e, + 0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d,0x20,0x5f,0x31,0x33,0x30,0x3b, 0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20, - 0x3d,0x20,0x5f,0x31,0x32,0x33,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,0x56, + 0x3d,0x20,0x5f,0x31,0x33,0x30,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,0x56, 0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x6d,0x61, 0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x49, 0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74, @@ -865,17 +865,17 @@ const vs_source_metal_macos = [953]u8 { // float4 _53 = tex_emissive.sample(smp, in.uv); // float4 _69 = c; // float3 _76 = (_69.xyz * (1.0 - fast::min((_53.x + _53.y) + _53.z, 1.0))) + _53.xyz; -// float4 _117 = _69; -// _117.x = _76.x; -// _117.y = _76.y; -// _117.z = _76.z; -// float3 _99 = (_117.xyz * (1.0 - _36.u_color_override.w)) + (_36.u_color_override.xyz * _36.u_color_override.w); -// float4 _123 = _117; -// _123.x = _99.x; -// _123.y = _99.y; -// _123.z = _99.z; -// c = _123; -// out.frag_color = _123; +// float4 _124 = _69; +// _124.x = _76.x; +// _124.y = _76.y; +// _124.z = _76.z; +// float3 _99 = (_124.xyz * (1.0 - _36.u_color_override.w)) + (_36.u_color_override.xyz * _36.u_color_override.w); +// float4 _130 = _124; +// _130.x = _99.x; +// _130.y = _99.y; +// _130.z = _99.z; +// c = _130; +// out.frag_color = _130; // return out; // } // @@ -933,26 +933,26 @@ const fs_source_metal_macos = [1174]u8 { 0x69,0x6e,0x28,0x28,0x5f,0x35,0x33,0x2e,0x78,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e, 0x79,0x29,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29, 0x29,0x29,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20, - 0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x31,0x37,0x20,0x3d,0x20, - 0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x37,0x2e,0x78,0x20, - 0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x31, - 0x37,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x5f,0x31,0x31,0x37,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x7a,0x3b, + 0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x32,0x34,0x20,0x3d,0x20, + 0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x34,0x2e,0x78,0x20, + 0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32, + 0x34,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x5f,0x31,0x32,0x34,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x7a,0x3b, 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x39,0x39,0x20, - 0x3d,0x20,0x28,0x5f,0x31,0x31,0x37,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x31, + 0x3d,0x20,0x28,0x5f,0x31,0x32,0x34,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x31, 0x2e,0x30,0x20,0x2d,0x20,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72, 0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x77,0x29,0x29,0x20,0x2b,0x20, 0x28,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65, 0x72,0x72,0x69,0x64,0x65,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x33,0x36,0x2e, 0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65, 0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20, - 0x5f,0x31,0x32,0x33,0x20,0x3d,0x20,0x5f,0x31,0x31,0x37,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x5f,0x31,0x32,0x33,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x78,0x3b, - 0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x33,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39, - 0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x33,0x2e,0x7a,0x20, + 0x5f,0x31,0x33,0x30,0x20,0x3d,0x20,0x5f,0x31,0x32,0x34,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x5f,0x31,0x33,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x78,0x3b, + 0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39, + 0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x30,0x2e,0x7a,0x20, 0x3d,0x20,0x5f,0x39,0x39,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d, - 0x20,0x5f,0x31,0x32,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66, - 0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x32,0x33, + 0x20,0x5f,0x31,0x33,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66, + 0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x33,0x30, 0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74, 0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; @@ -1097,17 +1097,17 @@ const vs_source_metal_ios = [953]u8 { // float4 _53 = tex_emissive.sample(smp, in.uv); // float4 _69 = c; // float3 _76 = (_69.xyz * (1.0 - fast::min((_53.x + _53.y) + _53.z, 1.0))) + _53.xyz; -// float4 _117 = _69; -// _117.x = _76.x; -// _117.y = _76.y; -// _117.z = _76.z; -// float3 _99 = (_117.xyz * (1.0 - _36.u_color_override.w)) + (_36.u_color_override.xyz * _36.u_color_override.w); -// float4 _123 = _117; -// _123.x = _99.x; -// _123.y = _99.y; -// _123.z = _99.z; -// c = _123; -// out.frag_color = _123; +// float4 _124 = _69; +// _124.x = _76.x; +// _124.y = _76.y; +// _124.z = _76.z; +// float3 _99 = (_124.xyz * (1.0 - _36.u_color_override.w)) + (_36.u_color_override.xyz * _36.u_color_override.w); +// float4 _130 = _124; +// _130.x = _99.x; +// _130.y = _99.y; +// _130.z = _99.z; +// c = _130; +// out.frag_color = _130; // return out; // } // @@ -1165,26 +1165,26 @@ const fs_source_metal_ios = [1174]u8 { 0x69,0x6e,0x28,0x28,0x5f,0x35,0x33,0x2e,0x78,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e, 0x79,0x29,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29, 0x29,0x29,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20, - 0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x31,0x37,0x20,0x3d,0x20, - 0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x37,0x2e,0x78,0x20, - 0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x31, - 0x37,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x5f,0x31,0x31,0x37,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x7a,0x3b, + 0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x32,0x34,0x20,0x3d,0x20, + 0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x34,0x2e,0x78,0x20, + 0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32, + 0x34,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x5f,0x31,0x32,0x34,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x7a,0x3b, 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x39,0x39,0x20, - 0x3d,0x20,0x28,0x5f,0x31,0x31,0x37,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x31, + 0x3d,0x20,0x28,0x5f,0x31,0x32,0x34,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x31, 0x2e,0x30,0x20,0x2d,0x20,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72, 0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x77,0x29,0x29,0x20,0x2b,0x20, 0x28,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65, 0x72,0x72,0x69,0x64,0x65,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x33,0x36,0x2e, 0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65, 0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20, - 0x5f,0x31,0x32,0x33,0x20,0x3d,0x20,0x5f,0x31,0x31,0x37,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x5f,0x31,0x32,0x33,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x78,0x3b, - 0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x33,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39, - 0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x33,0x2e,0x7a,0x20, + 0x5f,0x31,0x33,0x30,0x20,0x3d,0x20,0x5f,0x31,0x32,0x34,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x5f,0x31,0x33,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x78,0x3b, + 0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39, + 0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x30,0x2e,0x7a,0x20, 0x3d,0x20,0x5f,0x39,0x39,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d, - 0x20,0x5f,0x31,0x32,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66, - 0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x32,0x33, + 0x20,0x5f,0x31,0x33,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66, + 0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x33,0x30, 0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74, 0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; @@ -1329,17 +1329,17 @@ const vs_source_metal_sim = [953]u8 { // float4 _53 = tex_emissive.sample(smp, in.uv); // float4 _69 = c; // float3 _76 = (_69.xyz * (1.0 - fast::min((_53.x + _53.y) + _53.z, 1.0))) + _53.xyz; -// float4 _117 = _69; -// _117.x = _76.x; -// _117.y = _76.y; -// _117.z = _76.z; -// float3 _99 = (_117.xyz * (1.0 - _36.u_color_override.w)) + (_36.u_color_override.xyz * _36.u_color_override.w); -// float4 _123 = _117; -// _123.x = _99.x; -// _123.y = _99.y; -// _123.z = _99.z; -// c = _123; -// out.frag_color = _123; +// float4 _124 = _69; +// _124.x = _76.x; +// _124.y = _76.y; +// _124.z = _76.z; +// float3 _99 = (_124.xyz * (1.0 - _36.u_color_override.w)) + (_36.u_color_override.xyz * _36.u_color_override.w); +// float4 _130 = _124; +// _130.x = _99.x; +// _130.y = _99.y; +// _130.z = _99.z; +// c = _130; +// out.frag_color = _130; // return out; // } // @@ -1397,26 +1397,26 @@ const fs_source_metal_sim = [1174]u8 { 0x69,0x6e,0x28,0x28,0x5f,0x35,0x33,0x2e,0x78,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e, 0x79,0x29,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e,0x7a,0x2c,0x20,0x31,0x2e,0x30,0x29, 0x29,0x29,0x20,0x2b,0x20,0x5f,0x35,0x33,0x2e,0x78,0x79,0x7a,0x3b,0x0a,0x20,0x20, - 0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x31,0x37,0x20,0x3d,0x20, - 0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x31,0x37,0x2e,0x78,0x20, - 0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x31, - 0x37,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x5f,0x31,0x31,0x37,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x7a,0x3b, + 0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x5f,0x31,0x32,0x34,0x20,0x3d,0x20, + 0x5f,0x36,0x39,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x34,0x2e,0x78,0x20, + 0x3d,0x20,0x5f,0x37,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32, + 0x34,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x5f,0x31,0x32,0x34,0x2e,0x7a,0x20,0x3d,0x20,0x5f,0x37,0x36,0x2e,0x7a,0x3b, 0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x5f,0x39,0x39,0x20, - 0x3d,0x20,0x28,0x5f,0x31,0x31,0x37,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x31, + 0x3d,0x20,0x28,0x5f,0x31,0x32,0x34,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x28,0x31, 0x2e,0x30,0x20,0x2d,0x20,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72, 0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x77,0x29,0x29,0x20,0x2b,0x20, 0x28,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65, 0x72,0x72,0x69,0x64,0x65,0x2e,0x78,0x79,0x7a,0x20,0x2a,0x20,0x5f,0x33,0x36,0x2e, 0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65, 0x2e,0x77,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20, - 0x5f,0x31,0x32,0x33,0x20,0x3d,0x20,0x5f,0x31,0x31,0x37,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x5f,0x31,0x32,0x33,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x78,0x3b, - 0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x33,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39, - 0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x32,0x33,0x2e,0x7a,0x20, + 0x5f,0x31,0x33,0x30,0x20,0x3d,0x20,0x5f,0x31,0x32,0x34,0x3b,0x0a,0x20,0x20,0x20, + 0x20,0x5f,0x31,0x33,0x30,0x2e,0x78,0x20,0x3d,0x20,0x5f,0x39,0x39,0x2e,0x78,0x3b, + 0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x30,0x2e,0x79,0x20,0x3d,0x20,0x5f,0x39, + 0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x5f,0x31,0x33,0x30,0x2e,0x7a,0x20, 0x3d,0x20,0x5f,0x39,0x39,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x20,0x3d, - 0x20,0x5f,0x31,0x32,0x33,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66, - 0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x32,0x33, + 0x20,0x5f,0x31,0x33,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66, + 0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x5f,0x31,0x33,0x30, 0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74, 0x3b,0x0a,0x7d,0x0a,0x0a,0x00, }; @@ -1629,17 +1629,19 @@ const vs_source_wgsl = [1690]u8 { // // @group(1) @binding(49) var tex_emissive : texture_2d; // -// var frag_color : vec4f; -// // var normal : vec3f; // // var tangent : vec4f; // +// var frag_color : vec4f; +// // fn main_1() { // var c : vec4f; // var e : vec4f; // var e_amt : f32; // var override_mod : f32; +// var test : f32; +// var test2 : f32; // let x_23 : vec2f = uv; // let x_24 : vec4f = textureSample(tex, smp, x_23); // let x_27 : vec4f = color; @@ -1673,8 +1675,12 @@ const vs_source_wgsl = [1690]u8 { // c.x = x_99.x; // c.y = x_99.y; // c.z = x_99.z; -// let x_108 : vec4f = c; -// frag_color = x_108; +// let x_111 : f32 = normal.x; +// test = x_111; +// let x_115 : f32 = tangent.x; +// test2 = x_115; +// let x_118 : vec4f = c; +// frag_color = x_118; // return; // } // @@ -1694,7 +1700,7 @@ const vs_source_wgsl = [1690]u8 { // } // // -const fs_source_wgsl = [2077]u8 { +const fs_source_wgsl = [2208]u8 { 0x64,0x69,0x61,0x67,0x6e,0x6f,0x73,0x74,0x69,0x63,0x28,0x6f,0x66,0x66,0x2c,0x20, 0x64,0x65,0x72,0x69,0x76,0x61,0x74,0x69,0x76,0x65,0x5f,0x75,0x6e,0x69,0x66,0x6f, 0x72,0x6d,0x69,0x74,0x79,0x29,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20, @@ -1721,110 +1727,119 @@ const fs_source_wgsl = [2077]u8 { 0x62,0x69,0x6e,0x64,0x69,0x6e,0x67,0x28,0x34,0x39,0x29,0x20,0x76,0x61,0x72,0x20, 0x74,0x65,0x78,0x5f,0x65,0x6d,0x69,0x73,0x73,0x69,0x76,0x65,0x20,0x3a,0x20,0x74, 0x65,0x78,0x74,0x75,0x72,0x65,0x5f,0x32,0x64,0x3c,0x66,0x33,0x32,0x3e,0x3b,0x0a, - 0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72, - 0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66, - 0x3b,0x0a,0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20, - 0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,0x3b,0x0a, - 0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x74,0x61, - 0x6e,0x67,0x65,0x6e,0x74,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a, + 0x0a,0x76,0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x6e,0x6f, + 0x72,0x6d,0x61,0x6c,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,0x3b,0x0a,0x0a,0x76, + 0x61,0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x74,0x61,0x6e,0x67, + 0x65,0x6e,0x74,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a,0x76,0x61, + 0x72,0x3c,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x3e,0x20,0x66,0x72,0x61,0x67,0x5f, + 0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x0a, 0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x20,0x7b,0x0a,0x20,0x20, 0x76,0x61,0x72,0x20,0x63,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a,0x20, 0x20,0x76,0x61,0x72,0x20,0x65,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x3b,0x0a, 0x20,0x20,0x76,0x61,0x72,0x20,0x65,0x5f,0x61,0x6d,0x74,0x20,0x3a,0x20,0x66,0x33, 0x32,0x3b,0x0a,0x20,0x20,0x76,0x61,0x72,0x20,0x6f,0x76,0x65,0x72,0x72,0x69,0x64, - 0x65,0x5f,0x6d,0x6f,0x64,0x20,0x3a,0x20,0x66,0x33,0x32,0x3b,0x0a,0x20,0x20,0x6c, - 0x65,0x74,0x20,0x78,0x5f,0x32,0x33,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20, - 0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x34, - 0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75, - 0x72,0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x74,0x65,0x78,0x2c,0x20,0x73,0x6d, - 0x70,0x2c,0x20,0x78,0x5f,0x32,0x33,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20, - 0x78,0x5f,0x32,0x37,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x63, - 0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x63,0x20,0x3d,0x20,0x28,0x78,0x5f,0x32, - 0x34,0x20,0x2a,0x20,0x78,0x5f,0x32,0x37,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74, - 0x20,0x78,0x5f,0x33,0x33,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x63,0x2e, - 0x77,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x34,0x31,0x20,0x3a,0x20, - 0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x61,0x6c,0x70, - 0x68,0x61,0x5f,0x63,0x75,0x74,0x6f,0x66,0x66,0x3b,0x0a,0x20,0x20,0x69,0x66,0x20, - 0x28,0x28,0x78,0x5f,0x33,0x33,0x20,0x3c,0x3d,0x20,0x78,0x5f,0x34,0x31,0x29,0x29, - 0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63,0x61,0x72,0x64,0x3b,0x0a, - 0x20,0x20,0x7d,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x32,0x20,0x3a, - 0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x6c, - 0x65,0x74,0x20,0x78,0x5f,0x35,0x33,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20, - 0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28, - 0x74,0x65,0x78,0x5f,0x65,0x6d,0x69,0x73,0x73,0x69,0x76,0x65,0x2c,0x20,0x73,0x6d, - 0x70,0x2c,0x20,0x78,0x5f,0x35,0x32,0x29,0x3b,0x0a,0x20,0x20,0x65,0x20,0x3d,0x20, - 0x78,0x5f,0x35,0x33,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x37, - 0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x65,0x2e,0x78,0x3b,0x0a,0x20,0x20, - 0x6c,0x65,0x74,0x20,0x78,0x5f,0x36,0x30,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d, - 0x20,0x65,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x36,0x34, - 0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x65,0x2e,0x7a,0x3b,0x0a,0x20,0x20, - 0x65,0x5f,0x61,0x6d,0x74,0x20,0x3d,0x20,0x6d,0x69,0x6e,0x28,0x28,0x28,0x78,0x5f, - 0x35,0x37,0x20,0x2b,0x20,0x78,0x5f,0x36,0x30,0x29,0x20,0x2b,0x20,0x78,0x5f,0x36, - 0x34,0x29,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74, - 0x20,0x78,0x5f,0x36,0x39,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20, - 0x63,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x37,0x31,0x20,0x3a,0x20, - 0x66,0x33,0x32,0x20,0x3d,0x20,0x65,0x5f,0x61,0x6d,0x74,0x3b,0x0a,0x20,0x20,0x6c, - 0x65,0x74,0x20,0x78,0x5f,0x37,0x34,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20, - 0x3d,0x20,0x65,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x37,0x36,0x20, - 0x3a,0x20,0x76,0x65,0x63,0x33,0x66,0x20,0x3d,0x20,0x28,0x28,0x76,0x65,0x63,0x33, - 0x66,0x28,0x78,0x5f,0x36,0x39,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x36,0x39,0x2e,0x79, - 0x2c,0x20,0x78,0x5f,0x36,0x39,0x2e,0x7a,0x29,0x20,0x2a,0x20,0x28,0x31,0x2e,0x30, - 0x66,0x20,0x2d,0x20,0x78,0x5f,0x37,0x31,0x29,0x29,0x20,0x2b,0x20,0x76,0x65,0x63, - 0x33,0x66,0x28,0x78,0x5f,0x37,0x34,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x37,0x34,0x2e, - 0x79,0x2c,0x20,0x78,0x5f,0x37,0x34,0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x20,0x20,0x63, - 0x2e,0x78,0x20,0x3d,0x20,0x78,0x5f,0x37,0x36,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x63, - 0x2e,0x79,0x20,0x3d,0x20,0x78,0x5f,0x37,0x36,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x63, - 0x2e,0x7a,0x20,0x3d,0x20,0x78,0x5f,0x37,0x36,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x6c, - 0x65,0x74,0x20,0x78,0x5f,0x38,0x36,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20, - 0x78,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65, - 0x72,0x72,0x69,0x64,0x65,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x6f,0x76,0x65,0x72,0x72, - 0x69,0x64,0x65,0x5f,0x6d,0x6f,0x64,0x20,0x3d,0x20,0x28,0x31,0x2e,0x30,0x66,0x20, - 0x2d,0x20,0x78,0x5f,0x38,0x36,0x29,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78, - 0x5f,0x38,0x38,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x63,0x3b, - 0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x39,0x30,0x20,0x3a,0x20,0x66,0x33, - 0x32,0x20,0x3d,0x20,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x5f,0x6d,0x6f,0x64, - 0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x39,0x34,0x20,0x3a,0x20,0x76, - 0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x78,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f, - 0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x3b,0x0a,0x20,0x20, - 0x6c,0x65,0x74,0x20,0x78,0x5f,0x39,0x37,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d, - 0x20,0x78,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76, - 0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20, - 0x78,0x5f,0x39,0x39,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,0x20,0x3d,0x20,0x28, - 0x28,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x38,0x38,0x2e,0x78,0x2c,0x20,0x78, - 0x5f,0x38,0x38,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x38,0x38,0x2e,0x7a,0x29,0x20,0x2a, - 0x20,0x78,0x5f,0x39,0x30,0x29,0x20,0x2b,0x20,0x28,0x76,0x65,0x63,0x33,0x66,0x28, - 0x78,0x5f,0x39,0x34,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x39,0x34,0x2e,0x79,0x2c,0x20, - 0x78,0x5f,0x39,0x34,0x2e,0x7a,0x29,0x20,0x2a,0x20,0x78,0x5f,0x39,0x37,0x29,0x29, - 0x3b,0x0a,0x20,0x20,0x63,0x2e,0x78,0x20,0x3d,0x20,0x78,0x5f,0x39,0x39,0x2e,0x78, - 0x3b,0x0a,0x20,0x20,0x63,0x2e,0x79,0x20,0x3d,0x20,0x78,0x5f,0x39,0x39,0x2e,0x79, - 0x3b,0x0a,0x20,0x20,0x63,0x2e,0x7a,0x20,0x3d,0x20,0x78,0x5f,0x39,0x39,0x2e,0x7a, - 0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x31,0x30,0x38,0x20,0x3a,0x20, - 0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20,0x66,0x72,0x61, - 0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x78,0x5f,0x31,0x30,0x38,0x3b, - 0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d,0x0a,0x0a,0x73,0x74, - 0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20,0x7b,0x0a, - 0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x0a,0x20, - 0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31,0x20,0x3a,0x20, - 0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x66,0x72,0x61,0x67,0x6d, - 0x65,0x6e,0x74,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x40,0x6c,0x6f,0x63, - 0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29,0x20,0x75,0x76,0x5f,0x70,0x61,0x72,0x61, - 0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61, - 0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x70,0x61, - 0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x20,0x40,0x6c,0x6f, - 0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x32,0x29,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c, - 0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,0x2c,0x20, - 0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x33,0x29,0x20,0x74,0x61,0x6e, - 0x67,0x65,0x6e,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63, - 0x34,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x20, - 0x7b,0x0a,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x5f,0x70,0x61,0x72,0x61, - 0x6d,0x3b,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c, - 0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6e,0x6f,0x72,0x6d, - 0x61,0x6c,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x70,0x61,0x72,0x61, - 0x6d,0x3b,0x0a,0x20,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20,0x3d,0x20,0x74, - 0x61,0x6e,0x67,0x65,0x6e,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20, - 0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75, - 0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x66,0x72,0x61,0x67, - 0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, + 0x65,0x5f,0x6d,0x6f,0x64,0x20,0x3a,0x20,0x66,0x33,0x32,0x3b,0x0a,0x20,0x20,0x76, + 0x61,0x72,0x20,0x74,0x65,0x73,0x74,0x20,0x3a,0x20,0x66,0x33,0x32,0x3b,0x0a,0x20, + 0x20,0x76,0x61,0x72,0x20,0x74,0x65,0x73,0x74,0x32,0x20,0x3a,0x20,0x66,0x33,0x32, + 0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x33,0x20,0x3a,0x20,0x76, + 0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x75,0x76,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74, + 0x20,0x78,0x5f,0x32,0x34,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20, + 0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x61,0x6d,0x70,0x6c,0x65,0x28,0x74,0x65, + 0x78,0x2c,0x20,0x73,0x6d,0x70,0x2c,0x20,0x78,0x5f,0x32,0x33,0x29,0x3b,0x0a,0x20, + 0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x32,0x37,0x20,0x3a,0x20,0x76,0x65,0x63,0x34, + 0x66,0x20,0x3d,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x63,0x20,0x3d, + 0x20,0x28,0x78,0x5f,0x32,0x34,0x20,0x2a,0x20,0x78,0x5f,0x32,0x37,0x29,0x3b,0x0a, + 0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x33,0x33,0x20,0x3a,0x20,0x66,0x33,0x32, + 0x20,0x3d,0x20,0x63,0x2e,0x77,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f, + 0x34,0x31,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,0x36,0x2e, + 0x75,0x5f,0x61,0x6c,0x70,0x68,0x61,0x5f,0x63,0x75,0x74,0x6f,0x66,0x66,0x3b,0x0a, + 0x20,0x20,0x69,0x66,0x20,0x28,0x28,0x78,0x5f,0x33,0x33,0x20,0x3c,0x3d,0x20,0x78, + 0x5f,0x34,0x31,0x29,0x29,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x64,0x69,0x73,0x63, + 0x61,0x72,0x64,0x3b,0x0a,0x20,0x20,0x7d,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78, + 0x5f,0x35,0x32,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x20,0x3d,0x20,0x75,0x76, + 0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x35,0x33,0x20,0x3a,0x20,0x76, + 0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x53,0x61, + 0x6d,0x70,0x6c,0x65,0x28,0x74,0x65,0x78,0x5f,0x65,0x6d,0x69,0x73,0x73,0x69,0x76, + 0x65,0x2c,0x20,0x73,0x6d,0x70,0x2c,0x20,0x78,0x5f,0x35,0x32,0x29,0x3b,0x0a,0x20, + 0x20,0x65,0x20,0x3d,0x20,0x78,0x5f,0x35,0x33,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74, + 0x20,0x78,0x5f,0x35,0x37,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x65,0x2e, + 0x78,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x36,0x30,0x20,0x3a,0x20, + 0x66,0x33,0x32,0x20,0x3d,0x20,0x65,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74, + 0x20,0x78,0x5f,0x36,0x34,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x65,0x2e, + 0x7a,0x3b,0x0a,0x20,0x20,0x65,0x5f,0x61,0x6d,0x74,0x20,0x3d,0x20,0x6d,0x69,0x6e, + 0x28,0x28,0x28,0x78,0x5f,0x35,0x37,0x20,0x2b,0x20,0x78,0x5f,0x36,0x30,0x29,0x20, + 0x2b,0x20,0x78,0x5f,0x36,0x34,0x29,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a, + 0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x36,0x39,0x20,0x3a,0x20,0x76,0x65,0x63, + 0x34,0x66,0x20,0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f, + 0x37,0x31,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x65,0x5f,0x61,0x6d,0x74, + 0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x37,0x34,0x20,0x3a,0x20,0x76, + 0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x65,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20, + 0x78,0x5f,0x37,0x36,0x20,0x3a,0x20,0x76,0x65,0x63,0x33,0x66,0x20,0x3d,0x20,0x28, + 0x28,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x36,0x39,0x2e,0x78,0x2c,0x20,0x78, + 0x5f,0x36,0x39,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x36,0x39,0x2e,0x7a,0x29,0x20,0x2a, + 0x20,0x28,0x31,0x2e,0x30,0x66,0x20,0x2d,0x20,0x78,0x5f,0x37,0x31,0x29,0x29,0x20, + 0x2b,0x20,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x37,0x34,0x2e,0x78,0x2c,0x20, + 0x78,0x5f,0x37,0x34,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x37,0x34,0x2e,0x7a,0x29,0x29, + 0x3b,0x0a,0x20,0x20,0x63,0x2e,0x78,0x20,0x3d,0x20,0x78,0x5f,0x37,0x36,0x2e,0x78, + 0x3b,0x0a,0x20,0x20,0x63,0x2e,0x79,0x20,0x3d,0x20,0x78,0x5f,0x37,0x36,0x2e,0x79, + 0x3b,0x0a,0x20,0x20,0x63,0x2e,0x7a,0x20,0x3d,0x20,0x78,0x5f,0x37,0x36,0x2e,0x7a, + 0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x38,0x36,0x20,0x3a,0x20,0x66, + 0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f, + 0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x77,0x3b,0x0a,0x20,0x20, + 0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x5f,0x6d,0x6f,0x64,0x20,0x3d,0x20,0x28, + 0x31,0x2e,0x30,0x66,0x20,0x2d,0x20,0x78,0x5f,0x38,0x36,0x29,0x3b,0x0a,0x20,0x20, + 0x6c,0x65,0x74,0x20,0x78,0x5f,0x38,0x38,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66, + 0x20,0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x39,0x30, + 0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x6f,0x76,0x65,0x72,0x72,0x69,0x64, + 0x65,0x5f,0x6d,0x6f,0x64,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x39, + 0x34,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x78,0x5f,0x33,0x36, + 0x2e,0x75,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64, + 0x65,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x39,0x37,0x20,0x3a,0x20, + 0x66,0x33,0x32,0x20,0x3d,0x20,0x78,0x5f,0x33,0x36,0x2e,0x75,0x5f,0x63,0x6f,0x6c, + 0x6f,0x72,0x5f,0x6f,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x2e,0x77,0x3b,0x0a,0x20, + 0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x39,0x39,0x20,0x3a,0x20,0x76,0x65,0x63,0x33, + 0x66,0x20,0x3d,0x20,0x28,0x28,0x76,0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x38,0x38, + 0x2e,0x78,0x2c,0x20,0x78,0x5f,0x38,0x38,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x38,0x38, + 0x2e,0x7a,0x29,0x20,0x2a,0x20,0x78,0x5f,0x39,0x30,0x29,0x20,0x2b,0x20,0x28,0x76, + 0x65,0x63,0x33,0x66,0x28,0x78,0x5f,0x39,0x34,0x2e,0x78,0x2c,0x20,0x78,0x5f,0x39, + 0x34,0x2e,0x79,0x2c,0x20,0x78,0x5f,0x39,0x34,0x2e,0x7a,0x29,0x20,0x2a,0x20,0x78, + 0x5f,0x39,0x37,0x29,0x29,0x3b,0x0a,0x20,0x20,0x63,0x2e,0x78,0x20,0x3d,0x20,0x78, + 0x5f,0x39,0x39,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x63,0x2e,0x79,0x20,0x3d,0x20,0x78, + 0x5f,0x39,0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x63,0x2e,0x7a,0x20,0x3d,0x20,0x78, + 0x5f,0x39,0x39,0x2e,0x7a,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x31, + 0x31,0x31,0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61, + 0x6c,0x2e,0x78,0x3b,0x0a,0x20,0x20,0x74,0x65,0x73,0x74,0x20,0x3d,0x20,0x78,0x5f, + 0x31,0x31,0x31,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x31,0x31,0x35, + 0x20,0x3a,0x20,0x66,0x33,0x32,0x20,0x3d,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74, + 0x2e,0x78,0x3b,0x0a,0x20,0x20,0x74,0x65,0x73,0x74,0x32,0x20,0x3d,0x20,0x78,0x5f, + 0x31,0x31,0x35,0x3b,0x0a,0x20,0x20,0x6c,0x65,0x74,0x20,0x78,0x5f,0x31,0x31,0x38, + 0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x20,0x3d,0x20,0x63,0x3b,0x0a,0x20,0x20, + 0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x78,0x5f,0x31, + 0x31,0x38,0x3b,0x0a,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x3b,0x0a,0x7d,0x0a, + 0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74, + 0x20,0x7b,0x0a,0x20,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30, + 0x29,0x0a,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x31, + 0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x0a,0x7d,0x0a,0x0a,0x40,0x66,0x72, + 0x61,0x67,0x6d,0x65,0x6e,0x74,0x0a,0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x40, + 0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x31,0x29,0x20,0x75,0x76,0x5f,0x70, + 0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x32,0x66,0x2c,0x20,0x40,0x6c, + 0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x30,0x29,0x20,0x63,0x6f,0x6c,0x6f,0x72, + 0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x34,0x66,0x2c,0x20, + 0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x32,0x29,0x20,0x6e,0x6f,0x72, + 0x6d,0x61,0x6c,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20,0x76,0x65,0x63,0x33, + 0x66,0x2c,0x20,0x40,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x28,0x33,0x29,0x20, + 0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x20,0x3a,0x20, + 0x76,0x65,0x63,0x34,0x66,0x29,0x20,0x2d,0x3e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f, + 0x75,0x74,0x20,0x7b,0x0a,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x75,0x76,0x5f,0x70, + 0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20, + 0x63,0x6f,0x6c,0x6f,0x72,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x6e, + 0x6f,0x72,0x6d,0x61,0x6c,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x5f,0x70, + 0x61,0x72,0x61,0x6d,0x3b,0x0a,0x20,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x20, + 0x3d,0x20,0x74,0x61,0x6e,0x67,0x65,0x6e,0x74,0x5f,0x70,0x61,0x72,0x61,0x6d,0x3b, + 0x0a,0x20,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x31,0x28,0x29,0x3b,0x0a,0x20,0x20,0x72, + 0x65,0x74,0x75,0x72,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x5f,0x6f,0x75,0x74,0x28,0x66, + 0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, + }; pub fn emissiveShaderDesc(backend: sg.Backend) sg.ShaderDesc { var desc: sg.ShaderDesc = .{};