mirror of
https://github.com/weihuoya/citra.git
synced 2026-01-25 04:18:23 +00:00
19021 lines
603 KiB
GLSL
19021 lines
603 KiB
GLSL
// shader: 8B31, AD35AAAFFE2E55A4
|
|
|
|
#define mul_s(x, y) mix(x * y, vec4(0.0), isnan(x * y))
|
|
#define fma_s(x, y, z) (mix(x * y, vec4(0.0), isnan(x * y)) + z)
|
|
float rcp_s(float x) {
|
|
if (x == 0.0) return x;
|
|
return 1.0 / x;
|
|
}
|
|
float rsq_s(float x) {
|
|
if (x > 0.0) return inversesqrt(x);
|
|
return 0.0;
|
|
}
|
|
#define dot_s(x, y) dot(x, y)
|
|
#define dot_3(x, y) dot(x, y)
|
|
|
|
struct pica_uniforms {
|
|
bool b[16];
|
|
uvec4 i[4];
|
|
vec4 f[96];
|
|
};
|
|
|
|
bool exec_shader();
|
|
|
|
#define uniforms vs_uniforms
|
|
layout (std140) uniform vs_config {
|
|
pica_uniforms uniforms;
|
|
};
|
|
layout(location = 0) in vec4 vs_in_reg0;
|
|
|
|
out vec4 vs_out_attr0;
|
|
out vec4 vs_out_attr1;
|
|
out vec4 vs_out_attr2;
|
|
out vec4 vs_out_attr3;
|
|
out vec4 vs_out_attr4;
|
|
|
|
void main() {
|
|
vs_out_attr0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
exec_shader();
|
|
}
|
|
bvec2 conditional_code = bvec2(false);
|
|
ivec3 address_registers = ivec3(0);
|
|
vec4 reg_tmp0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp5 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp6 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp7 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp8 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp9 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp10 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp11 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp12 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp13 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp14 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp15 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
|
|
bool sub_0();
|
|
bool sub_1();
|
|
bool sub_2();
|
|
bool sub_3();
|
|
bool sub_4();
|
|
bool sub_5();
|
|
bool sub_6();
|
|
bool sub_7();
|
|
bool sub_8();
|
|
bool sub_9();
|
|
bool sub_10();
|
|
bool sub_11();
|
|
bool sub_12();
|
|
bool sub_13();
|
|
bool sub_14();
|
|
bool sub_15();
|
|
bool sub_16();
|
|
bool sub_17();
|
|
bool sub_18();
|
|
bool sub_19();
|
|
bool sub_20();
|
|
|
|
bool exec_shader() {
|
|
sub_0();
|
|
return true;
|
|
}
|
|
|
|
bool sub_0() {
|
|
address_registers.x = (ivec2(vs_in_reg0.xy)).x;
|
|
reg_tmp0 = uniforms.f[6 + address_registers.x].wzyx;
|
|
reg_tmp1.xy = (vs_in_reg0.zwzw).xy;
|
|
reg_tmp1.zw = (uniforms.f[5].xyxy).zw;
|
|
address_registers.xy = ivec2(reg_tmp0.xy);
|
|
reg_tmp2.xw = (uniforms.f[64 + address_registers.y].wwyy).xw;
|
|
reg_tmp2.yz = (uniforms.f[5].xxxx).yz;
|
|
reg_tmp4.x = dot_s(reg_tmp1, reg_tmp2);
|
|
reg_tmp2.yw = (uniforms.f[64 + address_registers.y].zzxx).yw;
|
|
reg_tmp2.xz = (uniforms.f[5].xxxx).xz;
|
|
reg_tmp4.y = dot_s(reg_tmp1, reg_tmp2);
|
|
reg_tmp4.zw = (reg_tmp1.zwzw).zw;
|
|
reg_tmp3.x = dot_s(uniforms.f[32 + address_registers.x].wzyx, reg_tmp4);
|
|
reg_tmp3.y = dot_s(uniforms.f[33 + address_registers.x].wzyx, reg_tmp4);
|
|
reg_tmp3.z = dot_s(uniforms.f[34 + address_registers.x].wzyx, reg_tmp4);
|
|
reg_tmp3.w = (reg_tmp1.wwww).w;
|
|
reg_tmp4.z = (uniforms.f[34 + address_registers.x].xxxx).z;
|
|
reg_tmp4.z = (abs(reg_tmp4.zzzz)).z;
|
|
reg_tmp4.z = (uniforms.f[4].yyyy + reg_tmp4.zzzz).z;
|
|
reg_tmp4.x = (uniforms.f[4].wwww).x;
|
|
conditional_code = notEqual(uniforms.f[5].xx, reg_tmp4.xz);
|
|
if (all(conditional_code)) {
|
|
sub_1();
|
|
}
|
|
vs_out_attr0.x = dot_s(uniforms.f[0].wzyx, reg_tmp3);
|
|
vs_out_attr0.y = dot_s(uniforms.f[1].wzyx, reg_tmp3);
|
|
vs_out_attr0.z = dot_s(uniforms.f[2].wzyx, reg_tmp3);
|
|
vs_out_attr0.w = dot_s(uniforms.f[3].wzyx, reg_tmp3);
|
|
conditional_code = greaterThanEqual(uniforms.f[5].yy, reg_tmp0.ww);
|
|
if (all(conditional_code)) {
|
|
sub_2();
|
|
} else {
|
|
sub_3();
|
|
}
|
|
conditional_code = notEqual(uniforms.f[5].xx, reg_tmp1.xy);
|
|
if (all(not(conditional_code))) {
|
|
sub_8();
|
|
}
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_9();
|
|
}
|
|
if (all(bvec2(!conditional_code.x, conditional_code.y))) {
|
|
sub_10();
|
|
}
|
|
if (all(conditional_code)) {
|
|
sub_11();
|
|
}
|
|
reg_tmp8 = uniforms.f[5].xxxx;
|
|
address_registers.z = int(uniforms.i[0].y);
|
|
for (uint loop64 = 0u; loop64 <= uniforms.i[0].x; address_registers.z += int(uniforms.i[0].z), ++loop64) {
|
|
sub_12();
|
|
}
|
|
vs_out_attr2 = reg_tmp5;
|
|
vs_out_attr3 = reg_tmp6;
|
|
vs_out_attr4 = reg_tmp7;
|
|
return true;
|
|
}
|
|
bool sub_1() {
|
|
reg_tmp4.x = (uniforms.f[4].wwww).x;
|
|
reg_tmp4.y = (-uniforms.f[4].zzzz + reg_tmp4.zzzz).y;
|
|
reg_tmp4.z = rcp_s(reg_tmp4.z);
|
|
reg_tmp4.z = (mul_s(reg_tmp4.yyyy, reg_tmp4.zzzz)).z;
|
|
reg_tmp3.x = (fma_s(reg_tmp4.xxxx, reg_tmp4.zzzz, reg_tmp3.xxxx)).x;
|
|
return false;
|
|
}
|
|
bool sub_2() {
|
|
vs_out_attr1.xyz = (uniforms.f[5].yyyy).xyz;
|
|
vs_out_attr1.w = (reg_tmp0.wwww).w;
|
|
return false;
|
|
}
|
|
bool sub_3() {
|
|
address_registers.y = (ivec2(reg_tmp0.ww)).y;
|
|
conditional_code = notEqual(uniforms.f[5].xx, reg_tmp1.xy);
|
|
if (all(not(conditional_code))) {
|
|
sub_4();
|
|
}
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_5();
|
|
}
|
|
if (all(bvec2(!conditional_code.x, conditional_code.y))) {
|
|
sub_6();
|
|
}
|
|
if (all(conditional_code)) {
|
|
sub_7();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_4() {
|
|
vs_out_attr1 = uniforms.f[32 + address_registers.y].wzyx;
|
|
return false;
|
|
}
|
|
bool sub_5() {
|
|
vs_out_attr1 = uniforms.f[33 + address_registers.y].wzyx;
|
|
return false;
|
|
}
|
|
bool sub_6() {
|
|
vs_out_attr1 = uniforms.f[34 + address_registers.y].wzyx;
|
|
return false;
|
|
}
|
|
bool sub_7() {
|
|
vs_out_attr1 = uniforms.f[35 + address_registers.y].wzyx;
|
|
return false;
|
|
}
|
|
bool sub_8() {
|
|
reg_tmp5 = uniforms.f[5].xyyy;
|
|
reg_tmp6 = uniforms.f[5].xyyy;
|
|
reg_tmp7 = uniforms.f[5].xyyy;
|
|
return false;
|
|
}
|
|
bool sub_9() {
|
|
reg_tmp5 = uniforms.f[5].yyyy;
|
|
reg_tmp6 = uniforms.f[5].yyyy;
|
|
reg_tmp7 = uniforms.f[5].yyyy;
|
|
return false;
|
|
}
|
|
bool sub_10() {
|
|
reg_tmp5 = uniforms.f[5].xxyy;
|
|
reg_tmp6 = uniforms.f[5].xxyy;
|
|
reg_tmp7 = uniforms.f[5].xxyy;
|
|
return false;
|
|
}
|
|
bool sub_11() {
|
|
reg_tmp5 = uniforms.f[5].yxyy;
|
|
reg_tmp6 = uniforms.f[5].yxyy;
|
|
reg_tmp7 = uniforms.f[5].yxyy;
|
|
return false;
|
|
}
|
|
bool sub_12() {
|
|
conditional_code = equal(uniforms.f[5].yy, reg_tmp8.xy);
|
|
if (all(conditional_code)) {
|
|
sub_13();
|
|
}
|
|
conditional_code = lessThan(uniforms.f[5].ww, reg_tmp8.xy);
|
|
if (all(conditional_code)) {
|
|
sub_18();
|
|
}
|
|
reg_tmp8 = uniforms.f[5].yyyy + reg_tmp8;
|
|
return false;
|
|
}
|
|
bool sub_13() {
|
|
address_registers.y = (ivec2(reg_tmp0.zz)).y;
|
|
conditional_code = notEqual(uniforms.f[5].xx, reg_tmp1.xy);
|
|
if (all(not(conditional_code))) {
|
|
sub_14();
|
|
}
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_15();
|
|
}
|
|
if (all(bvec2(!conditional_code.x, conditional_code.y))) {
|
|
sub_16();
|
|
}
|
|
if (all(conditional_code)) {
|
|
sub_17();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_14() {
|
|
reg_tmp5.xy = (uniforms.f[64 + address_registers.y].wzzz).xy;
|
|
reg_tmp6.xy = (uniforms.f[65 + address_registers.y].wzzz).xy;
|
|
reg_tmp7.xy = (uniforms.f[66 + address_registers.y].wzzz).xy;
|
|
return false;
|
|
}
|
|
bool sub_15() {
|
|
reg_tmp5.xy = (uniforms.f[64 + address_registers.y].yzzz).xy;
|
|
reg_tmp6.xy = (uniforms.f[65 + address_registers.y].yzzz).xy;
|
|
reg_tmp7.xy = (uniforms.f[66 + address_registers.y].yzzz).xy;
|
|
return false;
|
|
}
|
|
bool sub_16() {
|
|
reg_tmp5.xy = (uniforms.f[64 + address_registers.y].wxxx).xy;
|
|
reg_tmp6.xy = (uniforms.f[65 + address_registers.y].wxxx).xy;
|
|
reg_tmp7.xy = (uniforms.f[66 + address_registers.y].wxxx).xy;
|
|
return false;
|
|
}
|
|
bool sub_17() {
|
|
reg_tmp5.xy = (uniforms.f[64 + address_registers.y].yxxx).xy;
|
|
reg_tmp6.xy = (uniforms.f[65 + address_registers.y].yxxx).xy;
|
|
reg_tmp7.xy = (uniforms.f[66 + address_registers.y].yxxx).xy;
|
|
return false;
|
|
}
|
|
bool sub_18() {
|
|
conditional_code = notEqual(uniforms.f[5].xx, reg_tmp1.xy);
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_19();
|
|
}
|
|
if (all(bvec2(!conditional_code.x, conditional_code.y))) {
|
|
sub_20();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_19() {
|
|
reg_tmp5.xy = (uniforms.f[67 + address_registers.y].yxxx).xy;
|
|
reg_tmp6.xy = (uniforms.f[68 + address_registers.y].yxxx).xy;
|
|
reg_tmp7.xy = (uniforms.f[69 + address_registers.y].yxxx).xy;
|
|
return false;
|
|
}
|
|
bool sub_20() {
|
|
reg_tmp5.xy = (uniforms.f[67 + address_registers.y].wzzz).xy;
|
|
reg_tmp6.xy = (uniforms.f[68 + address_registers.y].wzzz).xy;
|
|
reg_tmp7.xy = (uniforms.f[69 + address_registers.y].wzzz).xy;
|
|
return false;
|
|
}
|
|
// reference: FDD61A83E59F75D4, AD35AAAFFE2E55A4
|
|
// shader: 8DD9, 1C4CBC8096EA16CD
|
|
|
|
layout(triangles) in;
|
|
layout(triangle_strip, max_vertices = 3) out;
|
|
|
|
out vec4 primary_color;
|
|
out vec2 texcoord0;
|
|
out vec2 texcoord1;
|
|
out vec2 texcoord2;
|
|
out float texcoord0_w;
|
|
out vec4 normquat;
|
|
out vec3 view;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
in vec4 vs_out_attr0[];
|
|
in vec4 vs_out_attr1[];
|
|
in vec4 vs_out_attr2[];
|
|
in vec4 vs_out_attr3[];
|
|
in vec4 vs_out_attr4[];
|
|
struct Vertex {
|
|
vec4 attributes[5];
|
|
};
|
|
|
|
vec4 GetVertexQuaternion(Vertex vtx) {
|
|
return vec4(0.0, 0.0, 0.0, 0.0);
|
|
}
|
|
|
|
void EmitVtx(Vertex vtx, bool quats_opposite) {
|
|
vec4 vtx_pos = vec4(vtx.attributes[0].x, vtx.attributes[0].y, vtx.attributes[0].z, vtx.attributes[0].w);
|
|
gl_Position = vtx_pos;
|
|
#if !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
gl_ClipDistance[0] = -vtx_pos.z;
|
|
gl_ClipDistance[1] = dot(clip_coef, vtx_pos);
|
|
#endif // !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
|
|
vec4 vtx_quat = GetVertexQuaternion(vtx);
|
|
normquat = mix(vtx_quat, -vtx_quat, bvec4(quats_opposite));
|
|
|
|
vec4 vtx_color = vec4(vtx.attributes[1].x, vtx.attributes[1].y, vtx.attributes[1].z, vtx.attributes[1].w);
|
|
primary_color = min(abs(vtx_color), vec4(1.0));
|
|
|
|
texcoord0 = vec2(vtx.attributes[2].x, vtx.attributes[2].y);
|
|
texcoord1 = vec2(vtx.attributes[3].x, vtx.attributes[3].y);
|
|
|
|
texcoord0_w = 0.0;
|
|
view = vec3(0.0, 0.0, 0.0);
|
|
texcoord2 = vec2(vtx.attributes[4].x, vtx.attributes[4].y);
|
|
|
|
EmitVertex();
|
|
}
|
|
|
|
bool AreQuaternionsOpposite(vec4 qa, vec4 qb) {
|
|
return (dot(qa, qb) < 0.0);
|
|
}
|
|
|
|
void EmitPrim(Vertex vtx0, Vertex vtx1, Vertex vtx2) {
|
|
EmitVtx(vtx0, false);
|
|
EmitVtx(vtx1, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx1)));
|
|
EmitVtx(vtx2, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx2)));
|
|
EndPrimitive();
|
|
}
|
|
|
|
void main() {
|
|
Vertex prim_buffer[3];
|
|
prim_buffer[0].attributes = vec4[5](vs_out_attr0[0], vs_out_attr1[0], vs_out_attr2[0], vs_out_attr3[0], vs_out_attr4[0]);
|
|
prim_buffer[1].attributes = vec4[5](vs_out_attr0[1], vs_out_attr1[1], vs_out_attr2[1], vs_out_attr3[1], vs_out_attr4[1]);
|
|
prim_buffer[2].attributes = vec4[5](vs_out_attr0[2], vs_out_attr1[2], vs_out_attr2[2], vs_out_attr3[2], vs_out_attr4[2]);
|
|
EmitPrim(prim_buffer[0], prim_buffer[1], prim_buffer[2]);
|
|
}
|
|
// reference: 5DAD5699F59B3586, 1C4CBC8096EA16CD
|
|
// shader: 8B30, 5BE034A6DDC1A541
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (const_color[0].rgb);
|
|
float alpha_output_0 = (const_color[0].a);
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 2EA60C875715417D, 5BE034A6DDC1A541
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 5BE034A6DDC1A541
|
|
// reference: B382E5C3666A13A6, AD35AAAFFE2E55A4
|
|
// shader: 8B30, BB44F2152BA0C50B
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (const_color[0].rgb);
|
|
float alpha_output_0 = (const_color[0].a);
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 2EA60C8719EDC867, BB44F2152BA0C50B
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, BB44F2152BA0C50B
|
|
// shader: 8B30, DEFA7038414DC454
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (const_color[0].rgb);
|
|
float alpha_output_0 = (const_color[0].a);
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: E13EE878D6EA57C7, DEFA7038414DC454
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, DEFA7038414DC454
|
|
// shader: 8B30, 5F0CA7C5F9ADEB35
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (const_color[0].rgb);
|
|
float alpha_output_0 = (const_color[0].a);
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 924C0629D6EA57C7, 5F0CA7C5F9ADEB35
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 5F0CA7C5F9ADEB35
|
|
// shader: 8B30, 9659761A0FCC8B7F
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (const_color[0].rgb);
|
|
float alpha_output_0 = (const_color[0].a);
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 924C06299812DEDD, 9659761A0FCC8B7F
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 9659761A0FCC8B7F
|
|
// shader: 8B30, ED8AC139393115F8
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (const_color[0].rgb);
|
|
float alpha_output_0 = (const_color[0].a);
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].aaa) + (texcolor1.rgb) * (vec3(1.0) - (const_color[3].aaa)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a) + (texcolor1.a) * (1.0 - (const_color[3].a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: C2474A94277AD4BD, ED8AC139393115F8
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, ED8AC139393115F8
|
|
// shader: 8B31, B4D7345E1C3DEF57
|
|
|
|
#define mul_s(x, y) mix(x * y, vec4(0.0), isnan(x * y))
|
|
#define fma_s(x, y, z) (mix(x * y, vec4(0.0), isnan(x * y)) + z)
|
|
float rcp_s(float x) {
|
|
if (x == 0.0) return x;
|
|
return 1.0 / x;
|
|
}
|
|
float rsq_s(float x) {
|
|
if (x > 0.0) return inversesqrt(x);
|
|
return 0.0;
|
|
}
|
|
#define dot_s(x, y) dot(x, y)
|
|
#define dot_3(x, y) dot(x, y)
|
|
|
|
struct pica_uniforms {
|
|
bool b[16];
|
|
uvec4 i[4];
|
|
vec4 f[96];
|
|
};
|
|
|
|
bool exec_shader();
|
|
|
|
#define uniforms vs_uniforms
|
|
layout (std140) uniform vs_config {
|
|
pica_uniforms uniforms;
|
|
};
|
|
layout(location = 0) in vec4 vs_in_reg0;
|
|
layout(location = 1) in vec4 vs_in_reg1;
|
|
layout(location = 2) in vec4 vs_in_reg2;
|
|
|
|
out vec4 vs_out_attr0;
|
|
out vec4 vs_out_attr1;
|
|
out vec4 vs_out_attr2;
|
|
|
|
void main() {
|
|
vs_out_attr0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
exec_shader();
|
|
}
|
|
bvec2 conditional_code = bvec2(false);
|
|
ivec3 address_registers = ivec3(0);
|
|
vec4 reg_tmp0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp5 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp6 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp7 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp8 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp9 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp10 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp11 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp12 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp13 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp14 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp15 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
|
|
bool sub_0();
|
|
|
|
bool exec_shader() {
|
|
sub_0();
|
|
return true;
|
|
}
|
|
|
|
bool sub_0() {
|
|
reg_tmp13 = uniforms.f[10].xxxz;
|
|
reg_tmp12.x = (vs_in_reg0.wwww).x;
|
|
reg_tmp13.xyz = (vs_in_reg0.xyzz).xyz;
|
|
reg_tmp14.y = rcp_s(reg_tmp12.x);
|
|
reg_tmp14.x = (-uniforms.f[80].xxxx + reg_tmp12.xxxx).x;
|
|
reg_tmp14.z = (mul_s(reg_tmp14.xxxx, reg_tmp14.yyyy)).z;
|
|
reg_tmp13.x = (fma_s(reg_tmp14.zzzz, uniforms.f[80].yyyy, vs_in_reg0.xxxx)).x;
|
|
reg_tmp15 = reg_tmp13;
|
|
reg_tmp13.x = dot_s(uniforms.f[90], reg_tmp15);
|
|
reg_tmp13.y = dot_s(uniforms.f[91], reg_tmp15);
|
|
reg_tmp13.z = dot_s(uniforms.f[92], reg_tmp15);
|
|
vs_out_attr1 = vs_in_reg2;
|
|
vs_out_attr2 = vs_in_reg1.xyyy;
|
|
vs_out_attr0.x = dot_s(uniforms.f[86], reg_tmp13);
|
|
vs_out_attr0.y = dot_s(uniforms.f[87], reg_tmp13);
|
|
vs_out_attr0.z = dot_s(uniforms.f[88], reg_tmp13);
|
|
vs_out_attr0.w = dot_s(uniforms.f[89], reg_tmp13);
|
|
return true;
|
|
}
|
|
// reference: B050F430FBD100D6, B4D7345E1C3DEF57
|
|
// shader: 8DD9, 219384019281D7FD
|
|
|
|
layout(triangles) in;
|
|
layout(triangle_strip, max_vertices = 3) out;
|
|
|
|
out vec4 primary_color;
|
|
out vec2 texcoord0;
|
|
out vec2 texcoord1;
|
|
out vec2 texcoord2;
|
|
out float texcoord0_w;
|
|
out vec4 normquat;
|
|
out vec3 view;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
in vec4 vs_out_attr0[];
|
|
in vec4 vs_out_attr1[];
|
|
in vec4 vs_out_attr2[];
|
|
struct Vertex {
|
|
vec4 attributes[3];
|
|
};
|
|
|
|
vec4 GetVertexQuaternion(Vertex vtx) {
|
|
return vec4(0.0, 0.0, 0.0, 0.0);
|
|
}
|
|
|
|
void EmitVtx(Vertex vtx, bool quats_opposite) {
|
|
vec4 vtx_pos = vec4(vtx.attributes[0].x, vtx.attributes[0].y, vtx.attributes[0].z, vtx.attributes[0].w);
|
|
gl_Position = vtx_pos;
|
|
#if !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
gl_ClipDistance[0] = -vtx_pos.z;
|
|
gl_ClipDistance[1] = dot(clip_coef, vtx_pos);
|
|
#endif // !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
|
|
vec4 vtx_quat = GetVertexQuaternion(vtx);
|
|
normquat = mix(vtx_quat, -vtx_quat, bvec4(quats_opposite));
|
|
|
|
vec4 vtx_color = vec4(vtx.attributes[1].x, vtx.attributes[1].y, vtx.attributes[1].z, vtx.attributes[1].w);
|
|
primary_color = min(abs(vtx_color), vec4(1.0));
|
|
|
|
texcoord0 = vec2(vtx.attributes[2].x, vtx.attributes[2].y);
|
|
texcoord1 = vec2(0.0, 0.0);
|
|
|
|
texcoord0_w = 0.0;
|
|
view = vec3(0.0, 0.0, 0.0);
|
|
texcoord2 = vec2(0.0, 0.0);
|
|
|
|
EmitVertex();
|
|
}
|
|
|
|
bool AreQuaternionsOpposite(vec4 qa, vec4 qb) {
|
|
return (dot(qa, qb) < 0.0);
|
|
}
|
|
|
|
void EmitPrim(Vertex vtx0, Vertex vtx1, Vertex vtx2) {
|
|
EmitVtx(vtx0, false);
|
|
EmitVtx(vtx1, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx1)));
|
|
EmitVtx(vtx2, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx2)));
|
|
EndPrimitive();
|
|
}
|
|
|
|
void main() {
|
|
Vertex prim_buffer[3];
|
|
prim_buffer[0].attributes = vec4[3](vs_out_attr0[0], vs_out_attr1[0], vs_out_attr2[0]);
|
|
prim_buffer[1].attributes = vec4[3](vs_out_attr0[1], vs_out_attr1[1], vs_out_attr2[1]);
|
|
prim_buffer[2].attributes = vec4[3](vs_out_attr0[2], vs_out_attr1[2], vs_out_attr2[2]);
|
|
EmitPrim(prim_buffer[0], prim_buffer[1], prim_buffer[2]);
|
|
}
|
|
// reference: 7B07DA3E334A19B0, 219384019281D7FD
|
|
// shader: 8B30, 9A4719A519F0D3B1
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: CE312E68D7B0A07F, 9A4719A519F0D3B1
|
|
// program: B4D7345E1C3DEF57, 219384019281D7FD, 9A4719A519F0D3B1
|
|
// shader: 8B31, 697A254F4A9BF97A
|
|
|
|
#define mul_s(x, y) mix(x * y, vec4(0.0), isnan(x * y))
|
|
#define fma_s(x, y, z) (mix(x * y, vec4(0.0), isnan(x * y)) + z)
|
|
float rcp_s(float x) {
|
|
if (x == 0.0) return x;
|
|
return 1.0 / x;
|
|
}
|
|
float rsq_s(float x) {
|
|
if (x > 0.0) return inversesqrt(x);
|
|
return 0.0;
|
|
}
|
|
#define dot_s(x, y) dot(x, y)
|
|
#define dot_3(x, y) dot(x, y)
|
|
|
|
struct pica_uniforms {
|
|
bool b[16];
|
|
uvec4 i[4];
|
|
vec4 f[96];
|
|
};
|
|
|
|
bool exec_shader();
|
|
|
|
#define uniforms vs_uniforms
|
|
layout (std140) uniform vs_config {
|
|
pica_uniforms uniforms;
|
|
};
|
|
layout(location = 0) in vec4 vs_in_reg0;
|
|
layout(location = 1) in vec4 vs_in_reg1;
|
|
layout(location = 2) in vec4 vs_in_reg2;
|
|
layout(location = 3) in vec4 vs_in_reg3;
|
|
layout(location = 4) in vec4 vs_in_reg4;
|
|
layout(location = 5) in vec4 vs_in_reg5;
|
|
layout(location = 6) in vec4 vs_in_reg6;
|
|
layout(location = 7) in vec4 vs_in_reg7;
|
|
layout(location = 8) in vec4 vs_in_reg8;
|
|
|
|
out vec4 vs_out_attr0;
|
|
out vec4 vs_out_attr1;
|
|
out vec4 vs_out_attr2;
|
|
out vec4 vs_out_attr3;
|
|
out vec4 vs_out_attr4;
|
|
|
|
void main() {
|
|
vs_out_attr0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
exec_shader();
|
|
}
|
|
bvec2 conditional_code = bvec2(false);
|
|
ivec3 address_registers = ivec3(0);
|
|
vec4 reg_tmp0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp5 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp6 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp7 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp8 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp9 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp10 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp11 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp12 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp13 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp14 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp15 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
|
|
bool sub_22();
|
|
bool sub_4();
|
|
bool sub_10();
|
|
bool sub_1();
|
|
bool sub_2();
|
|
bool sub_3();
|
|
bool sub_5();
|
|
bool sub_8();
|
|
bool sub_9();
|
|
bool sub_11();
|
|
bool sub_21();
|
|
bool sub_23();
|
|
bool sub_24();
|
|
bool sub_25();
|
|
bool sub_26();
|
|
bool sub_27();
|
|
bool sub_28();
|
|
bool sub_29();
|
|
bool sub_30();
|
|
bool sub_31();
|
|
bool sub_32();
|
|
bool sub_6();
|
|
bool sub_7();
|
|
bool sub_12();
|
|
bool sub_13();
|
|
bool sub_14();
|
|
bool sub_15();
|
|
bool sub_16();
|
|
bool sub_17();
|
|
bool sub_18();
|
|
bool sub_19();
|
|
bool sub_20();
|
|
bool sub_33();
|
|
bool sub_34();
|
|
bool sub_35();
|
|
bool sub_38();
|
|
bool sub_36();
|
|
bool sub_37();
|
|
bool sub_39();
|
|
bool sub_40();
|
|
bool sub_46();
|
|
bool sub_47();
|
|
bool sub_48();
|
|
bool sub_49();
|
|
bool sub_51();
|
|
bool sub_41();
|
|
bool sub_42();
|
|
bool sub_43();
|
|
bool sub_44();
|
|
bool sub_45();
|
|
bool sub_50();
|
|
bool sub_52();
|
|
bool sub_0();
|
|
|
|
bool exec_shader() {
|
|
sub_0();
|
|
return true;
|
|
}
|
|
|
|
bool sub_22() {
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp3.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp7 = fma_s(reg_tmp1.wwww, reg_tmp3, reg_tmp7);
|
|
return false;
|
|
}
|
|
bool sub_4() {
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp3.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp4.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp7 = fma_s(reg_tmp1.wwww, reg_tmp3, reg_tmp7);
|
|
reg_tmp12 = fma_s(reg_tmp1.wwww, reg_tmp4, reg_tmp12);
|
|
return false;
|
|
}
|
|
bool sub_10() {
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp3.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp4.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp5.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp5.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp5.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp7 = fma_s(reg_tmp1.wwww, reg_tmp3, reg_tmp7);
|
|
reg_tmp12 = fma_s(reg_tmp1.wwww, reg_tmp4, reg_tmp12);
|
|
reg_tmp11 = fma_s(reg_tmp1.wwww, reg_tmp5, reg_tmp11);
|
|
return false;
|
|
}
|
|
bool sub_1() {
|
|
reg_tmp15.xyz = (mul_s(uniforms.f[7].xxxx, vs_in_reg0)).xyz;
|
|
reg_tmp14.xyz = (mul_s(uniforms.f[7].yyyy, vs_in_reg1)).xyz;
|
|
reg_tmp13.xyz = (mul_s(uniforms.f[7].zzzz, vs_in_reg2)).xyz;
|
|
reg_tmp15.xyz = (uniforms.f[6] + reg_tmp15).xyz;
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
if (uniforms.b[1]) {
|
|
sub_2();
|
|
} else {
|
|
sub_25();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_2() {
|
|
reg_tmp0 = uniforms.f[7];
|
|
conditional_code = notEqual(uniforms.f[93].xx, reg_tmp0.yz);
|
|
reg_tmp7 = uniforms.f[93].xxxx;
|
|
reg_tmp12 = uniforms.f[93].xxxx;
|
|
reg_tmp11 = uniforms.f[93].xxxx;
|
|
reg_tmp2 = mul_s(uniforms.f[93].wwww, vs_in_reg7);
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_3();
|
|
} else {
|
|
sub_8();
|
|
}
|
|
vs_out_attr2 = -reg_tmp15;
|
|
reg_tmp0.x = dot_s(uniforms.f[86], reg_tmp15);
|
|
reg_tmp0.y = dot_s(uniforms.f[87], reg_tmp15);
|
|
reg_tmp0.z = dot_s(uniforms.f[88], reg_tmp15);
|
|
reg_tmp0.w = dot_s(uniforms.f[89], reg_tmp15);
|
|
reg_tmp1.x = (-reg_tmp0.wwww).x;
|
|
reg_tmp1.y = (mul_s(uniforms.f[95].zzzz, -reg_tmp0.wwww)).y;
|
|
conditional_code.x = reg_tmp0.xxxx.x > reg_tmp1.xyyy.x;
|
|
conditional_code.y = reg_tmp0.xxxx.y < reg_tmp1.xyyy.y;
|
|
if (all(conditional_code)) {
|
|
sub_24();
|
|
}
|
|
vs_out_attr0 = reg_tmp0;
|
|
return false;
|
|
}
|
|
bool sub_3() {
|
|
conditional_code = notEqual(uniforms.f[93].xx, vs_in_reg8.zw);
|
|
reg_tmp1.xy = (reg_tmp2.xxxx).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.xxxx)).w;
|
|
{
|
|
sub_4();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.yyyy).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.yyyy)).w;
|
|
{
|
|
sub_4();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.zzzz).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.zzzz)).w;
|
|
if (conditional_code.x) {
|
|
sub_4();
|
|
}
|
|
if (uniforms.b[8]) {
|
|
sub_5();
|
|
}
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
{
|
|
sub_6();
|
|
}
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
{
|
|
sub_7();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_5() {
|
|
reg_tmp1.xy = (reg_tmp2.wwww).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.wwww)).w;
|
|
if (conditional_code.y) {
|
|
sub_4();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_8() {
|
|
if (all(conditional_code)) {
|
|
sub_9();
|
|
} else {
|
|
sub_21();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_9() {
|
|
conditional_code = notEqual(uniforms.f[93].xx, vs_in_reg8.zw);
|
|
reg_tmp1.xy = (reg_tmp2.xxxx).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.xxxx)).w;
|
|
{
|
|
sub_10();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.yyyy).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.yyyy)).w;
|
|
{
|
|
sub_10();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.zzzz).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.zzzz)).w;
|
|
if (conditional_code.x) {
|
|
sub_10();
|
|
}
|
|
if (uniforms.b[8]) {
|
|
sub_11();
|
|
}
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
{
|
|
sub_6();
|
|
}
|
|
reg_tmp13.x = dot_3(uniforms.f[3].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.y = dot_3(uniforms.f[4].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.z = dot_3(uniforms.f[5].xyz, reg_tmp11.xyz);
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
{
|
|
sub_12();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_11() {
|
|
reg_tmp1.xy = (reg_tmp2.wwww).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.wwww)).w;
|
|
if (conditional_code.y) {
|
|
sub_10();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_21() {
|
|
conditional_code = notEqual(uniforms.f[93].xx, vs_in_reg8.zw);
|
|
reg_tmp1.xy = (reg_tmp2.xxxx).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.xxxx)).w;
|
|
{
|
|
sub_22();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.yyyy).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.yyyy)).w;
|
|
{
|
|
sub_22();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.zzzz).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.zzzz)).w;
|
|
if (conditional_code.x) {
|
|
sub_22();
|
|
}
|
|
if (uniforms.b[8]) {
|
|
sub_23();
|
|
}
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
vs_out_attr1 = uniforms.f[93].xxxx;
|
|
return false;
|
|
}
|
|
bool sub_23() {
|
|
reg_tmp1.xy = (reg_tmp2.wwww).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.wwww)).w;
|
|
if (conditional_code.y) {
|
|
sub_22();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_24() {
|
|
reg_tmp0.x = (-reg_tmp0.wwww).x;
|
|
return false;
|
|
}
|
|
bool sub_25() {
|
|
reg_tmp0 = uniforms.f[7];
|
|
conditional_code = notEqual(uniforms.f[93].xx, reg_tmp0.yz);
|
|
if (uniforms.b[2]) {
|
|
sub_26();
|
|
} else {
|
|
sub_27();
|
|
}
|
|
{
|
|
sub_6();
|
|
}
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_28();
|
|
} else {
|
|
sub_29();
|
|
}
|
|
vs_out_attr2 = -reg_tmp15;
|
|
reg_tmp0.x = dot_s(uniforms.f[86], reg_tmp15);
|
|
reg_tmp0.y = dot_s(uniforms.f[87], reg_tmp15);
|
|
reg_tmp0.z = dot_s(uniforms.f[88], reg_tmp15);
|
|
reg_tmp0.w = dot_s(uniforms.f[89], reg_tmp15);
|
|
reg_tmp1.x = (-reg_tmp0.wwww).x;
|
|
reg_tmp1.y = (mul_s(uniforms.f[95].zzzz, -reg_tmp0.wwww)).y;
|
|
conditional_code.x = reg_tmp0.xxxx.x > reg_tmp1.xyyy.x;
|
|
conditional_code.y = reg_tmp0.xxxx.y < reg_tmp1.xyyy.y;
|
|
if (all(conditional_code)) {
|
|
sub_32();
|
|
}
|
|
vs_out_attr0 = reg_tmp0;
|
|
return false;
|
|
}
|
|
bool sub_26() {
|
|
reg_tmp1.x = (mul_s(uniforms.f[93].wwww, vs_in_reg7.xxxx)).x;
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp7.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp7.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp7.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
return false;
|
|
}
|
|
bool sub_27() {
|
|
address_registers.x = (ivec2(uniforms.f[93].xx)).x;
|
|
reg_tmp10.x = dot_s(uniforms.f[25], reg_tmp15);
|
|
reg_tmp10.y = dot_s(uniforms.f[26], reg_tmp15);
|
|
reg_tmp10.z = dot_s(uniforms.f[27], reg_tmp15);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
return false;
|
|
}
|
|
bool sub_28() {
|
|
reg_tmp12.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
{
|
|
sub_7();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_29() {
|
|
if (all(conditional_code)) {
|
|
sub_30();
|
|
} else {
|
|
sub_31();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_30() {
|
|
reg_tmp12.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp11.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp11.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp11.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
reg_tmp13.x = dot_3(uniforms.f[3].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.y = dot_3(uniforms.f[4].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.z = dot_3(uniforms.f[5].xyz, reg_tmp11.xyz);
|
|
{
|
|
sub_12();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_31() {
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
vs_out_attr1 = uniforms.f[93].xxxx;
|
|
return false;
|
|
}
|
|
bool sub_32() {
|
|
reg_tmp0.x = (-reg_tmp0.wwww).x;
|
|
return false;
|
|
}
|
|
bool sub_6() {
|
|
reg_tmp0.x = (uniforms.f[81].xxxx + reg_tmp10.zzzz).x;
|
|
reg_tmp1.x = rcp_s(reg_tmp0.x);
|
|
reg_tmp1.y = (-uniforms.f[80].xxxx + reg_tmp0.xxxx).y;
|
|
reg_tmp1.z = (mul_s(reg_tmp1.xxxx, reg_tmp1.yyyy)).z;
|
|
reg_tmp10.x = (fma_s(reg_tmp1.zzzz, uniforms.f[80].yyyy, reg_tmp10.xxxx)).x;
|
|
return false;
|
|
}
|
|
bool sub_7() {
|
|
uint jmp_to = 222u;
|
|
while (true) {
|
|
switch (jmp_to) {
|
|
case 222u: {
|
|
reg_tmp6.x = dot_3(reg_tmp14.xyz, reg_tmp14.xyz);
|
|
reg_tmp7.x = dot_3(reg_tmp12.xyz, reg_tmp12.xyz);
|
|
reg_tmp6.x = rsq_s(reg_tmp6.x);
|
|
reg_tmp7.x = rsq_s(reg_tmp7.x);
|
|
reg_tmp14.xyz = (mul_s(reg_tmp14.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp12.xyz = (mul_s(reg_tmp12.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp0 = uniforms.f[93].yxxx;
|
|
if (!uniforms.b[15]) {
|
|
{ jmp_to = 238u; break; }
|
|
}
|
|
reg_tmp4 = uniforms.f[93].yyyy + reg_tmp14.zzzz;
|
|
reg_tmp4 = mul_s(uniforms.f[94].zzzz, reg_tmp4);
|
|
conditional_code = greaterThanEqual(uniforms.f[93].xx, reg_tmp4.xx);
|
|
reg_tmp4 = vec4(rsq_s(reg_tmp4.x));
|
|
reg_tmp5 = mul_s(uniforms.f[94].zzzz, reg_tmp14);
|
|
if (conditional_code.x) {
|
|
{ jmp_to = 238u; break; }
|
|
}
|
|
reg_tmp0.z = rcp_s(reg_tmp4.x);
|
|
reg_tmp0.xy = (mul_s(reg_tmp5, reg_tmp4)).xy;
|
|
}
|
|
case 238u: {
|
|
vs_out_attr1 = reg_tmp0;
|
|
}
|
|
default: return false;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_12() {
|
|
uint jmp_to = 239u;
|
|
while (true) {
|
|
switch (jmp_to) {
|
|
case 239u: {
|
|
reg_tmp6.x = dot_3(reg_tmp14.xyz, reg_tmp14.xyz);
|
|
reg_tmp7.x = dot_3(reg_tmp12.xyz, reg_tmp12.xyz);
|
|
reg_tmp6.x = rsq_s(reg_tmp6.x);
|
|
reg_tmp7.x = rsq_s(reg_tmp7.x);
|
|
reg_tmp14.xyz = (mul_s(reg_tmp14.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp12.xyz = (mul_s(reg_tmp12.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp13.xyz = (mul_s(reg_tmp13.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp11.xyz = (mul_s(reg_tmp11.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp0 = uniforms.f[93].yxxx;
|
|
if (!uniforms.b[15]) {
|
|
{ jmp_to = 314u; break; }
|
|
}
|
|
reg_tmp13.xyz = (mul_s(reg_tmp13.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp11.xyz = (mul_s(reg_tmp11.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp5 = mul_s(reg_tmp14.yzxx, reg_tmp13.zxyy);
|
|
reg_tmp5 = fma_s(-reg_tmp13.yzxx, reg_tmp14.zxyy, reg_tmp5);
|
|
reg_tmp5.w = dot_3(reg_tmp5.xyz, reg_tmp5.xyz);
|
|
reg_tmp5.w = rsq_s(reg_tmp5.w);
|
|
reg_tmp5 = mul_s(reg_tmp5, reg_tmp5.wwww);
|
|
reg_tmp6.w = (reg_tmp14.zzzz + reg_tmp5.yyyy).w;
|
|
reg_tmp13 = mul_s(reg_tmp5.yzxx, reg_tmp14.zxyy);
|
|
reg_tmp13 = fma_s(-reg_tmp14.yzxx, reg_tmp5.zxyy, reg_tmp13);
|
|
reg_tmp6.w = (reg_tmp13.xxxx + reg_tmp6).w;
|
|
reg_tmp13.w = (reg_tmp5.zzzz).w;
|
|
reg_tmp5.z = (reg_tmp13.xxxx).z;
|
|
reg_tmp6.w = (uniforms.f[93].yyyy + reg_tmp6).w;
|
|
reg_tmp14.w = (reg_tmp5.xxxx).w;
|
|
reg_tmp5.x = (reg_tmp14.zzzz).x;
|
|
conditional_code = lessThan(uniforms.f[94].yy, reg_tmp6.ww);
|
|
reg_tmp6.x = (uniforms.f[93].yyyy).x;
|
|
reg_tmp6.y = (-uniforms.f[93].yyyy).y;
|
|
if (!conditional_code.x) {
|
|
{ jmp_to = 276u; break; }
|
|
}
|
|
reg_tmp7.xz = (reg_tmp13.wwyy + -reg_tmp14.yyww).xz;
|
|
reg_tmp7.y = (reg_tmp14.xxxx + -reg_tmp13.zzzz).y;
|
|
reg_tmp7.w = (reg_tmp6).w;
|
|
reg_tmp6 = vec4(dot_s(reg_tmp7, reg_tmp7));
|
|
reg_tmp6 = vec4(rsq_s(reg_tmp6.x));
|
|
reg_tmp0 = mul_s(reg_tmp7, reg_tmp6);
|
|
if (uniforms.b[0]) {
|
|
{ jmp_to = 314u; break; }
|
|
}
|
|
}
|
|
case 276u: {
|
|
conditional_code = greaterThan(reg_tmp5.zy, reg_tmp5.yx);
|
|
if (conditional_code.x) {
|
|
sub_13();
|
|
} else {
|
|
sub_18();
|
|
}
|
|
reg_tmp6 = vec4(dot_s(reg_tmp8, reg_tmp8));
|
|
reg_tmp6 = vec4(rsq_s(reg_tmp6.x));
|
|
reg_tmp0 = mul_s(reg_tmp8, reg_tmp6);
|
|
}
|
|
case 314u: {
|
|
vs_out_attr1 = reg_tmp0;
|
|
}
|
|
default: return false;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_13() {
|
|
if (conditional_code.y) {
|
|
sub_14();
|
|
} else {
|
|
sub_15();
|
|
}
|
|
reg_tmp8.w = (-reg_tmp8).w;
|
|
return false;
|
|
}
|
|
bool sub_14() {
|
|
reg_tmp8 = mul_s(reg_tmp13.yyzw, reg_tmp6.xxxy);
|
|
reg_tmp8.x = (uniforms.f[93].yyyy + -reg_tmp5.yyyy).x;
|
|
reg_tmp9 = reg_tmp5.zzzz + -reg_tmp5.xxxx;
|
|
reg_tmp8.yzw = (reg_tmp8 + reg_tmp14.wwxy).yzw;
|
|
reg_tmp8.x = (reg_tmp9 + reg_tmp8).x;
|
|
return false;
|
|
}
|
|
bool sub_15() {
|
|
conditional_code = greaterThan(reg_tmp5.zz, reg_tmp5.xx);
|
|
reg_tmp8 = mul_s(reg_tmp13.yyzw, reg_tmp6.xxxy);
|
|
reg_tmp8.x = (uniforms.f[93].yyyy + -reg_tmp5.yyyy).x;
|
|
if (conditional_code.x) {
|
|
sub_16();
|
|
} else {
|
|
sub_17();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_16() {
|
|
reg_tmp9 = reg_tmp5.zzzz + -reg_tmp5.xxxx;
|
|
reg_tmp8.yzw = (reg_tmp8 + reg_tmp14.wwxy).yzw;
|
|
reg_tmp8.x = (reg_tmp9 + reg_tmp8).x;
|
|
return false;
|
|
}
|
|
bool sub_17() {
|
|
reg_tmp8 = mul_s(reg_tmp13.zwwy, reg_tmp6.xxxy);
|
|
reg_tmp8.z = (uniforms.f[93].yyyy + -reg_tmp5.zzzz).z;
|
|
reg_tmp9 = reg_tmp5.xxxx + -reg_tmp5.yyyy;
|
|
reg_tmp8.xyw = (reg_tmp8 + reg_tmp14.xyyw).xyw;
|
|
reg_tmp8.z = (reg_tmp9 + reg_tmp8).z;
|
|
return false;
|
|
}
|
|
bool sub_18() {
|
|
if (conditional_code.y) {
|
|
sub_19();
|
|
} else {
|
|
sub_20();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_19() {
|
|
reg_tmp8 = mul_s(reg_tmp13.yywz, reg_tmp6.xxxy);
|
|
reg_tmp8.y = (uniforms.f[93].yyyy + -reg_tmp5.zzzz).y;
|
|
reg_tmp9 = reg_tmp5.yyyy + -reg_tmp5.xxxx;
|
|
reg_tmp8.xzw = (reg_tmp8 + reg_tmp14.wwyx).xzw;
|
|
reg_tmp8.y = (reg_tmp9 + reg_tmp8).y;
|
|
return false;
|
|
}
|
|
bool sub_20() {
|
|
reg_tmp8 = mul_s(reg_tmp13.zwwy, reg_tmp6.xxxy);
|
|
reg_tmp8.z = (uniforms.f[93].yyyy + -reg_tmp5.zzzz).z;
|
|
reg_tmp9 = reg_tmp5.xxxx + -reg_tmp5.yyyy;
|
|
reg_tmp8.xyw = (reg_tmp8 + reg_tmp14.xyyw).xyw;
|
|
reg_tmp8.z = (reg_tmp9 + reg_tmp8).z;
|
|
reg_tmp8.w = (-reg_tmp8).w;
|
|
return false;
|
|
}
|
|
bool sub_33() {
|
|
reg_tmp8.xy = (uniforms.f[93].xxxx).xy;
|
|
reg_tmp0.y = (uniforms.f[7].wwww).y;
|
|
conditional_code = notEqual(uniforms.f[93].xx, reg_tmp0.xy);
|
|
reg_tmp9.xyz = (uniforms.f[93].xxxx).xyz;
|
|
reg_tmp9.w = (uniforms.f[21].wwww).w;
|
|
if (conditional_code.y) {
|
|
sub_34();
|
|
}
|
|
if (uniforms.b[5]) {
|
|
sub_36();
|
|
}
|
|
conditional_code = equal(uniforms.f[93].xx, reg_tmp8.xy);
|
|
if (all(conditional_code)) {
|
|
sub_38();
|
|
}
|
|
vs_out_attr3 = max(uniforms.f[93].xxxx, reg_tmp9);
|
|
return false;
|
|
}
|
|
bool sub_34() {
|
|
reg_tmp0 = mul_s(uniforms.f[7].wwww, vs_in_reg3);
|
|
if (uniforms.b[7]) {
|
|
sub_35();
|
|
}
|
|
reg_tmp9.xyz = (mul_s(uniforms.f[20].wwww, reg_tmp0.xyzz)).xyz;
|
|
reg_tmp8.x = (uniforms.f[93].yyyy).x;
|
|
return false;
|
|
}
|
|
bool sub_35() {
|
|
reg_tmp9.w = (mul_s(reg_tmp9.wwww, reg_tmp0.wwww)).w;
|
|
return false;
|
|
}
|
|
bool sub_38() {
|
|
reg_tmp9 = uniforms.f[21];
|
|
return false;
|
|
}
|
|
bool sub_36() {
|
|
reg_tmp1 = vec4(dot_3(uniforms.f[24].xyz, reg_tmp14.xyz));
|
|
reg_tmp2 = uniforms.f[24].wwww;
|
|
reg_tmp1 = fma_s(reg_tmp1, reg_tmp2, reg_tmp2);
|
|
reg_tmp3 = uniforms.f[22];
|
|
reg_tmp2 = uniforms.f[23] + -reg_tmp3;
|
|
reg_tmp4 = fma_s(reg_tmp2, reg_tmp1, reg_tmp3);
|
|
if (uniforms.b[6]) {
|
|
sub_37();
|
|
}
|
|
reg_tmp9.xyz = (fma_s(reg_tmp4, uniforms.f[21], reg_tmp9)).xyz;
|
|
reg_tmp8.x = (uniforms.f[93].yyyy).x;
|
|
return false;
|
|
}
|
|
bool sub_37() {
|
|
reg_tmp4 = mul_s(reg_tmp4, reg_tmp9.wwww);
|
|
return false;
|
|
}
|
|
bool sub_39() {
|
|
reg_tmp0.xy = (uniforms.f[10].xxxx).xy;
|
|
if (uniforms.b[9]) {
|
|
sub_40();
|
|
} else {
|
|
sub_46();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_40() {
|
|
{
|
|
sub_41();
|
|
}
|
|
reg_tmp3.x = dot_s(uniforms.f[11].xywz, reg_tmp6);
|
|
reg_tmp3.y = dot_s(uniforms.f[12].xywz, reg_tmp6);
|
|
reg_tmp3.zw = (uniforms.f[93].xxxx).zw;
|
|
vs_out_attr4 = reg_tmp3;
|
|
return false;
|
|
}
|
|
bool sub_46() {
|
|
conditional_code = equal(uniforms.f[95].xy, reg_tmp0.xy);
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
if (all(not(conditional_code))) {
|
|
sub_47();
|
|
} else {
|
|
sub_48();
|
|
}
|
|
vs_out_attr4 = reg_tmp3;
|
|
return false;
|
|
}
|
|
bool sub_47() {
|
|
reg_tmp6 = reg_tmp10;
|
|
reg_tmp3.x = dot_s(uniforms.f[11], reg_tmp6);
|
|
reg_tmp3.y = dot_s(uniforms.f[12], reg_tmp6);
|
|
reg_tmp3.z = dot_s(uniforms.f[13], reg_tmp6);
|
|
reg_tmp0.xy = (mul_s(uniforms.f[19].xyyy, reg_tmp3.zzzz)).xy;
|
|
reg_tmp3.xy = (reg_tmp3.xyyy + reg_tmp0.xyyy).xy;
|
|
return false;
|
|
}
|
|
bool sub_48() {
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_49();
|
|
} else {
|
|
sub_51();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_49() {
|
|
{
|
|
sub_50();
|
|
}
|
|
reg_tmp3.x = dot_3(uniforms.f[11].xyz, reg_tmp6.xyz);
|
|
reg_tmp3.y = dot_3(uniforms.f[12].xyz, reg_tmp6.xyz);
|
|
reg_tmp3.z = dot_3(uniforms.f[13].xyz, reg_tmp6.xyz);
|
|
return false;
|
|
}
|
|
bool sub_51() {
|
|
{
|
|
sub_52();
|
|
}
|
|
reg_tmp3.x = dot_s(uniforms.f[11], reg_tmp6);
|
|
reg_tmp3.y = dot_s(uniforms.f[12], reg_tmp6);
|
|
return false;
|
|
}
|
|
bool sub_41() {
|
|
conditional_code = equal(uniforms.f[93].yz, reg_tmp0.xy);
|
|
if (all(not(conditional_code))) {
|
|
sub_42();
|
|
} else {
|
|
sub_43();
|
|
}
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
return false;
|
|
}
|
|
bool sub_42() {
|
|
reg_tmp6.xy = (mul_s(uniforms.f[8].xxxx, vs_in_reg4.xyyy)).xy;
|
|
return false;
|
|
}
|
|
bool sub_43() {
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_44();
|
|
} else {
|
|
sub_45();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_44() {
|
|
reg_tmp6.xy = (mul_s(uniforms.f[8].yyyy, vs_in_reg5.xyyy)).xy;
|
|
return false;
|
|
}
|
|
bool sub_45() {
|
|
reg_tmp6.xy = (mul_s(uniforms.f[8].zzzz, vs_in_reg6.xyyy)).xy;
|
|
return false;
|
|
}
|
|
bool sub_50() {
|
|
reg_tmp2 = -reg_tmp15;
|
|
reg_tmp2.w = dot_3(reg_tmp2.xyz, reg_tmp2.xyz);
|
|
reg_tmp2.w = rsq_s(reg_tmp2.w);
|
|
reg_tmp2 = mul_s(reg_tmp2, reg_tmp2.wwww);
|
|
reg_tmp1 = vec4(dot_3(reg_tmp2.xyz, reg_tmp14.xyz));
|
|
reg_tmp1 = reg_tmp1 + reg_tmp1;
|
|
reg_tmp6 = fma_s(reg_tmp1, reg_tmp14, -reg_tmp2);
|
|
return false;
|
|
}
|
|
bool sub_52() {
|
|
reg_tmp1.xy = (uniforms.f[94].zzzz).xy;
|
|
reg_tmp1.zw = (uniforms.f[93].xxxx).zw;
|
|
reg_tmp6 = fma_s(reg_tmp14, reg_tmp1, reg_tmp1);
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
return false;
|
|
}
|
|
bool sub_0() {
|
|
{
|
|
sub_1();
|
|
}
|
|
{
|
|
sub_33();
|
|
}
|
|
{
|
|
sub_39();
|
|
}
|
|
return true;
|
|
}
|
|
// reference: D829DB90B077BCA6, 697A254F4A9BF97A
|
|
// shader: 8DD9, D7255673101445A5
|
|
|
|
layout(triangles) in;
|
|
layout(triangle_strip, max_vertices = 3) out;
|
|
|
|
out vec4 primary_color;
|
|
out vec2 texcoord0;
|
|
out vec2 texcoord1;
|
|
out vec2 texcoord2;
|
|
out float texcoord0_w;
|
|
out vec4 normquat;
|
|
out vec3 view;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
in vec4 vs_out_attr0[];
|
|
in vec4 vs_out_attr1[];
|
|
in vec4 vs_out_attr2[];
|
|
in vec4 vs_out_attr3[];
|
|
in vec4 vs_out_attr4[];
|
|
struct Vertex {
|
|
vec4 attributes[5];
|
|
};
|
|
|
|
vec4 GetVertexQuaternion(Vertex vtx) {
|
|
return vec4(vtx.attributes[1].x, vtx.attributes[1].y, vtx.attributes[1].z, vtx.attributes[1].w);
|
|
}
|
|
|
|
void EmitVtx(Vertex vtx, bool quats_opposite) {
|
|
vec4 vtx_pos = vec4(vtx.attributes[0].x, vtx.attributes[0].y, vtx.attributes[0].z, vtx.attributes[0].w);
|
|
gl_Position = vtx_pos;
|
|
#if !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
gl_ClipDistance[0] = -vtx_pos.z;
|
|
gl_ClipDistance[1] = dot(clip_coef, vtx_pos);
|
|
#endif // !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
|
|
vec4 vtx_quat = GetVertexQuaternion(vtx);
|
|
normquat = mix(vtx_quat, -vtx_quat, bvec4(quats_opposite));
|
|
|
|
vec4 vtx_color = vec4(vtx.attributes[3].x, vtx.attributes[3].y, vtx.attributes[3].z, vtx.attributes[3].w);
|
|
primary_color = min(abs(vtx_color), vec4(1.0));
|
|
|
|
texcoord0 = vec2(vtx.attributes[4].x, vtx.attributes[4].y);
|
|
texcoord1 = vec2(0.0, 0.0);
|
|
|
|
texcoord0_w = vtx.attributes[4].z;
|
|
view = vec3(vtx.attributes[2].x, vtx.attributes[2].y, vtx.attributes[2].z);
|
|
texcoord2 = vec2(0.0, 0.0);
|
|
|
|
EmitVertex();
|
|
}
|
|
|
|
bool AreQuaternionsOpposite(vec4 qa, vec4 qb) {
|
|
return (dot(qa, qb) < 0.0);
|
|
}
|
|
|
|
void EmitPrim(Vertex vtx0, Vertex vtx1, Vertex vtx2) {
|
|
EmitVtx(vtx0, false);
|
|
EmitVtx(vtx1, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx1)));
|
|
EmitVtx(vtx2, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx2)));
|
|
EndPrimitive();
|
|
}
|
|
|
|
void main() {
|
|
Vertex prim_buffer[3];
|
|
prim_buffer[0].attributes = vec4[5](vs_out_attr0[0], vs_out_attr1[0], vs_out_attr2[0], vs_out_attr3[0], vs_out_attr4[0]);
|
|
prim_buffer[1].attributes = vec4[5](vs_out_attr0[1], vs_out_attr1[1], vs_out_attr2[1], vs_out_attr3[1], vs_out_attr4[1]);
|
|
prim_buffer[2].attributes = vec4[5](vs_out_attr0[2], vs_out_attr1[2], vs_out_attr2[2], vs_out_attr3[2], vs_out_attr4[2]);
|
|
EmitPrim(prim_buffer[0], prim_buffer[1], prim_buffer[2]);
|
|
}
|
|
// reference: CD8210802464D9AE, D7255673101445A5
|
|
// shader: 8B30, 30B703594147E54C
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (texcolor0.rgb);
|
|
float alpha_output_0 = (texcolor0.a);
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: D4F4BEF9BDA1E012, 30B703594147E54C
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, 30B703594147E54C
|
|
// shader: 8B30, C177EDF23A5BAC37
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (texcolor0.rgb);
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 108074776D69F673, C177EDF23A5BAC37
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, C177EDF23A5BAC37
|
|
// shader: 8B31, 97D5A59C4BBDDFFA
|
|
|
|
#define mul_s(x, y) mix(x * y, vec4(0.0), isnan(x * y))
|
|
#define fma_s(x, y, z) (mix(x * y, vec4(0.0), isnan(x * y)) + z)
|
|
float rcp_s(float x) {
|
|
if (x == 0.0) return x;
|
|
return 1.0 / x;
|
|
}
|
|
float rsq_s(float x) {
|
|
if (x > 0.0) return inversesqrt(x);
|
|
return 0.0;
|
|
}
|
|
#define dot_s(x, y) dot(x, y)
|
|
#define dot_3(x, y) dot(x, y)
|
|
|
|
struct pica_uniforms {
|
|
bool b[16];
|
|
uvec4 i[4];
|
|
vec4 f[96];
|
|
};
|
|
|
|
bool exec_shader();
|
|
|
|
#define uniforms vs_uniforms
|
|
layout (std140) uniform vs_config {
|
|
pica_uniforms uniforms;
|
|
};
|
|
layout(location = 0) in vec4 vs_in_reg0;
|
|
layout(location = 1) in vec4 vs_in_reg1;
|
|
layout(location = 2) in vec4 vs_in_reg2;
|
|
layout(location = 3) in vec4 vs_in_reg3;
|
|
layout(location = 4) in vec4 vs_in_reg4;
|
|
layout(location = 5) in vec4 vs_in_reg5;
|
|
layout(location = 6) in vec4 vs_in_reg6;
|
|
layout(location = 7) in vec4 vs_in_reg7;
|
|
layout(location = 8) in vec4 vs_in_reg8;
|
|
|
|
out vec4 vs_out_attr0;
|
|
out vec4 vs_out_attr1;
|
|
out vec4 vs_out_attr2;
|
|
out vec4 vs_out_attr3;
|
|
out vec4 vs_out_attr4;
|
|
out vec4 vs_out_attr5;
|
|
|
|
void main() {
|
|
vs_out_attr0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr5 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
exec_shader();
|
|
}
|
|
bvec2 conditional_code = bvec2(false);
|
|
ivec3 address_registers = ivec3(0);
|
|
vec4 reg_tmp0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp5 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp6 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp7 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp8 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp9 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp10 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp11 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp12 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp13 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp14 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp15 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
|
|
bool sub_22();
|
|
bool sub_4();
|
|
bool sub_10();
|
|
bool sub_1();
|
|
bool sub_2();
|
|
bool sub_3();
|
|
bool sub_5();
|
|
bool sub_8();
|
|
bool sub_9();
|
|
bool sub_11();
|
|
bool sub_21();
|
|
bool sub_23();
|
|
bool sub_24();
|
|
bool sub_25();
|
|
bool sub_26();
|
|
bool sub_27();
|
|
bool sub_28();
|
|
bool sub_29();
|
|
bool sub_30();
|
|
bool sub_31();
|
|
bool sub_32();
|
|
bool sub_6();
|
|
bool sub_7();
|
|
bool sub_12();
|
|
bool sub_13();
|
|
bool sub_14();
|
|
bool sub_15();
|
|
bool sub_16();
|
|
bool sub_17();
|
|
bool sub_18();
|
|
bool sub_19();
|
|
bool sub_20();
|
|
bool sub_33();
|
|
bool sub_34();
|
|
bool sub_35();
|
|
bool sub_38();
|
|
bool sub_36();
|
|
bool sub_37();
|
|
bool sub_39();
|
|
bool sub_40();
|
|
bool sub_46();
|
|
bool sub_47();
|
|
bool sub_48();
|
|
bool sub_49();
|
|
bool sub_51();
|
|
bool sub_41();
|
|
bool sub_42();
|
|
bool sub_43();
|
|
bool sub_44();
|
|
bool sub_45();
|
|
bool sub_50();
|
|
bool sub_52();
|
|
bool sub_53();
|
|
bool sub_54();
|
|
bool sub_55();
|
|
bool sub_56();
|
|
bool sub_57();
|
|
bool sub_58();
|
|
bool sub_59();
|
|
bool sub_0();
|
|
|
|
bool exec_shader() {
|
|
sub_0();
|
|
return true;
|
|
}
|
|
|
|
bool sub_22() {
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp3.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp7 = fma_s(reg_tmp1.wwww, reg_tmp3, reg_tmp7);
|
|
return false;
|
|
}
|
|
bool sub_4() {
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp3.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp4.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp7 = fma_s(reg_tmp1.wwww, reg_tmp3, reg_tmp7);
|
|
reg_tmp12 = fma_s(reg_tmp1.wwww, reg_tmp4, reg_tmp12);
|
|
return false;
|
|
}
|
|
bool sub_10() {
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp3.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp4.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp5.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp5.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp5.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp7 = fma_s(reg_tmp1.wwww, reg_tmp3, reg_tmp7);
|
|
reg_tmp12 = fma_s(reg_tmp1.wwww, reg_tmp4, reg_tmp12);
|
|
reg_tmp11 = fma_s(reg_tmp1.wwww, reg_tmp5, reg_tmp11);
|
|
return false;
|
|
}
|
|
bool sub_1() {
|
|
reg_tmp15.xyz = (mul_s(uniforms.f[7].xxxx, vs_in_reg0)).xyz;
|
|
reg_tmp14.xyz = (mul_s(uniforms.f[7].yyyy, vs_in_reg1)).xyz;
|
|
reg_tmp13.xyz = (mul_s(uniforms.f[7].zzzz, vs_in_reg2)).xyz;
|
|
reg_tmp15.xyz = (uniforms.f[6] + reg_tmp15).xyz;
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
if (uniforms.b[1]) {
|
|
sub_2();
|
|
} else {
|
|
sub_25();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_2() {
|
|
reg_tmp0 = uniforms.f[7];
|
|
conditional_code = notEqual(uniforms.f[93].xx, reg_tmp0.yz);
|
|
reg_tmp7 = uniforms.f[93].xxxx;
|
|
reg_tmp12 = uniforms.f[93].xxxx;
|
|
reg_tmp11 = uniforms.f[93].xxxx;
|
|
reg_tmp2 = mul_s(uniforms.f[93].wwww, vs_in_reg7);
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_3();
|
|
} else {
|
|
sub_8();
|
|
}
|
|
vs_out_attr2 = -reg_tmp15;
|
|
reg_tmp0.x = dot_s(uniforms.f[86], reg_tmp15);
|
|
reg_tmp0.y = dot_s(uniforms.f[87], reg_tmp15);
|
|
reg_tmp0.z = dot_s(uniforms.f[88], reg_tmp15);
|
|
reg_tmp0.w = dot_s(uniforms.f[89], reg_tmp15);
|
|
reg_tmp1.x = (-reg_tmp0.wwww).x;
|
|
reg_tmp1.y = (mul_s(uniforms.f[95].zzzz, -reg_tmp0.wwww)).y;
|
|
conditional_code.x = reg_tmp0.xxxx.x > reg_tmp1.xyyy.x;
|
|
conditional_code.y = reg_tmp0.xxxx.y < reg_tmp1.xyyy.y;
|
|
if (all(conditional_code)) {
|
|
sub_24();
|
|
}
|
|
vs_out_attr0 = reg_tmp0;
|
|
return false;
|
|
}
|
|
bool sub_3() {
|
|
conditional_code = notEqual(uniforms.f[93].xx, vs_in_reg8.zw);
|
|
reg_tmp1.xy = (reg_tmp2.xxxx).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.xxxx)).w;
|
|
{
|
|
sub_4();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.yyyy).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.yyyy)).w;
|
|
{
|
|
sub_4();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.zzzz).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.zzzz)).w;
|
|
if (conditional_code.x) {
|
|
sub_4();
|
|
}
|
|
if (uniforms.b[8]) {
|
|
sub_5();
|
|
}
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
{
|
|
sub_6();
|
|
}
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
{
|
|
sub_7();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_5() {
|
|
reg_tmp1.xy = (reg_tmp2.wwww).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.wwww)).w;
|
|
if (conditional_code.y) {
|
|
sub_4();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_8() {
|
|
if (all(conditional_code)) {
|
|
sub_9();
|
|
} else {
|
|
sub_21();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_9() {
|
|
conditional_code = notEqual(uniforms.f[93].xx, vs_in_reg8.zw);
|
|
reg_tmp1.xy = (reg_tmp2.xxxx).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.xxxx)).w;
|
|
{
|
|
sub_10();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.yyyy).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.yyyy)).w;
|
|
{
|
|
sub_10();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.zzzz).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.zzzz)).w;
|
|
if (conditional_code.x) {
|
|
sub_10();
|
|
}
|
|
if (uniforms.b[8]) {
|
|
sub_11();
|
|
}
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
{
|
|
sub_6();
|
|
}
|
|
reg_tmp13.x = dot_3(uniforms.f[3].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.y = dot_3(uniforms.f[4].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.z = dot_3(uniforms.f[5].xyz, reg_tmp11.xyz);
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
{
|
|
sub_12();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_11() {
|
|
reg_tmp1.xy = (reg_tmp2.wwww).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.wwww)).w;
|
|
if (conditional_code.y) {
|
|
sub_10();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_21() {
|
|
conditional_code = notEqual(uniforms.f[93].xx, vs_in_reg8.zw);
|
|
reg_tmp1.xy = (reg_tmp2.xxxx).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.xxxx)).w;
|
|
{
|
|
sub_22();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.yyyy).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.yyyy)).w;
|
|
{
|
|
sub_22();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.zzzz).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.zzzz)).w;
|
|
if (conditional_code.x) {
|
|
sub_22();
|
|
}
|
|
if (uniforms.b[8]) {
|
|
sub_23();
|
|
}
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
vs_out_attr1 = uniforms.f[93].xxxx;
|
|
return false;
|
|
}
|
|
bool sub_23() {
|
|
reg_tmp1.xy = (reg_tmp2.wwww).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.wwww)).w;
|
|
if (conditional_code.y) {
|
|
sub_22();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_24() {
|
|
reg_tmp0.x = (-reg_tmp0.wwww).x;
|
|
return false;
|
|
}
|
|
bool sub_25() {
|
|
reg_tmp0 = uniforms.f[7];
|
|
conditional_code = notEqual(uniforms.f[93].xx, reg_tmp0.yz);
|
|
if (uniforms.b[2]) {
|
|
sub_26();
|
|
} else {
|
|
sub_27();
|
|
}
|
|
{
|
|
sub_6();
|
|
}
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_28();
|
|
} else {
|
|
sub_29();
|
|
}
|
|
vs_out_attr2 = -reg_tmp15;
|
|
reg_tmp0.x = dot_s(uniforms.f[86], reg_tmp15);
|
|
reg_tmp0.y = dot_s(uniforms.f[87], reg_tmp15);
|
|
reg_tmp0.z = dot_s(uniforms.f[88], reg_tmp15);
|
|
reg_tmp0.w = dot_s(uniforms.f[89], reg_tmp15);
|
|
reg_tmp1.x = (-reg_tmp0.wwww).x;
|
|
reg_tmp1.y = (mul_s(uniforms.f[95].zzzz, -reg_tmp0.wwww)).y;
|
|
conditional_code.x = reg_tmp0.xxxx.x > reg_tmp1.xyyy.x;
|
|
conditional_code.y = reg_tmp0.xxxx.y < reg_tmp1.xyyy.y;
|
|
if (all(conditional_code)) {
|
|
sub_32();
|
|
}
|
|
vs_out_attr0 = reg_tmp0;
|
|
return false;
|
|
}
|
|
bool sub_26() {
|
|
reg_tmp1.x = (mul_s(uniforms.f[93].wwww, vs_in_reg7.xxxx)).x;
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp7.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp7.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp7.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
return false;
|
|
}
|
|
bool sub_27() {
|
|
address_registers.x = (ivec2(uniforms.f[93].xx)).x;
|
|
reg_tmp10.x = dot_s(uniforms.f[25], reg_tmp15);
|
|
reg_tmp10.y = dot_s(uniforms.f[26], reg_tmp15);
|
|
reg_tmp10.z = dot_s(uniforms.f[27], reg_tmp15);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
return false;
|
|
}
|
|
bool sub_28() {
|
|
reg_tmp12.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
{
|
|
sub_7();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_29() {
|
|
if (all(conditional_code)) {
|
|
sub_30();
|
|
} else {
|
|
sub_31();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_30() {
|
|
reg_tmp12.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp11.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp11.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp11.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
reg_tmp13.x = dot_3(uniforms.f[3].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.y = dot_3(uniforms.f[4].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.z = dot_3(uniforms.f[5].xyz, reg_tmp11.xyz);
|
|
{
|
|
sub_12();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_31() {
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
vs_out_attr1 = uniforms.f[93].xxxx;
|
|
return false;
|
|
}
|
|
bool sub_32() {
|
|
reg_tmp0.x = (-reg_tmp0.wwww).x;
|
|
return false;
|
|
}
|
|
bool sub_6() {
|
|
reg_tmp0.x = (uniforms.f[81].xxxx + reg_tmp10.zzzz).x;
|
|
reg_tmp1.x = rcp_s(reg_tmp0.x);
|
|
reg_tmp1.y = (-uniforms.f[80].xxxx + reg_tmp0.xxxx).y;
|
|
reg_tmp1.z = (mul_s(reg_tmp1.xxxx, reg_tmp1.yyyy)).z;
|
|
reg_tmp10.x = (fma_s(reg_tmp1.zzzz, uniforms.f[80].yyyy, reg_tmp10.xxxx)).x;
|
|
return false;
|
|
}
|
|
bool sub_7() {
|
|
uint jmp_to = 222u;
|
|
while (true) {
|
|
switch (jmp_to) {
|
|
case 222u: {
|
|
reg_tmp6.x = dot_3(reg_tmp14.xyz, reg_tmp14.xyz);
|
|
reg_tmp7.x = dot_3(reg_tmp12.xyz, reg_tmp12.xyz);
|
|
reg_tmp6.x = rsq_s(reg_tmp6.x);
|
|
reg_tmp7.x = rsq_s(reg_tmp7.x);
|
|
reg_tmp14.xyz = (mul_s(reg_tmp14.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp12.xyz = (mul_s(reg_tmp12.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp0 = uniforms.f[93].yxxx;
|
|
if (!uniforms.b[15]) {
|
|
{ jmp_to = 238u; break; }
|
|
}
|
|
reg_tmp4 = uniforms.f[93].yyyy + reg_tmp14.zzzz;
|
|
reg_tmp4 = mul_s(uniforms.f[94].zzzz, reg_tmp4);
|
|
conditional_code = greaterThanEqual(uniforms.f[93].xx, reg_tmp4.xx);
|
|
reg_tmp4 = vec4(rsq_s(reg_tmp4.x));
|
|
reg_tmp5 = mul_s(uniforms.f[94].zzzz, reg_tmp14);
|
|
if (conditional_code.x) {
|
|
{ jmp_to = 238u; break; }
|
|
}
|
|
reg_tmp0.z = rcp_s(reg_tmp4.x);
|
|
reg_tmp0.xy = (mul_s(reg_tmp5, reg_tmp4)).xy;
|
|
}
|
|
case 238u: {
|
|
vs_out_attr1 = reg_tmp0;
|
|
}
|
|
default: return false;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_12() {
|
|
uint jmp_to = 239u;
|
|
while (true) {
|
|
switch (jmp_to) {
|
|
case 239u: {
|
|
reg_tmp6.x = dot_3(reg_tmp14.xyz, reg_tmp14.xyz);
|
|
reg_tmp7.x = dot_3(reg_tmp12.xyz, reg_tmp12.xyz);
|
|
reg_tmp6.x = rsq_s(reg_tmp6.x);
|
|
reg_tmp7.x = rsq_s(reg_tmp7.x);
|
|
reg_tmp14.xyz = (mul_s(reg_tmp14.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp12.xyz = (mul_s(reg_tmp12.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp13.xyz = (mul_s(reg_tmp13.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp11.xyz = (mul_s(reg_tmp11.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp0 = uniforms.f[93].yxxx;
|
|
if (!uniforms.b[15]) {
|
|
{ jmp_to = 314u; break; }
|
|
}
|
|
reg_tmp13.xyz = (mul_s(reg_tmp13.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp11.xyz = (mul_s(reg_tmp11.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp5 = mul_s(reg_tmp14.yzxx, reg_tmp13.zxyy);
|
|
reg_tmp5 = fma_s(-reg_tmp13.yzxx, reg_tmp14.zxyy, reg_tmp5);
|
|
reg_tmp5.w = dot_3(reg_tmp5.xyz, reg_tmp5.xyz);
|
|
reg_tmp5.w = rsq_s(reg_tmp5.w);
|
|
reg_tmp5 = mul_s(reg_tmp5, reg_tmp5.wwww);
|
|
reg_tmp6.w = (reg_tmp14.zzzz + reg_tmp5.yyyy).w;
|
|
reg_tmp13 = mul_s(reg_tmp5.yzxx, reg_tmp14.zxyy);
|
|
reg_tmp13 = fma_s(-reg_tmp14.yzxx, reg_tmp5.zxyy, reg_tmp13);
|
|
reg_tmp6.w = (reg_tmp13.xxxx + reg_tmp6).w;
|
|
reg_tmp13.w = (reg_tmp5.zzzz).w;
|
|
reg_tmp5.z = (reg_tmp13.xxxx).z;
|
|
reg_tmp6.w = (uniforms.f[93].yyyy + reg_tmp6).w;
|
|
reg_tmp14.w = (reg_tmp5.xxxx).w;
|
|
reg_tmp5.x = (reg_tmp14.zzzz).x;
|
|
conditional_code = lessThan(uniforms.f[94].yy, reg_tmp6.ww);
|
|
reg_tmp6.x = (uniforms.f[93].yyyy).x;
|
|
reg_tmp6.y = (-uniforms.f[93].yyyy).y;
|
|
if (!conditional_code.x) {
|
|
{ jmp_to = 276u; break; }
|
|
}
|
|
reg_tmp7.xz = (reg_tmp13.wwyy + -reg_tmp14.yyww).xz;
|
|
reg_tmp7.y = (reg_tmp14.xxxx + -reg_tmp13.zzzz).y;
|
|
reg_tmp7.w = (reg_tmp6).w;
|
|
reg_tmp6 = vec4(dot_s(reg_tmp7, reg_tmp7));
|
|
reg_tmp6 = vec4(rsq_s(reg_tmp6.x));
|
|
reg_tmp0 = mul_s(reg_tmp7, reg_tmp6);
|
|
if (uniforms.b[0]) {
|
|
{ jmp_to = 314u; break; }
|
|
}
|
|
}
|
|
case 276u: {
|
|
conditional_code = greaterThan(reg_tmp5.zy, reg_tmp5.yx);
|
|
if (conditional_code.x) {
|
|
sub_13();
|
|
} else {
|
|
sub_18();
|
|
}
|
|
reg_tmp6 = vec4(dot_s(reg_tmp8, reg_tmp8));
|
|
reg_tmp6 = vec4(rsq_s(reg_tmp6.x));
|
|
reg_tmp0 = mul_s(reg_tmp8, reg_tmp6);
|
|
}
|
|
case 314u: {
|
|
vs_out_attr1 = reg_tmp0;
|
|
}
|
|
default: return false;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_13() {
|
|
if (conditional_code.y) {
|
|
sub_14();
|
|
} else {
|
|
sub_15();
|
|
}
|
|
reg_tmp8.w = (-reg_tmp8).w;
|
|
return false;
|
|
}
|
|
bool sub_14() {
|
|
reg_tmp8 = mul_s(reg_tmp13.yyzw, reg_tmp6.xxxy);
|
|
reg_tmp8.x = (uniforms.f[93].yyyy + -reg_tmp5.yyyy).x;
|
|
reg_tmp9 = reg_tmp5.zzzz + -reg_tmp5.xxxx;
|
|
reg_tmp8.yzw = (reg_tmp8 + reg_tmp14.wwxy).yzw;
|
|
reg_tmp8.x = (reg_tmp9 + reg_tmp8).x;
|
|
return false;
|
|
}
|
|
bool sub_15() {
|
|
conditional_code = greaterThan(reg_tmp5.zz, reg_tmp5.xx);
|
|
reg_tmp8 = mul_s(reg_tmp13.yyzw, reg_tmp6.xxxy);
|
|
reg_tmp8.x = (uniforms.f[93].yyyy + -reg_tmp5.yyyy).x;
|
|
if (conditional_code.x) {
|
|
sub_16();
|
|
} else {
|
|
sub_17();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_16() {
|
|
reg_tmp9 = reg_tmp5.zzzz + -reg_tmp5.xxxx;
|
|
reg_tmp8.yzw = (reg_tmp8 + reg_tmp14.wwxy).yzw;
|
|
reg_tmp8.x = (reg_tmp9 + reg_tmp8).x;
|
|
return false;
|
|
}
|
|
bool sub_17() {
|
|
reg_tmp8 = mul_s(reg_tmp13.zwwy, reg_tmp6.xxxy);
|
|
reg_tmp8.z = (uniforms.f[93].yyyy + -reg_tmp5.zzzz).z;
|
|
reg_tmp9 = reg_tmp5.xxxx + -reg_tmp5.yyyy;
|
|
reg_tmp8.xyw = (reg_tmp8 + reg_tmp14.xyyw).xyw;
|
|
reg_tmp8.z = (reg_tmp9 + reg_tmp8).z;
|
|
return false;
|
|
}
|
|
bool sub_18() {
|
|
if (conditional_code.y) {
|
|
sub_19();
|
|
} else {
|
|
sub_20();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_19() {
|
|
reg_tmp8 = mul_s(reg_tmp13.yywz, reg_tmp6.xxxy);
|
|
reg_tmp8.y = (uniforms.f[93].yyyy + -reg_tmp5.zzzz).y;
|
|
reg_tmp9 = reg_tmp5.yyyy + -reg_tmp5.xxxx;
|
|
reg_tmp8.xzw = (reg_tmp8 + reg_tmp14.wwyx).xzw;
|
|
reg_tmp8.y = (reg_tmp9 + reg_tmp8).y;
|
|
return false;
|
|
}
|
|
bool sub_20() {
|
|
reg_tmp8 = mul_s(reg_tmp13.zwwy, reg_tmp6.xxxy);
|
|
reg_tmp8.z = (uniforms.f[93].yyyy + -reg_tmp5.zzzz).z;
|
|
reg_tmp9 = reg_tmp5.xxxx + -reg_tmp5.yyyy;
|
|
reg_tmp8.xyw = (reg_tmp8 + reg_tmp14.xyyw).xyw;
|
|
reg_tmp8.z = (reg_tmp9 + reg_tmp8).z;
|
|
reg_tmp8.w = (-reg_tmp8).w;
|
|
return false;
|
|
}
|
|
bool sub_33() {
|
|
reg_tmp8.xy = (uniforms.f[93].xxxx).xy;
|
|
reg_tmp0.y = (uniforms.f[7].wwww).y;
|
|
conditional_code = notEqual(uniforms.f[93].xx, reg_tmp0.xy);
|
|
reg_tmp9.xyz = (uniforms.f[93].xxxx).xyz;
|
|
reg_tmp9.w = (uniforms.f[21].wwww).w;
|
|
if (conditional_code.y) {
|
|
sub_34();
|
|
}
|
|
if (uniforms.b[5]) {
|
|
sub_36();
|
|
}
|
|
conditional_code = equal(uniforms.f[93].xx, reg_tmp8.xy);
|
|
if (all(conditional_code)) {
|
|
sub_38();
|
|
}
|
|
vs_out_attr3 = max(uniforms.f[93].xxxx, reg_tmp9);
|
|
return false;
|
|
}
|
|
bool sub_34() {
|
|
reg_tmp0 = mul_s(uniforms.f[7].wwww, vs_in_reg3);
|
|
if (uniforms.b[7]) {
|
|
sub_35();
|
|
}
|
|
reg_tmp9.xyz = (mul_s(uniforms.f[20].wwww, reg_tmp0.xyzz)).xyz;
|
|
reg_tmp8.x = (uniforms.f[93].yyyy).x;
|
|
return false;
|
|
}
|
|
bool sub_35() {
|
|
reg_tmp9.w = (mul_s(reg_tmp9.wwww, reg_tmp0.wwww)).w;
|
|
return false;
|
|
}
|
|
bool sub_38() {
|
|
reg_tmp9 = uniforms.f[21];
|
|
return false;
|
|
}
|
|
bool sub_36() {
|
|
reg_tmp1 = vec4(dot_3(uniforms.f[24].xyz, reg_tmp14.xyz));
|
|
reg_tmp2 = uniforms.f[24].wwww;
|
|
reg_tmp1 = fma_s(reg_tmp1, reg_tmp2, reg_tmp2);
|
|
reg_tmp3 = uniforms.f[22];
|
|
reg_tmp2 = uniforms.f[23] + -reg_tmp3;
|
|
reg_tmp4 = fma_s(reg_tmp2, reg_tmp1, reg_tmp3);
|
|
if (uniforms.b[6]) {
|
|
sub_37();
|
|
}
|
|
reg_tmp9.xyz = (fma_s(reg_tmp4, uniforms.f[21], reg_tmp9)).xyz;
|
|
reg_tmp8.x = (uniforms.f[93].yyyy).x;
|
|
return false;
|
|
}
|
|
bool sub_37() {
|
|
reg_tmp4 = mul_s(reg_tmp4, reg_tmp9.wwww);
|
|
return false;
|
|
}
|
|
bool sub_39() {
|
|
reg_tmp0.xy = (uniforms.f[10].xxxx).xy;
|
|
if (uniforms.b[9]) {
|
|
sub_40();
|
|
} else {
|
|
sub_46();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_40() {
|
|
{
|
|
sub_41();
|
|
}
|
|
reg_tmp3.x = dot_s(uniforms.f[11].xywz, reg_tmp6);
|
|
reg_tmp3.y = dot_s(uniforms.f[12].xywz, reg_tmp6);
|
|
reg_tmp3.zw = (uniforms.f[93].xxxx).zw;
|
|
vs_out_attr4 = reg_tmp3;
|
|
return false;
|
|
}
|
|
bool sub_46() {
|
|
conditional_code = equal(uniforms.f[95].xy, reg_tmp0.xy);
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
if (all(not(conditional_code))) {
|
|
sub_47();
|
|
} else {
|
|
sub_48();
|
|
}
|
|
vs_out_attr4 = reg_tmp3;
|
|
return false;
|
|
}
|
|
bool sub_47() {
|
|
reg_tmp6 = reg_tmp10;
|
|
reg_tmp3.x = dot_s(uniforms.f[11], reg_tmp6);
|
|
reg_tmp3.y = dot_s(uniforms.f[12], reg_tmp6);
|
|
reg_tmp3.z = dot_s(uniforms.f[13], reg_tmp6);
|
|
reg_tmp0.xy = (mul_s(uniforms.f[19].xyyy, reg_tmp3.zzzz)).xy;
|
|
reg_tmp3.xy = (reg_tmp3.xyyy + reg_tmp0.xyyy).xy;
|
|
return false;
|
|
}
|
|
bool sub_48() {
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_49();
|
|
} else {
|
|
sub_51();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_49() {
|
|
{
|
|
sub_50();
|
|
}
|
|
reg_tmp3.x = dot_3(uniforms.f[11].xyz, reg_tmp6.xyz);
|
|
reg_tmp3.y = dot_3(uniforms.f[12].xyz, reg_tmp6.xyz);
|
|
reg_tmp3.z = dot_3(uniforms.f[13].xyz, reg_tmp6.xyz);
|
|
return false;
|
|
}
|
|
bool sub_51() {
|
|
{
|
|
sub_52();
|
|
}
|
|
reg_tmp3.x = dot_s(uniforms.f[11], reg_tmp6);
|
|
reg_tmp3.y = dot_s(uniforms.f[12], reg_tmp6);
|
|
return false;
|
|
}
|
|
bool sub_41() {
|
|
conditional_code = equal(uniforms.f[93].yz, reg_tmp0.xy);
|
|
if (all(not(conditional_code))) {
|
|
sub_42();
|
|
} else {
|
|
sub_43();
|
|
}
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
return false;
|
|
}
|
|
bool sub_42() {
|
|
reg_tmp6.xy = (mul_s(uniforms.f[8].xxxx, vs_in_reg4.xyyy)).xy;
|
|
return false;
|
|
}
|
|
bool sub_43() {
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_44();
|
|
} else {
|
|
sub_45();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_44() {
|
|
reg_tmp6.xy = (mul_s(uniforms.f[8].yyyy, vs_in_reg5.xyyy)).xy;
|
|
return false;
|
|
}
|
|
bool sub_45() {
|
|
reg_tmp6.xy = (mul_s(uniforms.f[8].zzzz, vs_in_reg6.xyyy)).xy;
|
|
return false;
|
|
}
|
|
bool sub_50() {
|
|
reg_tmp2 = -reg_tmp15;
|
|
reg_tmp2.w = dot_3(reg_tmp2.xyz, reg_tmp2.xyz);
|
|
reg_tmp2.w = rsq_s(reg_tmp2.w);
|
|
reg_tmp2 = mul_s(reg_tmp2, reg_tmp2.wwww);
|
|
reg_tmp1 = vec4(dot_3(reg_tmp2.xyz, reg_tmp14.xyz));
|
|
reg_tmp1 = reg_tmp1 + reg_tmp1;
|
|
reg_tmp6 = fma_s(reg_tmp1, reg_tmp14, -reg_tmp2);
|
|
return false;
|
|
}
|
|
bool sub_52() {
|
|
reg_tmp1.xy = (uniforms.f[94].zzzz).xy;
|
|
reg_tmp1.zw = (uniforms.f[93].xxxx).zw;
|
|
reg_tmp6 = fma_s(reg_tmp14, reg_tmp1, reg_tmp1);
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
return false;
|
|
}
|
|
bool sub_53() {
|
|
reg_tmp0.xy = (uniforms.f[10].yyyy).xy;
|
|
if (uniforms.b[10]) {
|
|
sub_54();
|
|
} else {
|
|
sub_55();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_54() {
|
|
{
|
|
sub_41();
|
|
}
|
|
reg_tmp4.x = dot_s(uniforms.f[14].xywz, reg_tmp6);
|
|
reg_tmp4.y = dot_s(uniforms.f[15].xywz, reg_tmp6);
|
|
vs_out_attr5 = reg_tmp4;
|
|
return false;
|
|
}
|
|
bool sub_55() {
|
|
if (uniforms.b[13]) {
|
|
sub_56();
|
|
} else {
|
|
sub_59();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_56() {
|
|
conditional_code = equal(uniforms.f[95].xy, reg_tmp0.xy);
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
if (all(not(conditional_code))) {
|
|
sub_57();
|
|
} else {
|
|
sub_58();
|
|
}
|
|
vs_out_attr5 = reg_tmp4;
|
|
return false;
|
|
}
|
|
bool sub_57() {
|
|
reg_tmp6 = reg_tmp10;
|
|
reg_tmp4.x = dot_s(uniforms.f[14], reg_tmp6);
|
|
reg_tmp4.y = dot_s(uniforms.f[15], reg_tmp6);
|
|
reg_tmp4.z = dot_s(uniforms.f[16], reg_tmp6);
|
|
reg_tmp6.w = rcp_s(reg_tmp4.z);
|
|
reg_tmp4.xy = (mul_s(reg_tmp4.xyyy, reg_tmp6.wwww)).xy;
|
|
reg_tmp4.xy = (uniforms.f[19].zwww + reg_tmp4.xyyy).xy;
|
|
return false;
|
|
}
|
|
bool sub_58() {
|
|
{
|
|
sub_52();
|
|
}
|
|
reg_tmp4.x = dot_s(uniforms.f[14], reg_tmp6);
|
|
reg_tmp4.y = dot_s(uniforms.f[15], reg_tmp6);
|
|
return false;
|
|
}
|
|
bool sub_59() {
|
|
vs_out_attr5 = uniforms.f[93].xxxx;
|
|
return false;
|
|
}
|
|
bool sub_0() {
|
|
{
|
|
sub_1();
|
|
}
|
|
{
|
|
sub_33();
|
|
}
|
|
{
|
|
sub_39();
|
|
}
|
|
{
|
|
sub_53();
|
|
}
|
|
return true;
|
|
}
|
|
// reference: F2956B182C53982D, 97D5A59C4BBDDFFA
|
|
// shader: 8DD9, 8D88DA9FC6C2B5D9
|
|
|
|
layout(triangles) in;
|
|
layout(triangle_strip, max_vertices = 3) out;
|
|
|
|
out vec4 primary_color;
|
|
out vec2 texcoord0;
|
|
out vec2 texcoord1;
|
|
out vec2 texcoord2;
|
|
out float texcoord0_w;
|
|
out vec4 normquat;
|
|
out vec3 view;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
in vec4 vs_out_attr0[];
|
|
in vec4 vs_out_attr1[];
|
|
in vec4 vs_out_attr2[];
|
|
in vec4 vs_out_attr3[];
|
|
in vec4 vs_out_attr4[];
|
|
in vec4 vs_out_attr5[];
|
|
struct Vertex {
|
|
vec4 attributes[6];
|
|
};
|
|
|
|
vec4 GetVertexQuaternion(Vertex vtx) {
|
|
return vec4(vtx.attributes[1].x, vtx.attributes[1].y, vtx.attributes[1].z, vtx.attributes[1].w);
|
|
}
|
|
|
|
void EmitVtx(Vertex vtx, bool quats_opposite) {
|
|
vec4 vtx_pos = vec4(vtx.attributes[0].x, vtx.attributes[0].y, vtx.attributes[0].z, vtx.attributes[0].w);
|
|
gl_Position = vtx_pos;
|
|
#if !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
gl_ClipDistance[0] = -vtx_pos.z;
|
|
gl_ClipDistance[1] = dot(clip_coef, vtx_pos);
|
|
#endif // !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
|
|
vec4 vtx_quat = GetVertexQuaternion(vtx);
|
|
normquat = mix(vtx_quat, -vtx_quat, bvec4(quats_opposite));
|
|
|
|
vec4 vtx_color = vec4(vtx.attributes[3].x, vtx.attributes[3].y, vtx.attributes[3].z, vtx.attributes[3].w);
|
|
primary_color = min(abs(vtx_color), vec4(1.0));
|
|
|
|
texcoord0 = vec2(vtx.attributes[4].x, vtx.attributes[4].y);
|
|
texcoord1 = vec2(vtx.attributes[5].x, vtx.attributes[5].y);
|
|
|
|
texcoord0_w = vtx.attributes[4].z;
|
|
view = vec3(vtx.attributes[2].x, vtx.attributes[2].y, vtx.attributes[2].z);
|
|
texcoord2 = vec2(0.0, 0.0);
|
|
|
|
EmitVertex();
|
|
}
|
|
|
|
bool AreQuaternionsOpposite(vec4 qa, vec4 qb) {
|
|
return (dot(qa, qb) < 0.0);
|
|
}
|
|
|
|
void EmitPrim(Vertex vtx0, Vertex vtx1, Vertex vtx2) {
|
|
EmitVtx(vtx0, false);
|
|
EmitVtx(vtx1, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx1)));
|
|
EmitVtx(vtx2, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx2)));
|
|
EndPrimitive();
|
|
}
|
|
|
|
void main() {
|
|
Vertex prim_buffer[3];
|
|
prim_buffer[0].attributes = vec4[6](vs_out_attr0[0], vs_out_attr1[0], vs_out_attr2[0], vs_out_attr3[0], vs_out_attr4[0], vs_out_attr5[0]);
|
|
prim_buffer[1].attributes = vec4[6](vs_out_attr0[1], vs_out_attr1[1], vs_out_attr2[1], vs_out_attr3[1], vs_out_attr4[1], vs_out_attr5[1]);
|
|
prim_buffer[2].attributes = vec4[6](vs_out_attr0[2], vs_out_attr1[2], vs_out_attr2[2], vs_out_attr3[2], vs_out_attr4[2], vs_out_attr5[2]);
|
|
EmitPrim(prim_buffer[0], prim_buffer[1], prim_buffer[2]);
|
|
}
|
|
// reference: 46A0C2E6B155D5CD, 8D88DA9FC6C2B5D9
|
|
// shader: 8B30, E783E1D81A8B9EB5
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += (((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(view)))) * light_src[0].specular_0) + ((lut_scale_d1 * LookupLightingLUTSigned(1, dot(normal, normalize(view)))) * light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (last_tex_env_out.rgb) + (texcolor1.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) + (const_color[2].rgb) - vec3(0.5), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - combiner_buffer.rgb) * (secondary_fragment_color.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((rounded_primary_color.rgb) + (const_color[4].rgb), vec3(1.0)) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((last_tex_env_out.rgb) * (last_tex_env_out.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_5 * 2.0, alpha_output_5 * 1.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 8401F70D3DF77E89, E783E1D81A8B9EB5
|
|
// program: 97D5A59C4BBDDFFA, 8D88DA9FC6C2B5D9, E783E1D81A8B9EB5
|
|
// shader: 8B30, 80936C90EED95ACE
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((texcolor0.rgb) * (const_color[0].aaa) + (texcolor1.rgb) * (vec3(1.0) - (const_color[0].aaa)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((texcolor0.a) * (const_color[0].a) + (texcolor1.a) * (1.0 - (const_color[0].a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((last_tex_env_out.rgb) * (rounded_primary_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 42980AFE3932DD20, 80936C90EED95ACE
|
|
// program: 97D5A59C4BBDDFFA, 8D88DA9FC6C2B5D9, 80936C90EED95ACE
|
|
// shader: 8B30, 5F12D3BD90BC91BD
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((texcolor0.rgb) * (const_color[0].aaa) + (texcolor1.rgb) * (vec3(1.0) - (const_color[0].aaa)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((texcolor0.a) * (const_color[0].a) + (texcolor1.a) * (1.0 - (const_color[0].a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((last_tex_env_out.rgb) * (rounded_primary_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = byteround(clamp((last_tex_env_out.a) * (rounded_primary_color.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 3A3A1836C8654D0B, 5F12D3BD90BC91BD
|
|
// program: 97D5A59C4BBDDFFA, 8D88DA9FC6C2B5D9, 5F12D3BD90BC91BD
|
|
// shader: 8B30, 57F3982423F0F900
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((texcolor0.rgb) * (rounded_primary_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: CE312E687BE989CC, 57F3982423F0F900
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, 57F3982423F0F900
|
|
// shader: 8B30, 1A48563EE40699E2
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (texcolor0.rgb);
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 1080747781DE1D70, 1A48563EE40699E2
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, 1A48563EE40699E2
|
|
// shader: 8B30, 13E17D127ECBB418
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (texcolor0.rgb);
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: EAD2C609960DA8A1, 13E17D127ECBB418
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 13E17D127ECBB418
|
|
// shader: 8B30, 9034855EEFABB939
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (texcolor0.rgb);
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].aaa) * (texcolor1.aaa) + (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (texcolor0.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: C168E7FA50427D64, 9034855EEFABB939
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 9034855EEFABB939
|
|
// shader: 8B30, 433E787609797983
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (texcolor0.rgb);
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor1.aaa) * (const_color[3].aaa) + (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (texcolor0.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: C168E7FA5726F8A3, 433E787609797983
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 433E787609797983
|
|
// shader: 8B30, 6B399BAC19377CF9
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = (texcolor0.rgb);
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 254A22F617F2BE1B, 6B399BAC19377CF9
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 6B399BAC19377CF9
|
|
// shader: 8B30, 5360990A6A745FE3
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 34639C1693336421, 5360990A6A745FE3
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 5360990A6A745FE3
|
|
// shader: 8B30, 8F4758EA1C4AFEF1
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].aaa) * (texcolor1.aaa) + (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (texcolor0.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 1FD9BDE5557CB1E4, 8F4758EA1C4AFEF1
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 8F4758EA1C4AFEF1
|
|
// shader: 8B30, CFD02F59ADE4A97A
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor1.aaa) * (const_color[3].aaa) + (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (texcolor0.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 1FD9BDE552183423, CFD02F59ADE4A97A
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, CFD02F59ADE4A97A
|
|
// shader: 8B30, 1A520ABE6DF38108
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: FBFB78E912CC729B, 1A520ABE6DF38108
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 1A520ABE6DF38108
|
|
// shader: 8B30, 1431384C5AB17B63
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 888996B812CC729B, 1431384C5AB17B63
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 1431384C5AB17B63
|
|
// shader: 8B30, D283A5F0F0730765
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = (texcolor1.rgb);
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (texcolor1.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: E56F8991BBE47A4A, D283A5F0F0730765
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, D283A5F0F0730765
|
|
// shader: 8B30, B97D001B4702D4E8
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = (texcolor1.rgb);
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (texcolor1.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: E56F899119AB1853, B97D001B4702D4E8
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, B97D001B4702D4E8
|
|
// shader: 8B30, A0E8FC4FBB27403D
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: FBFB78E95C34FB81, A0E8FC4FBB27403D
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, A0E8FC4FBB27403D
|
|
// shader: 8B30, 0EFBD5028C65BA56
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 888996B85C34FB81, 0EFBD5028C65BA56
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 0EFBD5028C65BA56
|
|
// shader: 8B30, 9DC5573BBCA09ED6
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 34639C16DDCBED3B, 9DC5573BBCA09ED6
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 9DC5573BBCA09ED6
|
|
// reference: CE312E681519A68B, 9A4719A519F0D3B1
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, 9A4719A519F0D3B1
|
|
// shader: 8B30, 7A2B385AB8F13598
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += (((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(view)))) * light_src[0].specular_0) + ((lut_scale_d1 * LookupLightingLUTSigned(1, dot(normal, normalize(view)))) * light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) + (const_color[2].rgb) - vec3(0.5), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - last_tex_env_out.rgb) * (secondary_fragment_color.rgb) + (last_tex_env_out.rgb) * (vec3(1.0) - (secondary_fragment_color.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((rounded_primary_color.rgb) + (const_color[4].rgb), vec3(1.0)) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((last_tex_env_out.rgb) * (combiner_buffer.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_5 * 2.0, alpha_output_5 * 1.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 021454F527458113, 7A2B385AB8F13598
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, 7A2B385AB8F13598
|
|
// shader: 8B30, 85A34F232FA93328
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += (((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(view)))) * light_src[0].specular_0) + ((lut_scale_d1 * LookupLightingLUTSigned(1, dot(normal, normalize(view)))) * light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) + (const_color[2].rgb) - vec3(0.5), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - combiner_buffer.rgb) * (secondary_fragment_color.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((rounded_primary_color.rgb) + (const_color[4].rgb), vec3(1.0)) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((last_tex_env_out.rgb) * (last_tex_env_out.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_5 * 2.0, alpha_output_5 * 1.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 9D8D1FC5749CC6D6, 85A34F232FA93328
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, 85A34F232FA93328
|
|
// shader: 8B30, B0C366B3A34DC5E4
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += (((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(view)))) * light_src[0].specular_0) + ((lut_scale_d1 * LookupLightingLUTSigned(1, dot(normal, normalize(view)))) * light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) + (const_color[2].rgb) - vec3(0.5), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor1.rgb) * (secondary_fragment_color.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((rounded_primary_color.rgb) + (const_color[4].rgb), vec3(1.0)) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((last_tex_env_out.rgb) * (last_tex_env_out.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_5 * 2.0, alpha_output_5 * 1.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 7ED92425A06BB129, B0C366B3A34DC5E4
|
|
// program: 97D5A59C4BBDDFFA, 8D88DA9FC6C2B5D9, B0C366B3A34DC5E4
|
|
// shader: 8B30, C2FC960BD7F1E573
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((texcolor0.rgb) * (rounded_primary_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 34639C166C3A3C1D, C2FC960BD7F1E573
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, C2FC960BD7F1E573
|
|
// shader: 8B31, 888714CB0B590345
|
|
|
|
#define mul_s(x, y) mix(x * y, vec4(0.0), isnan(x * y))
|
|
#define fma_s(x, y, z) (mix(x * y, vec4(0.0), isnan(x * y)) + z)
|
|
float rcp_s(float x) {
|
|
if (x == 0.0) return x;
|
|
return 1.0 / x;
|
|
}
|
|
float rsq_s(float x) {
|
|
if (x > 0.0) return inversesqrt(x);
|
|
return 0.0;
|
|
}
|
|
#define dot_s(x, y) dot(x, y)
|
|
#define dot_3(x, y) dot(x, y)
|
|
|
|
struct pica_uniforms {
|
|
bool b[16];
|
|
uvec4 i[4];
|
|
vec4 f[96];
|
|
};
|
|
|
|
bool exec_shader();
|
|
|
|
#define uniforms vs_uniforms
|
|
layout (std140) uniform vs_config {
|
|
pica_uniforms uniforms;
|
|
};
|
|
layout(location = 0) in vec4 vs_in_reg0;
|
|
layout(location = 1) in vec4 vs_in_reg1;
|
|
|
|
out vec4 vs_out_attr0;
|
|
out vec4 vs_out_attr1;
|
|
out vec4 vs_out_attr2;
|
|
out vec4 vs_out_attr3;
|
|
out vec4 vs_out_attr4;
|
|
|
|
void main() {
|
|
vs_out_attr0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
exec_shader();
|
|
}
|
|
bvec2 conditional_code = bvec2(false);
|
|
ivec3 address_registers = ivec3(0);
|
|
vec4 reg_tmp0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp5 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp6 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp7 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp8 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp9 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp10 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp11 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp12 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp13 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp14 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp15 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
|
|
bool sub_0();
|
|
bool sub_1();
|
|
bool sub_2();
|
|
bool sub_3();
|
|
bool sub_4();
|
|
bool sub_5();
|
|
bool sub_6();
|
|
bool sub_7();
|
|
bool sub_8();
|
|
bool sub_9();
|
|
bool sub_10();
|
|
|
|
bool exec_shader() {
|
|
sub_0();
|
|
return true;
|
|
}
|
|
|
|
bool sub_0() {
|
|
address_registers.y = (ivec2(uniforms.f[5].ww)).y;
|
|
reg_tmp6 = uniforms.f[0 + address_registers.y];
|
|
address_registers.x = (ivec2(vs_in_reg1.zz)).x;
|
|
reg_tmp14 = uniforms.f[84].xxxz;
|
|
reg_tmp15 = uniforms.f[84].xxxz;
|
|
reg_tmp10 = uniforms.f[84].xxxz;
|
|
reg_tmp11 = uniforms.f[84].xxxz;
|
|
address_registers.y = (ivec2(uniforms.f[8 + address_registers.x].ww)).y;
|
|
reg_tmp12.xy = (uniforms.f[4].xyyy + vs_in_reg0.xyyy).xy;
|
|
reg_tmp12.z = (uniforms.f[84].xxxx).z;
|
|
reg_tmp13.xyz = (mul_s(uniforms.f[9 + address_registers.x].zwww, reg_tmp12.xyzz)).xyz;
|
|
reg_tmp10.x = (reg_tmp13.xxxx).x;
|
|
reg_tmp12 = uniforms.f[85].xxxx;
|
|
conditional_code = equal(uniforms.f[4].zz, reg_tmp12.xy);
|
|
if (any(conditional_code)) {
|
|
sub_1();
|
|
} else {
|
|
sub_2();
|
|
}
|
|
reg_tmp11.x = dot_3(uniforms.f[11 + address_registers.x].xyz, reg_tmp10.xyz);
|
|
reg_tmp11.y = dot_3(uniforms.f[12 + address_registers.x].xyz, reg_tmp10.xyz);
|
|
reg_tmp11.z = dot_3(uniforms.f[13 + address_registers.x].xyz, reg_tmp10.xyz);
|
|
reg_tmp12 = uniforms.f[84].wwww;
|
|
conditional_code = greaterThanEqual(uniforms.f[4].zz, reg_tmp12.xy);
|
|
if (any(conditional_code)) {
|
|
sub_3();
|
|
} else {
|
|
sub_10();
|
|
}
|
|
reg_tmp15.xyz = (uniforms.f[8 + address_registers.x].xyzz + reg_tmp10.xyzz).xyz;
|
|
reg_tmp2.x = (uniforms.f[81].xxxx + reg_tmp10.zzzz).x;
|
|
reg_tmp3.x = (-uniforms.f[80].xxxx + reg_tmp2.xxxx).x;
|
|
reg_tmp4.x = rcp_s(reg_tmp2.x);
|
|
reg_tmp5.x = (mul_s(reg_tmp3.xxxx, reg_tmp4.xxxx)).x;
|
|
reg_tmp15.x = (fma_s(reg_tmp5.xxxx, uniforms.f[80].yyyy, reg_tmp15.xxxx)).x;
|
|
reg_tmp14.x = dot_s(uniforms.f[90], reg_tmp15);
|
|
reg_tmp14.y = dot_s(uniforms.f[91], reg_tmp15);
|
|
reg_tmp14.z = dot_s(uniforms.f[92], reg_tmp15);
|
|
reg_tmp14.w = (uniforms.f[84].zzzz).w;
|
|
vs_out_attr0.x = dot_s(uniforms.f[86], reg_tmp14);
|
|
vs_out_attr0.y = dot_s(uniforms.f[87], reg_tmp14);
|
|
vs_out_attr0.z = dot_s(uniforms.f[88], reg_tmp14);
|
|
vs_out_attr0.w = dot_s(uniforms.f[89], reg_tmp14);
|
|
vs_out_attr4 = -reg_tmp14;
|
|
vs_out_attr1.x = (uniforms.f[11 + address_registers.x].wwww).x;
|
|
vs_out_attr1.y = (uniforms.f[12 + address_registers.x].wwww).y;
|
|
vs_out_attr1.z = (uniforms.f[13 + address_registers.x].wwww).z;
|
|
vs_out_attr1.w = (uniforms.f[9 + address_registers.x].yyyy).w;
|
|
reg_tmp10.xy = (mul_s(uniforms.f[10 + address_registers.x].zwww, vs_in_reg1.xyyy)).xy;
|
|
reg_tmp11.xy = (uniforms.f[10 + address_registers.x].xyyy + reg_tmp10.xyyy).xy;
|
|
vs_out_attr2.x = (reg_tmp11.xxxx).x;
|
|
vs_out_attr2.y = (uniforms.f[84].zzzz + -reg_tmp11.yyyy).y;
|
|
vs_out_attr2.zw = (uniforms.f[84].zzzz).zw;
|
|
vs_out_attr3 = uniforms.f[84].xxxz;
|
|
return true;
|
|
}
|
|
bool sub_1() {
|
|
reg_tmp10.y = (uniforms.f[84].xxxx).y;
|
|
reg_tmp10.z = (mul_s(uniforms.f[85].zzzz, reg_tmp13.yyyy)).z;
|
|
return false;
|
|
}
|
|
bool sub_2() {
|
|
reg_tmp10.y = (reg_tmp13.yyyy).y;
|
|
reg_tmp10.z = (uniforms.f[84].xxxx).z;
|
|
return false;
|
|
}
|
|
bool sub_3() {
|
|
reg_tmp13 = uniforms.f[0 + address_registers.y];
|
|
reg_tmp10.x = dot_3(reg_tmp13.xyz, reg_tmp13.xyz);
|
|
conditional_code = greaterThanEqual(uniforms.f[85].yy, reg_tmp10.xx);
|
|
if (conditional_code.x) {
|
|
sub_4();
|
|
} else {
|
|
sub_5();
|
|
}
|
|
reg_tmp12.xyz = (reg_tmp6).xyz;
|
|
reg_tmp13.xyz = (mul_s(reg_tmp12.yzxx, reg_tmp8.zxyy)).xyz;
|
|
reg_tmp13.xyz = (fma_s(-reg_tmp8.yzxx, reg_tmp12.zxyy, reg_tmp13)).xyz;
|
|
reg_tmp10.x = dot_3(reg_tmp13.xyz, reg_tmp13.xyz);
|
|
conditional_code = greaterThanEqual(uniforms.f[85].yy, reg_tmp10.xx);
|
|
if (conditional_code.x) {
|
|
sub_6();
|
|
} else {
|
|
sub_7();
|
|
}
|
|
reg_tmp12.xyz = (mul_s(reg_tmp7.yzxx, reg_tmp8.zxyy)).xyz;
|
|
reg_tmp12.xyz = (fma_s(-reg_tmp8.yzxx, reg_tmp7.zxyy, reg_tmp12)).xyz;
|
|
reg_tmp10.x = dot_3(reg_tmp12.xyz, reg_tmp12.xyz);
|
|
conditional_code = greaterThanEqual(uniforms.f[85].yy, reg_tmp10.xx);
|
|
if (conditional_code.x) {
|
|
sub_8();
|
|
} else {
|
|
sub_9();
|
|
}
|
|
reg_tmp10.xyz = (mul_s(reg_tmp11.xxxx, reg_tmp7.xyzz)).xyz;
|
|
reg_tmp10.xyz = (fma_s(reg_tmp11.yyyy, reg_tmp8.xyzz, reg_tmp10.xyzz)).xyz;
|
|
reg_tmp10.xyz = (fma_s(reg_tmp11.zzzz, reg_tmp9.xyzz, reg_tmp10.xyzz)).xyz;
|
|
return false;
|
|
}
|
|
bool sub_4() {
|
|
reg_tmp8.xyz = (uniforms.f[84].xxxx).xyz;
|
|
return false;
|
|
}
|
|
bool sub_5() {
|
|
reg_tmp10.x = rsq_s(reg_tmp10.x);
|
|
reg_tmp8.xyz = (mul_s(uniforms.f[0 + address_registers.y].xyzz, reg_tmp10.xxxx)).xyz;
|
|
return false;
|
|
}
|
|
bool sub_6() {
|
|
reg_tmp7.xyz = (uniforms.f[84].xxxx).xyz;
|
|
return false;
|
|
}
|
|
bool sub_7() {
|
|
reg_tmp10.x = rsq_s(reg_tmp10.x);
|
|
reg_tmp7.xyz = (mul_s(reg_tmp13.xyzz, reg_tmp10.xxxx)).xyz;
|
|
return false;
|
|
}
|
|
bool sub_8() {
|
|
reg_tmp9.xyz = (uniforms.f[84].xxxx).xyz;
|
|
return false;
|
|
}
|
|
bool sub_9() {
|
|
reg_tmp10.x = rsq_s(reg_tmp10.x);
|
|
reg_tmp9.xyz = (mul_s(reg_tmp12.xyzz, reg_tmp10.xxxx)).xyz;
|
|
return false;
|
|
}
|
|
bool sub_10() {
|
|
reg_tmp10.x = dot_3(uniforms.f[0 + address_registers.y].xyz, reg_tmp11.xyz);
|
|
reg_tmp10.y = dot_3(uniforms.f[1 + address_registers.y].xyz, reg_tmp11.xyz);
|
|
reg_tmp10.z = dot_3(uniforms.f[2 + address_registers.y].xyz, reg_tmp11.xyz);
|
|
return false;
|
|
}
|
|
// reference: 85CE574C1CA0396E, 888714CB0B590345
|
|
// shader: 8DD9, 24CFA9CD0C9C43C4
|
|
|
|
layout(triangles) in;
|
|
layout(triangle_strip, max_vertices = 3) out;
|
|
|
|
out vec4 primary_color;
|
|
out vec2 texcoord0;
|
|
out vec2 texcoord1;
|
|
out vec2 texcoord2;
|
|
out float texcoord0_w;
|
|
out vec4 normquat;
|
|
out vec3 view;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
in vec4 vs_out_attr0[];
|
|
in vec4 vs_out_attr1[];
|
|
in vec4 vs_out_attr2[];
|
|
in vec4 vs_out_attr3[];
|
|
in vec4 vs_out_attr4[];
|
|
struct Vertex {
|
|
vec4 attributes[5];
|
|
};
|
|
|
|
vec4 GetVertexQuaternion(Vertex vtx) {
|
|
return vec4(vtx.attributes[3].x, vtx.attributes[3].y, vtx.attributes[3].z, vtx.attributes[3].w);
|
|
}
|
|
|
|
void EmitVtx(Vertex vtx, bool quats_opposite) {
|
|
vec4 vtx_pos = vec4(vtx.attributes[0].x, vtx.attributes[0].y, vtx.attributes[0].z, vtx.attributes[0].w);
|
|
gl_Position = vtx_pos;
|
|
#if !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
gl_ClipDistance[0] = -vtx_pos.z;
|
|
gl_ClipDistance[1] = dot(clip_coef, vtx_pos);
|
|
#endif // !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
|
|
vec4 vtx_quat = GetVertexQuaternion(vtx);
|
|
normquat = mix(vtx_quat, -vtx_quat, bvec4(quats_opposite));
|
|
|
|
vec4 vtx_color = vec4(vtx.attributes[1].x, vtx.attributes[1].y, vtx.attributes[1].z, vtx.attributes[1].w);
|
|
primary_color = min(abs(vtx_color), vec4(1.0));
|
|
|
|
texcoord0 = vec2(vtx.attributes[2].x, vtx.attributes[2].y);
|
|
texcoord1 = vec2(0.0, 0.0);
|
|
|
|
texcoord0_w = 0.0;
|
|
view = vec3(vtx.attributes[4].x, vtx.attributes[4].y, vtx.attributes[4].z);
|
|
texcoord2 = vec2(0.0, 0.0);
|
|
|
|
EmitVertex();
|
|
}
|
|
|
|
bool AreQuaternionsOpposite(vec4 qa, vec4 qb) {
|
|
return (dot(qa, qb) < 0.0);
|
|
}
|
|
|
|
void EmitPrim(Vertex vtx0, Vertex vtx1, Vertex vtx2) {
|
|
EmitVtx(vtx0, false);
|
|
EmitVtx(vtx1, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx1)));
|
|
EmitVtx(vtx2, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx2)));
|
|
EndPrimitive();
|
|
}
|
|
|
|
void main() {
|
|
Vertex prim_buffer[3];
|
|
prim_buffer[0].attributes = vec4[5](vs_out_attr0[0], vs_out_attr1[0], vs_out_attr2[0], vs_out_attr3[0], vs_out_attr4[0]);
|
|
prim_buffer[1].attributes = vec4[5](vs_out_attr0[1], vs_out_attr1[1], vs_out_attr2[1], vs_out_attr3[1], vs_out_attr4[1]);
|
|
prim_buffer[2].attributes = vec4[5](vs_out_attr0[2], vs_out_attr1[2], vs_out_attr2[2], vs_out_attr3[2], vs_out_attr4[2]);
|
|
EmitPrim(prim_buffer[0], prim_buffer[1], prim_buffer[2]);
|
|
}
|
|
// reference: 8D2B248358E40AB0, 24CFA9CD0C9C43C4
|
|
// shader: 8B30, 938D0DF48702C566
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 86CB841BFF2D5B60, 938D0DF48702C566
|
|
// program: 888714CB0B590345, 24CFA9CD0C9C43C4, 938D0DF48702C566
|
|
// shader: 8B31, 13395D7087095995
|
|
|
|
#define mul_s(x, y) mix(x * y, vec4(0.0), isnan(x * y))
|
|
#define fma_s(x, y, z) (mix(x * y, vec4(0.0), isnan(x * y)) + z)
|
|
float rcp_s(float x) {
|
|
if (x == 0.0) return x;
|
|
return 1.0 / x;
|
|
}
|
|
float rsq_s(float x) {
|
|
if (x > 0.0) return inversesqrt(x);
|
|
return 0.0;
|
|
}
|
|
#define dot_s(x, y) dot(x, y)
|
|
#define dot_3(x, y) dot(x, y)
|
|
|
|
struct pica_uniforms {
|
|
bool b[16];
|
|
uvec4 i[4];
|
|
vec4 f[96];
|
|
};
|
|
|
|
bool exec_shader();
|
|
|
|
#define uniforms vs_uniforms
|
|
layout (std140) uniform vs_config {
|
|
pica_uniforms uniforms;
|
|
};
|
|
layout(location = 0) in vec4 vs_in_reg0;
|
|
layout(location = 1) in vec4 vs_in_reg1;
|
|
|
|
out vec4 vs_out_attr0;
|
|
out vec4 vs_out_attr1;
|
|
out vec4 vs_out_attr2;
|
|
|
|
void main() {
|
|
vs_out_attr0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
exec_shader();
|
|
}
|
|
bvec2 conditional_code = bvec2(false);
|
|
ivec3 address_registers = ivec3(0);
|
|
vec4 reg_tmp0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp5 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp6 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp7 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp8 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp9 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp10 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp11 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp12 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp13 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp14 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp15 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
|
|
bool sub_0();
|
|
|
|
bool exec_shader() {
|
|
sub_0();
|
|
return true;
|
|
}
|
|
|
|
bool sub_0() {
|
|
reg_tmp13.xyz = (vs_in_reg0.xyzz).xyz;
|
|
reg_tmp12.x = (vs_in_reg0.wwww).x;
|
|
reg_tmp13.w = (uniforms.f[10].zzzz).w;
|
|
reg_tmp14.y = rcp_s(reg_tmp12.x);
|
|
reg_tmp14.x = (-uniforms.f[80].xxxx + reg_tmp12.xxxx).x;
|
|
reg_tmp14.z = (mul_s(reg_tmp14.xxxx, reg_tmp14.yyyy)).z;
|
|
reg_tmp13.x = (fma_s(reg_tmp14.zzzz, uniforms.f[80].yyyy, vs_in_reg0.xxxx)).x;
|
|
reg_tmp15 = reg_tmp13;
|
|
reg_tmp13.x = dot_s(uniforms.f[90], reg_tmp15);
|
|
reg_tmp13.y = dot_s(uniforms.f[91], reg_tmp15);
|
|
reg_tmp13.z = dot_s(uniforms.f[92], reg_tmp15);
|
|
vs_out_attr1 = uniforms.f[10].zzzz;
|
|
vs_out_attr2 = vs_in_reg1.xyyy;
|
|
vs_out_attr0.x = dot_s(uniforms.f[86], reg_tmp13);
|
|
vs_out_attr0.y = dot_s(uniforms.f[87], reg_tmp13);
|
|
vs_out_attr0.z = dot_s(uniforms.f[88], reg_tmp13);
|
|
vs_out_attr0.w = dot_s(uniforms.f[89], reg_tmp13);
|
|
return true;
|
|
}
|
|
// reference: FE040B70A67FD5D2, 13395D7087095995
|
|
// shader: 8B30, 123AEB0EDF90A3FE
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: CE312E683B074B7C, 123AEB0EDF90A3FE
|
|
// program: 13395D7087095995, 219384019281D7FD, 123AEB0EDF90A3FE
|
|
// shader: 8B30, 01BFAA358702C566
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.g), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 462B214EFF2D5B60, 01BFAA358702C566
|
|
// program: 888714CB0B590345, 24CFA9CD0C9C43C4, 01BFAA358702C566
|
|
// shader: 8B30, 4A61B1AED19D5E28
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += (((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(half_vector)))) * light_src[0].specular_0) + ((lut_scale_d1 * LookupLightingLUTSigned(1, dot(normal, normalize(view)))) * light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) + (const_color[2].rgb) - vec3(0.5), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor1.rgb) * (secondary_fragment_color.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((rounded_primary_color.rgb) + (const_color[4].rgb), vec3(1.0)) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((last_tex_env_out.rgb) * (combiner_buffer.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_5 * 2.0, alpha_output_5 * 1.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 300F3F7A21AF1061, 4A61B1AED19D5E28
|
|
// program: 97D5A59C4BBDDFFA, 8D88DA9FC6C2B5D9, 4A61B1AED19D5E28
|
|
// shader: 8B30, C64483B9A6DA3575
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += ((light_src[0].specular_0) + (light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) + (const_color[2].rgb) - vec3(0.5), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - last_tex_env_out.rgb) * (texcolor1.rgb) + (last_tex_env_out.rgb) * (vec3(1.0) - (texcolor1.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((rounded_primary_color.rgb) + (const_color[4].rgb), vec3(1.0)) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((last_tex_env_out.rgb) * (combiner_buffer.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_5 * 2.0, alpha_output_5 * 1.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 8D217960A5E53F00, C64483B9A6DA3575
|
|
// program: 97D5A59C4BBDDFFA, 8D88DA9FC6C2B5D9, C64483B9A6DA3575
|
|
// shader: 8B30, ED5209934B534923
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 7C9936655719743D, ED5209934B534923
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, ED5209934B534923
|
|
// reference: 967D24D03382DAD4, 697A254F4A9BF97A
|
|
// shader: 8B30, FD912EEC90800055
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += ((light_src[0].specular_0) + (light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: B759F81A99CF37C1, FD912EEC90800055
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, FD912EEC90800055
|
|
// shader: 8B30, 9057D28797DC8643
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
geo_factor = dot(half_vector, half_vector);
|
|
geo_factor = geo_factor == 0.0 ? 0.0 : min(dot_product / geo_factor, 1.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += ((((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(half_vector)))) * light_src[0].specular_0) * geo_factor) + ((lut_scale_d1 * LookupLightingLUTSigned(1, dot(normal, normalize(view)))) * light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (const_color[1].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) * (combiner_buffer.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((secondary_fragment_color.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((rounded_primary_color.rgb) + (const_color[4].rgb), vec3(1.0)) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4 * 2.0, alpha_output_4 * 1.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 7F54C0BBA3F943D0, 9057D28797DC8643
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, 9057D28797DC8643
|
|
// shader: 8B30, 2A8E504DABC78551
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
geo_factor = dot(half_vector, half_vector);
|
|
geo_factor = geo_factor == 0.0 ? 0.0 : min(dot_product / geo_factor, 1.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += ((((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(half_vector)))) * light_src[0].specular_0) * geo_factor) + ((lut_scale_d1 * LookupLightingLUTSigned(1, dot(normal, normalize(view)))) * light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (const_color[1].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) * (combiner_buffer.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((secondary_fragment_color.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((rounded_primary_color.rgb) + (const_color[4].rgb), vec3(1.0)) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4 * 2.0, alpha_output_4 * 1.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 7F54C0BB4F4EA8D3, 2A8E504DABC78551
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, 2A8E504DABC78551
|
|
// shader: 8B30, D6CF6392BF20E818
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += ((light_src[0].specular_0) + (light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((texcolor0.rgb) * (rounded_primary_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb) + (const_color[1].rgb) * (vec3(1.0) - (texcolor0.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 8D04BD7761EECDAF, D6CF6392BF20E818
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, D6CF6392BF20E818
|
|
// shader: 8B30, B2DCC98CE73D3428
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
geo_factor = dot(half_vector, half_vector);
|
|
geo_factor = geo_factor == 0.0 ? 0.0 : min(dot_product / geo_factor, 1.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += ((((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(half_vector)))) * light_src[0].specular_0) * geo_factor) + ((lut_scale_d1 * LookupLightingLUTSigned(1, dot(normal, normalize(view)))) * light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (const_color[1].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = byteround(clamp((last_tex_env_out.a) * (const_color[1].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 767B62E8830DB276, B2DCC98CE73D3428
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, B2DCC98CE73D3428
|
|
// shader: 8B30, CD732E2A7E5BCC2D
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += (((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(half_vector)))) * light_src[0].specular_0) + ((lut_scale_d1 * LookupLightingLUTSigned(1, dot(normal, normalize(view)))) * light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) + (const_color[2].rgb) - vec3(0.5), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - last_tex_env_out.rgb) * (secondary_fragment_color.rgb) + (last_tex_env_out.rgb) * (vec3(1.0) - (secondary_fragment_color.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((rounded_primary_color.rgb) + (const_color[4].rgb), vec3(1.0)) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((last_tex_env_out.rgb) * (combiner_buffer.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_5 * 2.0, alpha_output_5 * 1.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 4CC24FAA27458113, CD732E2A7E5BCC2D
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, CD732E2A7E5BCC2D
|
|
// shader: 8B30, 2AA6CAF7C2EEE53F
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
geo_factor = dot(half_vector, half_vector);
|
|
geo_factor = geo_factor == 0.0 ? 0.0 : min(dot_product / geo_factor, 1.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += ((((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(half_vector)))) * light_src[0].specular_0) * geo_factor) + ((lut_scale_d1 * LookupLightingLUTSigned(1, dot(normal, normalize(view)))) * light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (const_color[1].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) * (combiner_buffer.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((secondary_fragment_color.rgb) * (texcolor1.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((rounded_primary_color.rgb) + (const_color[4].rgb), vec3(1.0)) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4 * 2.0, alpha_output_4 * 1.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: AF012E13193B0A88, 2AA6CAF7C2EEE53F
|
|
// program: 97D5A59C4BBDDFFA, 8D88DA9FC6C2B5D9, 2AA6CAF7C2EEE53F
|
|
// reference: F98FE34599CF37C1, FD912EEC90800055
|
|
// shader: 8B31, C525A4B3D4F318E3
|
|
|
|
#define mul_s(x, y) mix(x * y, vec4(0.0), isnan(x * y))
|
|
#define fma_s(x, y, z) (mix(x * y, vec4(0.0), isnan(x * y)) + z)
|
|
float rcp_s(float x) {
|
|
if (x == 0.0) return x;
|
|
return 1.0 / x;
|
|
}
|
|
float rsq_s(float x) {
|
|
if (x > 0.0) return inversesqrt(x);
|
|
return 0.0;
|
|
}
|
|
#define dot_s(x, y) dot(x, y)
|
|
#define dot_3(x, y) dot(x, y)
|
|
|
|
struct pica_uniforms {
|
|
bool b[16];
|
|
uvec4 i[4];
|
|
vec4 f[96];
|
|
};
|
|
|
|
bool exec_shader();
|
|
|
|
#define uniforms vs_uniforms
|
|
layout (std140) uniform vs_config {
|
|
pica_uniforms uniforms;
|
|
};
|
|
layout(location = 0) in vec4 vs_in_reg0;
|
|
layout(location = 1) in vec4 vs_in_reg1;
|
|
layout(location = 2) in vec4 vs_in_reg2;
|
|
layout(location = 3) in vec4 vs_in_reg3;
|
|
layout(location = 4) in vec4 vs_in_reg4;
|
|
layout(location = 5) in vec4 vs_in_reg5;
|
|
layout(location = 6) in vec4 vs_in_reg6;
|
|
layout(location = 7) in vec4 vs_in_reg7;
|
|
layout(location = 8) in vec4 vs_in_reg8;
|
|
|
|
out vec4 vs_out_attr0;
|
|
out vec4 vs_out_attr1;
|
|
out vec4 vs_out_attr2;
|
|
out vec4 vs_out_attr3;
|
|
out vec4 vs_out_attr4;
|
|
out vec4 vs_out_attr5;
|
|
out vec4 vs_out_attr6;
|
|
|
|
void main() {
|
|
vs_out_attr0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr5 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vs_out_attr6 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
exec_shader();
|
|
}
|
|
bvec2 conditional_code = bvec2(false);
|
|
ivec3 address_registers = ivec3(0);
|
|
vec4 reg_tmp0 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp1 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp2 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp3 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp4 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp5 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp6 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp7 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp8 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp9 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp10 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp11 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp12 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp13 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp14 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 reg_tmp15 = vec4(0.0, 0.0, 0.0, 1.0);
|
|
|
|
bool sub_0();
|
|
bool sub_22();
|
|
bool sub_4();
|
|
bool sub_10();
|
|
bool sub_1();
|
|
bool sub_2();
|
|
bool sub_3();
|
|
bool sub_5();
|
|
bool sub_8();
|
|
bool sub_9();
|
|
bool sub_11();
|
|
bool sub_21();
|
|
bool sub_23();
|
|
bool sub_24();
|
|
bool sub_25();
|
|
bool sub_26();
|
|
bool sub_27();
|
|
bool sub_28();
|
|
bool sub_29();
|
|
bool sub_30();
|
|
bool sub_31();
|
|
bool sub_32();
|
|
bool sub_6();
|
|
bool sub_7();
|
|
bool sub_12();
|
|
bool sub_13();
|
|
bool sub_14();
|
|
bool sub_15();
|
|
bool sub_16();
|
|
bool sub_17();
|
|
bool sub_18();
|
|
bool sub_19();
|
|
bool sub_20();
|
|
bool sub_33();
|
|
bool sub_34();
|
|
bool sub_35();
|
|
bool sub_38();
|
|
bool sub_36();
|
|
bool sub_37();
|
|
bool sub_39();
|
|
bool sub_40();
|
|
bool sub_46();
|
|
bool sub_47();
|
|
bool sub_48();
|
|
bool sub_49();
|
|
bool sub_51();
|
|
bool sub_41();
|
|
bool sub_42();
|
|
bool sub_43();
|
|
bool sub_44();
|
|
bool sub_45();
|
|
bool sub_50();
|
|
bool sub_52();
|
|
bool sub_53();
|
|
bool sub_54();
|
|
bool sub_55();
|
|
bool sub_56();
|
|
bool sub_57();
|
|
bool sub_58();
|
|
bool sub_59();
|
|
bool sub_60();
|
|
bool sub_61();
|
|
bool sub_62();
|
|
bool sub_63();
|
|
bool sub_64();
|
|
|
|
bool exec_shader() {
|
|
sub_0();
|
|
return true;
|
|
}
|
|
|
|
bool sub_0() {
|
|
{
|
|
sub_1();
|
|
}
|
|
{
|
|
sub_33();
|
|
}
|
|
{
|
|
sub_39();
|
|
}
|
|
{
|
|
sub_53();
|
|
}
|
|
{
|
|
sub_60();
|
|
}
|
|
return true;
|
|
}
|
|
bool sub_22() {
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp3.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp7 = fma_s(reg_tmp1.wwww, reg_tmp3, reg_tmp7);
|
|
return false;
|
|
}
|
|
bool sub_4() {
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp3.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp4.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp7 = fma_s(reg_tmp1.wwww, reg_tmp3, reg_tmp7);
|
|
reg_tmp12 = fma_s(reg_tmp1.wwww, reg_tmp4, reg_tmp12);
|
|
return false;
|
|
}
|
|
bool sub_10() {
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp3.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp3.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp4.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp4.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp5.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp5.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp5.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp7 = fma_s(reg_tmp1.wwww, reg_tmp3, reg_tmp7);
|
|
reg_tmp12 = fma_s(reg_tmp1.wwww, reg_tmp4, reg_tmp12);
|
|
reg_tmp11 = fma_s(reg_tmp1.wwww, reg_tmp5, reg_tmp11);
|
|
return false;
|
|
}
|
|
bool sub_1() {
|
|
reg_tmp15.xyz = (mul_s(uniforms.f[7].xxxx, vs_in_reg0)).xyz;
|
|
reg_tmp14.xyz = (mul_s(uniforms.f[7].yyyy, vs_in_reg1)).xyz;
|
|
reg_tmp13.xyz = (mul_s(uniforms.f[7].zzzz, vs_in_reg2)).xyz;
|
|
reg_tmp15.xyz = (uniforms.f[6] + reg_tmp15).xyz;
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
if (uniforms.b[1]) {
|
|
sub_2();
|
|
} else {
|
|
sub_25();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_2() {
|
|
reg_tmp0 = uniforms.f[7];
|
|
conditional_code = notEqual(uniforms.f[93].xx, reg_tmp0.yz);
|
|
reg_tmp7 = uniforms.f[93].xxxx;
|
|
reg_tmp12 = uniforms.f[93].xxxx;
|
|
reg_tmp11 = uniforms.f[93].xxxx;
|
|
reg_tmp2 = mul_s(uniforms.f[93].wwww, vs_in_reg7);
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_3();
|
|
} else {
|
|
sub_8();
|
|
}
|
|
vs_out_attr2 = -reg_tmp15;
|
|
reg_tmp0.x = dot_s(uniforms.f[86], reg_tmp15);
|
|
reg_tmp0.y = dot_s(uniforms.f[87], reg_tmp15);
|
|
reg_tmp0.z = dot_s(uniforms.f[88], reg_tmp15);
|
|
reg_tmp0.w = dot_s(uniforms.f[89], reg_tmp15);
|
|
reg_tmp1.x = (-reg_tmp0.wwww).x;
|
|
reg_tmp1.y = (mul_s(uniforms.f[95].zzzz, -reg_tmp0.wwww)).y;
|
|
conditional_code.x = reg_tmp0.xxxx.x > reg_tmp1.xyyy.x;
|
|
conditional_code.y = reg_tmp0.xxxx.y < reg_tmp1.xyyy.y;
|
|
if (all(conditional_code)) {
|
|
sub_24();
|
|
}
|
|
vs_out_attr0 = reg_tmp0;
|
|
return false;
|
|
}
|
|
bool sub_3() {
|
|
conditional_code = notEqual(uniforms.f[93].xx, vs_in_reg8.zw);
|
|
reg_tmp1.xy = (reg_tmp2.xxxx).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.xxxx)).w;
|
|
{
|
|
sub_4();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.yyyy).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.yyyy)).w;
|
|
{
|
|
sub_4();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.zzzz).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.zzzz)).w;
|
|
if (conditional_code.x) {
|
|
sub_4();
|
|
}
|
|
if (uniforms.b[8]) {
|
|
sub_5();
|
|
}
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
{
|
|
sub_6();
|
|
}
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
{
|
|
sub_7();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_5() {
|
|
reg_tmp1.xy = (reg_tmp2.wwww).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.wwww)).w;
|
|
if (conditional_code.y) {
|
|
sub_4();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_8() {
|
|
if (all(conditional_code)) {
|
|
sub_9();
|
|
} else {
|
|
sub_21();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_9() {
|
|
conditional_code = notEqual(uniforms.f[93].xx, vs_in_reg8.zw);
|
|
reg_tmp1.xy = (reg_tmp2.xxxx).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.xxxx)).w;
|
|
{
|
|
sub_10();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.yyyy).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.yyyy)).w;
|
|
{
|
|
sub_10();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.zzzz).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.zzzz)).w;
|
|
if (conditional_code.x) {
|
|
sub_10();
|
|
}
|
|
if (uniforms.b[8]) {
|
|
sub_11();
|
|
}
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
{
|
|
sub_6();
|
|
}
|
|
reg_tmp13.x = dot_3(uniforms.f[3].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.y = dot_3(uniforms.f[4].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.z = dot_3(uniforms.f[5].xyz, reg_tmp11.xyz);
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
{
|
|
sub_12();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_11() {
|
|
reg_tmp1.xy = (reg_tmp2.wwww).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.wwww)).w;
|
|
if (conditional_code.y) {
|
|
sub_10();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_21() {
|
|
conditional_code = notEqual(uniforms.f[93].xx, vs_in_reg8.zw);
|
|
reg_tmp1.xy = (reg_tmp2.xxxx).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.xxxx)).w;
|
|
{
|
|
sub_22();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.yyyy).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.yyyy)).w;
|
|
{
|
|
sub_22();
|
|
}
|
|
reg_tmp1.xy = (reg_tmp2.zzzz).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.zzzz)).w;
|
|
if (conditional_code.x) {
|
|
sub_22();
|
|
}
|
|
if (uniforms.b[8]) {
|
|
sub_23();
|
|
}
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
vs_out_attr1 = uniforms.f[93].xxxx;
|
|
return false;
|
|
}
|
|
bool sub_23() {
|
|
reg_tmp1.xy = (reg_tmp2.wwww).xy;
|
|
reg_tmp1.w = (mul_s(uniforms.f[8].wwww, vs_in_reg8.wwww)).w;
|
|
if (conditional_code.y) {
|
|
sub_22();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_24() {
|
|
reg_tmp0.x = (-reg_tmp0.wwww).x;
|
|
return false;
|
|
}
|
|
bool sub_25() {
|
|
reg_tmp0 = uniforms.f[7];
|
|
conditional_code = notEqual(uniforms.f[93].xx, reg_tmp0.yz);
|
|
if (uniforms.b[2]) {
|
|
sub_26();
|
|
} else {
|
|
sub_27();
|
|
}
|
|
{
|
|
sub_6();
|
|
}
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_28();
|
|
} else {
|
|
sub_29();
|
|
}
|
|
vs_out_attr2 = -reg_tmp15;
|
|
reg_tmp0.x = dot_s(uniforms.f[86], reg_tmp15);
|
|
reg_tmp0.y = dot_s(uniforms.f[87], reg_tmp15);
|
|
reg_tmp0.z = dot_s(uniforms.f[88], reg_tmp15);
|
|
reg_tmp0.w = dot_s(uniforms.f[89], reg_tmp15);
|
|
reg_tmp1.x = (-reg_tmp0.wwww).x;
|
|
reg_tmp1.y = (mul_s(uniforms.f[95].zzzz, -reg_tmp0.wwww)).y;
|
|
conditional_code.x = reg_tmp0.xxxx.x > reg_tmp1.xyyy.x;
|
|
conditional_code.y = reg_tmp0.xxxx.y < reg_tmp1.xyyy.y;
|
|
if (all(conditional_code)) {
|
|
sub_32();
|
|
}
|
|
vs_out_attr0 = reg_tmp0;
|
|
return false;
|
|
}
|
|
bool sub_26() {
|
|
reg_tmp1.x = (mul_s(uniforms.f[93].wwww, vs_in_reg7.xxxx)).x;
|
|
address_registers.x = (ivec2(reg_tmp1.xx)).x;
|
|
reg_tmp7.x = dot_s(uniforms.f[25 + address_registers.x], reg_tmp15);
|
|
reg_tmp7.y = dot_s(uniforms.f[26 + address_registers.x], reg_tmp15);
|
|
reg_tmp7.z = dot_s(uniforms.f[27 + address_registers.x], reg_tmp15);
|
|
reg_tmp7.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp10.x = dot_s(uniforms.f[0], reg_tmp7);
|
|
reg_tmp10.y = dot_s(uniforms.f[1], reg_tmp7);
|
|
reg_tmp10.z = dot_s(uniforms.f[2], reg_tmp7);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
return false;
|
|
}
|
|
bool sub_27() {
|
|
address_registers.x = (ivec2(uniforms.f[93].xx)).x;
|
|
reg_tmp10.x = dot_s(uniforms.f[25], reg_tmp15);
|
|
reg_tmp10.y = dot_s(uniforms.f[26], reg_tmp15);
|
|
reg_tmp10.z = dot_s(uniforms.f[27], reg_tmp15);
|
|
reg_tmp10.w = (uniforms.f[93].yyyy).w;
|
|
return false;
|
|
}
|
|
bool sub_28() {
|
|
reg_tmp12.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
{
|
|
sub_7();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_29() {
|
|
if (all(conditional_code)) {
|
|
sub_30();
|
|
} else {
|
|
sub_31();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_30() {
|
|
reg_tmp12.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp12.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp14.xyz);
|
|
reg_tmp11.x = dot_3(uniforms.f[25 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp11.y = dot_3(uniforms.f[26 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp11.z = dot_3(uniforms.f[27 + address_registers.x].xyz, reg_tmp13.xyz);
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
reg_tmp14.x = dot_3(uniforms.f[3].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.y = dot_3(uniforms.f[4].xyz, reg_tmp12.xyz);
|
|
reg_tmp14.z = dot_3(uniforms.f[5].xyz, reg_tmp12.xyz);
|
|
reg_tmp13.x = dot_3(uniforms.f[3].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.y = dot_3(uniforms.f[4].xyz, reg_tmp11.xyz);
|
|
reg_tmp13.z = dot_3(uniforms.f[5].xyz, reg_tmp11.xyz);
|
|
{
|
|
sub_12();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_31() {
|
|
reg_tmp15.x = dot_s(uniforms.f[90], reg_tmp10);
|
|
reg_tmp15.y = dot_s(uniforms.f[91], reg_tmp10);
|
|
reg_tmp15.z = dot_s(uniforms.f[92], reg_tmp10);
|
|
reg_tmp15.w = (uniforms.f[93].yyyy).w;
|
|
vs_out_attr1 = uniforms.f[93].xxxx;
|
|
return false;
|
|
}
|
|
bool sub_32() {
|
|
reg_tmp0.x = (-reg_tmp0.wwww).x;
|
|
return false;
|
|
}
|
|
bool sub_6() {
|
|
reg_tmp0.x = (uniforms.f[81].xxxx + reg_tmp10.zzzz).x;
|
|
reg_tmp1.x = rcp_s(reg_tmp0.x);
|
|
reg_tmp1.y = (-uniforms.f[80].xxxx + reg_tmp0.xxxx).y;
|
|
reg_tmp1.z = (mul_s(reg_tmp1.xxxx, reg_tmp1.yyyy)).z;
|
|
reg_tmp10.x = (fma_s(reg_tmp1.zzzz, uniforms.f[80].yyyy, reg_tmp10.xxxx)).x;
|
|
return false;
|
|
}
|
|
bool sub_7() {
|
|
uint jmp_to = 222u;
|
|
while (true) {
|
|
switch (jmp_to) {
|
|
case 222u: {
|
|
reg_tmp6.x = dot_3(reg_tmp14.xyz, reg_tmp14.xyz);
|
|
reg_tmp7.x = dot_3(reg_tmp12.xyz, reg_tmp12.xyz);
|
|
reg_tmp6.x = rsq_s(reg_tmp6.x);
|
|
reg_tmp7.x = rsq_s(reg_tmp7.x);
|
|
reg_tmp14.xyz = (mul_s(reg_tmp14.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp12.xyz = (mul_s(reg_tmp12.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp0 = uniforms.f[93].yxxx;
|
|
if (!uniforms.b[15]) {
|
|
{ jmp_to = 238u; break; }
|
|
}
|
|
reg_tmp4 = uniforms.f[93].yyyy + reg_tmp14.zzzz;
|
|
reg_tmp4 = mul_s(uniforms.f[94].zzzz, reg_tmp4);
|
|
conditional_code = greaterThanEqual(uniforms.f[93].xx, reg_tmp4.xx);
|
|
reg_tmp4 = vec4(rsq_s(reg_tmp4.x));
|
|
reg_tmp5 = mul_s(uniforms.f[94].zzzz, reg_tmp14);
|
|
if (conditional_code.x) {
|
|
{ jmp_to = 238u; break; }
|
|
}
|
|
reg_tmp0.z = rcp_s(reg_tmp4.x);
|
|
reg_tmp0.xy = (mul_s(reg_tmp5, reg_tmp4)).xy;
|
|
}
|
|
case 238u: {
|
|
vs_out_attr1 = reg_tmp0;
|
|
}
|
|
default: return false;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_12() {
|
|
uint jmp_to = 239u;
|
|
while (true) {
|
|
switch (jmp_to) {
|
|
case 239u: {
|
|
reg_tmp6.x = dot_3(reg_tmp14.xyz, reg_tmp14.xyz);
|
|
reg_tmp7.x = dot_3(reg_tmp12.xyz, reg_tmp12.xyz);
|
|
reg_tmp6.x = rsq_s(reg_tmp6.x);
|
|
reg_tmp7.x = rsq_s(reg_tmp7.x);
|
|
reg_tmp14.xyz = (mul_s(reg_tmp14.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp12.xyz = (mul_s(reg_tmp12.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp13.xyz = (mul_s(reg_tmp13.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp11.xyz = (mul_s(reg_tmp11.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp0 = uniforms.f[93].yxxx;
|
|
if (!uniforms.b[15]) {
|
|
{ jmp_to = 314u; break; }
|
|
}
|
|
reg_tmp13.xyz = (mul_s(reg_tmp13.xyzz, reg_tmp6.xxxx)).xyz;
|
|
reg_tmp11.xyz = (mul_s(reg_tmp11.xyzz, reg_tmp7.xxxx)).xyz;
|
|
reg_tmp5 = mul_s(reg_tmp14.yzxx, reg_tmp13.zxyy);
|
|
reg_tmp5 = fma_s(-reg_tmp13.yzxx, reg_tmp14.zxyy, reg_tmp5);
|
|
reg_tmp5.w = dot_3(reg_tmp5.xyz, reg_tmp5.xyz);
|
|
reg_tmp5.w = rsq_s(reg_tmp5.w);
|
|
reg_tmp5 = mul_s(reg_tmp5, reg_tmp5.wwww);
|
|
reg_tmp6.w = (reg_tmp14.zzzz + reg_tmp5.yyyy).w;
|
|
reg_tmp13 = mul_s(reg_tmp5.yzxx, reg_tmp14.zxyy);
|
|
reg_tmp13 = fma_s(-reg_tmp14.yzxx, reg_tmp5.zxyy, reg_tmp13);
|
|
reg_tmp6.w = (reg_tmp13.xxxx + reg_tmp6).w;
|
|
reg_tmp13.w = (reg_tmp5.zzzz).w;
|
|
reg_tmp5.z = (reg_tmp13.xxxx).z;
|
|
reg_tmp6.w = (uniforms.f[93].yyyy + reg_tmp6).w;
|
|
reg_tmp14.w = (reg_tmp5.xxxx).w;
|
|
reg_tmp5.x = (reg_tmp14.zzzz).x;
|
|
conditional_code = lessThan(uniforms.f[94].yy, reg_tmp6.ww);
|
|
reg_tmp6.x = (uniforms.f[93].yyyy).x;
|
|
reg_tmp6.y = (-uniforms.f[93].yyyy).y;
|
|
if (!conditional_code.x) {
|
|
{ jmp_to = 276u; break; }
|
|
}
|
|
reg_tmp7.xz = (reg_tmp13.wwyy + -reg_tmp14.yyww).xz;
|
|
reg_tmp7.y = (reg_tmp14.xxxx + -reg_tmp13.zzzz).y;
|
|
reg_tmp7.w = (reg_tmp6).w;
|
|
reg_tmp6 = vec4(dot_s(reg_tmp7, reg_tmp7));
|
|
reg_tmp6 = vec4(rsq_s(reg_tmp6.x));
|
|
reg_tmp0 = mul_s(reg_tmp7, reg_tmp6);
|
|
if (uniforms.b[0]) {
|
|
{ jmp_to = 314u; break; }
|
|
}
|
|
}
|
|
case 276u: {
|
|
conditional_code = greaterThan(reg_tmp5.zy, reg_tmp5.yx);
|
|
if (conditional_code.x) {
|
|
sub_13();
|
|
} else {
|
|
sub_18();
|
|
}
|
|
reg_tmp6 = vec4(dot_s(reg_tmp8, reg_tmp8));
|
|
reg_tmp6 = vec4(rsq_s(reg_tmp6.x));
|
|
reg_tmp0 = mul_s(reg_tmp8, reg_tmp6);
|
|
}
|
|
case 314u: {
|
|
vs_out_attr1 = reg_tmp0;
|
|
}
|
|
default: return false;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_13() {
|
|
if (conditional_code.y) {
|
|
sub_14();
|
|
} else {
|
|
sub_15();
|
|
}
|
|
reg_tmp8.w = (-reg_tmp8).w;
|
|
return false;
|
|
}
|
|
bool sub_14() {
|
|
reg_tmp8 = mul_s(reg_tmp13.yyzw, reg_tmp6.xxxy);
|
|
reg_tmp8.x = (uniforms.f[93].yyyy + -reg_tmp5.yyyy).x;
|
|
reg_tmp9 = reg_tmp5.zzzz + -reg_tmp5.xxxx;
|
|
reg_tmp8.yzw = (reg_tmp8 + reg_tmp14.wwxy).yzw;
|
|
reg_tmp8.x = (reg_tmp9 + reg_tmp8).x;
|
|
return false;
|
|
}
|
|
bool sub_15() {
|
|
conditional_code = greaterThan(reg_tmp5.zz, reg_tmp5.xx);
|
|
reg_tmp8 = mul_s(reg_tmp13.yyzw, reg_tmp6.xxxy);
|
|
reg_tmp8.x = (uniforms.f[93].yyyy + -reg_tmp5.yyyy).x;
|
|
if (conditional_code.x) {
|
|
sub_16();
|
|
} else {
|
|
sub_17();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_16() {
|
|
reg_tmp9 = reg_tmp5.zzzz + -reg_tmp5.xxxx;
|
|
reg_tmp8.yzw = (reg_tmp8 + reg_tmp14.wwxy).yzw;
|
|
reg_tmp8.x = (reg_tmp9 + reg_tmp8).x;
|
|
return false;
|
|
}
|
|
bool sub_17() {
|
|
reg_tmp8 = mul_s(reg_tmp13.zwwy, reg_tmp6.xxxy);
|
|
reg_tmp8.z = (uniforms.f[93].yyyy + -reg_tmp5.zzzz).z;
|
|
reg_tmp9 = reg_tmp5.xxxx + -reg_tmp5.yyyy;
|
|
reg_tmp8.xyw = (reg_tmp8 + reg_tmp14.xyyw).xyw;
|
|
reg_tmp8.z = (reg_tmp9 + reg_tmp8).z;
|
|
return false;
|
|
}
|
|
bool sub_18() {
|
|
if (conditional_code.y) {
|
|
sub_19();
|
|
} else {
|
|
sub_20();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_19() {
|
|
reg_tmp8 = mul_s(reg_tmp13.yywz, reg_tmp6.xxxy);
|
|
reg_tmp8.y = (uniforms.f[93].yyyy + -reg_tmp5.zzzz).y;
|
|
reg_tmp9 = reg_tmp5.yyyy + -reg_tmp5.xxxx;
|
|
reg_tmp8.xzw = (reg_tmp8 + reg_tmp14.wwyx).xzw;
|
|
reg_tmp8.y = (reg_tmp9 + reg_tmp8).y;
|
|
return false;
|
|
}
|
|
bool sub_20() {
|
|
reg_tmp8 = mul_s(reg_tmp13.zwwy, reg_tmp6.xxxy);
|
|
reg_tmp8.z = (uniforms.f[93].yyyy + -reg_tmp5.zzzz).z;
|
|
reg_tmp9 = reg_tmp5.xxxx + -reg_tmp5.yyyy;
|
|
reg_tmp8.xyw = (reg_tmp8 + reg_tmp14.xyyw).xyw;
|
|
reg_tmp8.z = (reg_tmp9 + reg_tmp8).z;
|
|
reg_tmp8.w = (-reg_tmp8).w;
|
|
return false;
|
|
}
|
|
bool sub_33() {
|
|
reg_tmp8.xy = (uniforms.f[93].xxxx).xy;
|
|
reg_tmp0.y = (uniforms.f[7].wwww).y;
|
|
conditional_code = notEqual(uniforms.f[93].xx, reg_tmp0.xy);
|
|
reg_tmp9.xyz = (uniforms.f[93].xxxx).xyz;
|
|
reg_tmp9.w = (uniforms.f[21].wwww).w;
|
|
if (conditional_code.y) {
|
|
sub_34();
|
|
}
|
|
if (uniforms.b[5]) {
|
|
sub_36();
|
|
}
|
|
conditional_code = equal(uniforms.f[93].xx, reg_tmp8.xy);
|
|
if (all(conditional_code)) {
|
|
sub_38();
|
|
}
|
|
vs_out_attr3 = max(uniforms.f[93].xxxx, reg_tmp9);
|
|
return false;
|
|
}
|
|
bool sub_34() {
|
|
reg_tmp0 = mul_s(uniforms.f[7].wwww, vs_in_reg3);
|
|
if (uniforms.b[7]) {
|
|
sub_35();
|
|
}
|
|
reg_tmp9.xyz = (mul_s(uniforms.f[20].wwww, reg_tmp0.xyzz)).xyz;
|
|
reg_tmp8.x = (uniforms.f[93].yyyy).x;
|
|
return false;
|
|
}
|
|
bool sub_35() {
|
|
reg_tmp9.w = (mul_s(reg_tmp9.wwww, reg_tmp0.wwww)).w;
|
|
return false;
|
|
}
|
|
bool sub_38() {
|
|
reg_tmp9 = uniforms.f[21];
|
|
return false;
|
|
}
|
|
bool sub_36() {
|
|
reg_tmp1 = vec4(dot_3(uniforms.f[24].xyz, reg_tmp14.xyz));
|
|
reg_tmp2 = uniforms.f[24].wwww;
|
|
reg_tmp1 = fma_s(reg_tmp1, reg_tmp2, reg_tmp2);
|
|
reg_tmp3 = uniforms.f[22];
|
|
reg_tmp2 = uniforms.f[23] + -reg_tmp3;
|
|
reg_tmp4 = fma_s(reg_tmp2, reg_tmp1, reg_tmp3);
|
|
if (uniforms.b[6]) {
|
|
sub_37();
|
|
}
|
|
reg_tmp9.xyz = (fma_s(reg_tmp4, uniforms.f[21], reg_tmp9)).xyz;
|
|
reg_tmp8.x = (uniforms.f[93].yyyy).x;
|
|
return false;
|
|
}
|
|
bool sub_37() {
|
|
reg_tmp4 = mul_s(reg_tmp4, reg_tmp9.wwww);
|
|
return false;
|
|
}
|
|
bool sub_39() {
|
|
reg_tmp0.xy = (uniforms.f[10].xxxx).xy;
|
|
if (uniforms.b[9]) {
|
|
sub_40();
|
|
} else {
|
|
sub_46();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_40() {
|
|
{
|
|
sub_41();
|
|
}
|
|
reg_tmp3.x = dot_s(uniforms.f[11].xywz, reg_tmp6);
|
|
reg_tmp3.y = dot_s(uniforms.f[12].xywz, reg_tmp6);
|
|
reg_tmp3.zw = (uniforms.f[93].xxxx).zw;
|
|
vs_out_attr4 = reg_tmp3;
|
|
return false;
|
|
}
|
|
bool sub_46() {
|
|
conditional_code = equal(uniforms.f[95].xy, reg_tmp0.xy);
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
if (all(not(conditional_code))) {
|
|
sub_47();
|
|
} else {
|
|
sub_48();
|
|
}
|
|
vs_out_attr4 = reg_tmp3;
|
|
return false;
|
|
}
|
|
bool sub_47() {
|
|
reg_tmp6 = reg_tmp10;
|
|
reg_tmp3.x = dot_s(uniforms.f[11], reg_tmp6);
|
|
reg_tmp3.y = dot_s(uniforms.f[12], reg_tmp6);
|
|
reg_tmp3.z = dot_s(uniforms.f[13], reg_tmp6);
|
|
reg_tmp0.xy = (mul_s(uniforms.f[19].xyyy, reg_tmp3.zzzz)).xy;
|
|
reg_tmp3.xy = (reg_tmp3.xyyy + reg_tmp0.xyyy).xy;
|
|
return false;
|
|
}
|
|
bool sub_48() {
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_49();
|
|
} else {
|
|
sub_51();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_49() {
|
|
{
|
|
sub_50();
|
|
}
|
|
reg_tmp3.x = dot_3(uniforms.f[11].xyz, reg_tmp6.xyz);
|
|
reg_tmp3.y = dot_3(uniforms.f[12].xyz, reg_tmp6.xyz);
|
|
reg_tmp3.z = dot_3(uniforms.f[13].xyz, reg_tmp6.xyz);
|
|
return false;
|
|
}
|
|
bool sub_51() {
|
|
{
|
|
sub_52();
|
|
}
|
|
reg_tmp3.x = dot_s(uniforms.f[11], reg_tmp6);
|
|
reg_tmp3.y = dot_s(uniforms.f[12], reg_tmp6);
|
|
return false;
|
|
}
|
|
bool sub_41() {
|
|
conditional_code = equal(uniforms.f[93].yz, reg_tmp0.xy);
|
|
if (all(not(conditional_code))) {
|
|
sub_42();
|
|
} else {
|
|
sub_43();
|
|
}
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
return false;
|
|
}
|
|
bool sub_42() {
|
|
reg_tmp6.xy = (mul_s(uniforms.f[8].xxxx, vs_in_reg4.xyyy)).xy;
|
|
return false;
|
|
}
|
|
bool sub_43() {
|
|
if (all(bvec2(conditional_code.x, !conditional_code.y))) {
|
|
sub_44();
|
|
} else {
|
|
sub_45();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_44() {
|
|
reg_tmp6.xy = (mul_s(uniforms.f[8].yyyy, vs_in_reg5.xyyy)).xy;
|
|
return false;
|
|
}
|
|
bool sub_45() {
|
|
reg_tmp6.xy = (mul_s(uniforms.f[8].zzzz, vs_in_reg6.xyyy)).xy;
|
|
return false;
|
|
}
|
|
bool sub_50() {
|
|
reg_tmp2 = -reg_tmp15;
|
|
reg_tmp2.w = dot_3(reg_tmp2.xyz, reg_tmp2.xyz);
|
|
reg_tmp2.w = rsq_s(reg_tmp2.w);
|
|
reg_tmp2 = mul_s(reg_tmp2, reg_tmp2.wwww);
|
|
reg_tmp1 = vec4(dot_3(reg_tmp2.xyz, reg_tmp14.xyz));
|
|
reg_tmp1 = reg_tmp1 + reg_tmp1;
|
|
reg_tmp6 = fma_s(reg_tmp1, reg_tmp14, -reg_tmp2);
|
|
return false;
|
|
}
|
|
bool sub_52() {
|
|
reg_tmp1.xy = (uniforms.f[94].zzzz).xy;
|
|
reg_tmp1.zw = (uniforms.f[93].xxxx).zw;
|
|
reg_tmp6 = fma_s(reg_tmp14, reg_tmp1, reg_tmp1);
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
return false;
|
|
}
|
|
bool sub_53() {
|
|
reg_tmp0.xy = (uniforms.f[10].yyyy).xy;
|
|
if (uniforms.b[10]) {
|
|
sub_54();
|
|
} else {
|
|
sub_55();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_54() {
|
|
{
|
|
sub_41();
|
|
}
|
|
reg_tmp4.x = dot_s(uniforms.f[14].xywz, reg_tmp6);
|
|
reg_tmp4.y = dot_s(uniforms.f[15].xywz, reg_tmp6);
|
|
vs_out_attr5 = reg_tmp4;
|
|
return false;
|
|
}
|
|
bool sub_55() {
|
|
if (uniforms.b[13]) {
|
|
sub_56();
|
|
} else {
|
|
sub_59();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_56() {
|
|
conditional_code = equal(uniforms.f[95].xy, reg_tmp0.xy);
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
if (all(not(conditional_code))) {
|
|
sub_57();
|
|
} else {
|
|
sub_58();
|
|
}
|
|
vs_out_attr5 = reg_tmp4;
|
|
return false;
|
|
}
|
|
bool sub_57() {
|
|
reg_tmp6 = reg_tmp10;
|
|
reg_tmp4.x = dot_s(uniforms.f[14], reg_tmp6);
|
|
reg_tmp4.y = dot_s(uniforms.f[15], reg_tmp6);
|
|
reg_tmp4.z = dot_s(uniforms.f[16], reg_tmp6);
|
|
reg_tmp6.w = rcp_s(reg_tmp4.z);
|
|
reg_tmp4.xy = (mul_s(reg_tmp4.xyyy, reg_tmp6.wwww)).xy;
|
|
reg_tmp4.xy = (uniforms.f[19].zwww + reg_tmp4.xyyy).xy;
|
|
return false;
|
|
}
|
|
bool sub_58() {
|
|
{
|
|
sub_52();
|
|
}
|
|
reg_tmp4.x = dot_s(uniforms.f[14], reg_tmp6);
|
|
reg_tmp4.y = dot_s(uniforms.f[15], reg_tmp6);
|
|
return false;
|
|
}
|
|
bool sub_59() {
|
|
vs_out_attr5 = uniforms.f[93].xxxx;
|
|
return false;
|
|
}
|
|
bool sub_60() {
|
|
reg_tmp0.xy = (uniforms.f[10].zzzz).xy;
|
|
if (uniforms.b[11]) {
|
|
sub_61();
|
|
} else {
|
|
sub_62();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_61() {
|
|
{
|
|
sub_41();
|
|
}
|
|
reg_tmp5.x = dot_s(uniforms.f[17].xywz, reg_tmp6);
|
|
reg_tmp5.y = dot_s(uniforms.f[18].xywz, reg_tmp6);
|
|
vs_out_attr6 = reg_tmp5;
|
|
return false;
|
|
}
|
|
bool sub_62() {
|
|
if (uniforms.b[14]) {
|
|
sub_63();
|
|
} else {
|
|
sub_64();
|
|
}
|
|
return false;
|
|
}
|
|
bool sub_63() {
|
|
reg_tmp6.zw = (uniforms.f[93].xxyy).zw;
|
|
reg_tmp5.zw = (reg_tmp6.zwww).zw;
|
|
{
|
|
sub_52();
|
|
}
|
|
reg_tmp5.x = dot_s(uniforms.f[17], reg_tmp6);
|
|
reg_tmp5.y = dot_s(uniforms.f[18], reg_tmp6);
|
|
vs_out_attr6 = reg_tmp5;
|
|
return false;
|
|
}
|
|
bool sub_64() {
|
|
vs_out_attr6 = uniforms.f[93].xxxx;
|
|
return false;
|
|
}
|
|
// reference: 5DD1F95FAEB3934A, C525A4B3D4F318E3
|
|
// shader: 8DD9, 0D30074279C2FEED
|
|
|
|
layout(triangles) in;
|
|
layout(triangle_strip, max_vertices = 3) out;
|
|
|
|
out vec4 primary_color;
|
|
out vec2 texcoord0;
|
|
out vec2 texcoord1;
|
|
out vec2 texcoord2;
|
|
out float texcoord0_w;
|
|
out vec4 normquat;
|
|
out vec3 view;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
in vec4 vs_out_attr0[];
|
|
in vec4 vs_out_attr1[];
|
|
in vec4 vs_out_attr2[];
|
|
in vec4 vs_out_attr3[];
|
|
in vec4 vs_out_attr4[];
|
|
in vec4 vs_out_attr5[];
|
|
in vec4 vs_out_attr6[];
|
|
struct Vertex {
|
|
vec4 attributes[7];
|
|
};
|
|
|
|
vec4 GetVertexQuaternion(Vertex vtx) {
|
|
return vec4(vtx.attributes[1].x, vtx.attributes[1].y, vtx.attributes[1].z, vtx.attributes[1].w);
|
|
}
|
|
|
|
void EmitVtx(Vertex vtx, bool quats_opposite) {
|
|
vec4 vtx_pos = vec4(vtx.attributes[0].x, vtx.attributes[0].y, vtx.attributes[0].z, vtx.attributes[0].w);
|
|
gl_Position = vtx_pos;
|
|
#if !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
gl_ClipDistance[0] = -vtx_pos.z;
|
|
gl_ClipDistance[1] = dot(clip_coef, vtx_pos);
|
|
#endif // !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance)
|
|
|
|
vec4 vtx_quat = GetVertexQuaternion(vtx);
|
|
normquat = mix(vtx_quat, -vtx_quat, bvec4(quats_opposite));
|
|
|
|
vec4 vtx_color = vec4(vtx.attributes[3].x, vtx.attributes[3].y, vtx.attributes[3].z, vtx.attributes[3].w);
|
|
primary_color = min(abs(vtx_color), vec4(1.0));
|
|
|
|
texcoord0 = vec2(vtx.attributes[4].x, vtx.attributes[4].y);
|
|
texcoord1 = vec2(vtx.attributes[5].x, vtx.attributes[5].y);
|
|
|
|
texcoord0_w = vtx.attributes[4].z;
|
|
view = vec3(vtx.attributes[2].x, vtx.attributes[2].y, vtx.attributes[2].z);
|
|
texcoord2 = vec2(vtx.attributes[6].x, vtx.attributes[6].y);
|
|
|
|
EmitVertex();
|
|
}
|
|
|
|
bool AreQuaternionsOpposite(vec4 qa, vec4 qb) {
|
|
return (dot(qa, qb) < 0.0);
|
|
}
|
|
|
|
void EmitPrim(Vertex vtx0, Vertex vtx1, Vertex vtx2) {
|
|
EmitVtx(vtx0, false);
|
|
EmitVtx(vtx1, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx1)));
|
|
EmitVtx(vtx2, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx2)));
|
|
EndPrimitive();
|
|
}
|
|
|
|
void main() {
|
|
Vertex prim_buffer[3];
|
|
prim_buffer[0].attributes = vec4[7](vs_out_attr0[0], vs_out_attr1[0], vs_out_attr2[0], vs_out_attr3[0], vs_out_attr4[0], vs_out_attr5[0], vs_out_attr6[0]);
|
|
prim_buffer[1].attributes = vec4[7](vs_out_attr0[1], vs_out_attr1[1], vs_out_attr2[1], vs_out_attr3[1], vs_out_attr4[1], vs_out_attr5[1], vs_out_attr6[1]);
|
|
prim_buffer[2].attributes = vec4[7](vs_out_attr0[2], vs_out_attr1[2], vs_out_attr2[2], vs_out_attr3[2], vs_out_attr4[2], vs_out_attr5[2], vs_out_attr6[2]);
|
|
EmitPrim(prim_buffer[0], prim_buffer[1], prim_buffer[2]);
|
|
}
|
|
// reference: FC74FA4ACA1C8C74, 0D30074279C2FEED
|
|
// shader: 8B30, 858D4FE03323AB73
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 texcolor2 = textureLod(tex2, texcoord2, getLod(texcoord2 * vec2(textureSize(tex2, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += (((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(view)))) * light_src[0].specular_0) + (light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((texcolor0.rrr) * (const_color[0].aaa), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((last_tex_env_out.rgb) * (texcolor1.ggg), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) * (texcolor2.bbb) + (secondary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_3 = byteround(clamp((last_tex_env_out.rgb) + (last_tex_env_out.rgb) - vec3(0.5), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((last_tex_env_out.r) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3 * 4.0, alpha_output_3 * 4.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((last_tex_env_out.rgb) + (const_color[4].rgb), vec3(1.0)) * (rounded_primary_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4 * 1.0, alpha_output_4 * 2.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((combiner_buffer.rgb) * (const_color[5].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_5 * 1.0, alpha_output_5 * 4.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 238D1DA92895D4CA, 858D4FE03323AB73
|
|
// program: C525A4B3D4F318E3, 0D30074279C2FEED, 858D4FE03323AB73
|
|
// shader: 8B30, FBA772A2FCE68DA2
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
geo_factor = dot(half_vector, half_vector);
|
|
geo_factor = geo_factor == 0.0 ? 0.0 : min(dot_product / geo_factor, 1.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
specular_sum.a = (lut_scale_fr * LookupLightingLUTSigned(3, dot(light_vector, normal)));
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += ((((lut_scale_d0 * LookupLightingLUTSigned(0, dot(normal, normalize(half_vector)))) * light_src[0].specular_0) * geo_factor) + ((lut_scale_d1 * LookupLightingLUTSigned(1, dot(normal, normalize(view)))) * light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
secondary_fragment_color = clamp(specular_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((vec3(1.0) - secondary_fragment_color.aaa) * (const_color[0].rgb) + (primary_fragment_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
next_combiner_buffer.rgb = last_tex_env_out.rgb;
|
|
|
|
vec3 color_output_1 = byteround(clamp((texcolor0.rgb) * (const_color[1].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((last_tex_env_out.rgb) * (combiner_buffer.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((last_tex_env_out.a) * (const_color[2].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((secondary_fragment_color.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((rounded_primary_color.rgb) + (const_color[4].rgb), vec3(1.0)) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_4 * 2.0, alpha_output_4 * 1.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 902139272B3C74AB, FBA772A2FCE68DA2
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, FBA772A2FCE68DA2
|
|
// shader: 8B30, AF523BD092B575E3
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((texcolor0.rgb) * (rounded_primary_color.rgb) + (const_color[0].rgb) * (vec3(1.0) - (rounded_primary_color.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((texcolor0.a) * (rounded_primary_color.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = (last_tex_env_out.rgb);
|
|
float alpha_output_1 = byteround(clamp((last_tex_env_out.a) * (const_color[1].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) > alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 93BBCF6CB4A686B4, AF523BD092B575E3
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, AF523BD092B575E3
|
|
// shader: 8B30, 3D9B2309F3CBFA66
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((texcolor0.rgb) * (rounded_primary_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((last_tex_env_out.rgb) + (const_color[1].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = byteround(clamp((last_tex_env_out.a) * (const_color[1].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: BB685E94A359D0EC, 3D9B2309F3CBFA66
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, 3D9B2309F3CBFA66
|
|
// shader: 8B30, 059319FEC0C17313
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - const_color[3].aaa) * (texcolor1.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((1.0 - const_color[3].a) * (texcolor1.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: EA90293E9C5EBC2F, 059319FEC0C17313
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 059319FEC0C17313
|
|
// shader: 8B30, 44351D55F69FDB9E
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: BA4C455E1879FDDC, 44351D55F69FDB9E
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 44351D55F69FDB9E
|
|
// shader: 8B30, E898135BEDCC50F9
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 06A64FF09986EB66, E898135BEDCC50F9
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, E898135BEDCC50F9
|
|
// shader: 8B30, 82C478F72E882473
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((texcolor0.rgb) + (const_color[4].rgb), vec3(1.0)) * (texcolor0.aaa), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4 * 1.0, alpha_output_4 * 2.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = (texcolor1.rgb);
|
|
float alpha_output_5 = byteround(clamp((const_color[5].r) * (last_tex_env_out.a) + (last_tex_env_out.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: FF0155210D3E3032, 82C478F72E882473
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 82C478F72E882473
|
|
// shader: 8B30, C41AEAA0D619D50E
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 06A64FF0D77E627C, C41AEAA0D619D50E
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, C41AEAA0D619D50E
|
|
// shader: 8B30, 67E45CC8492A1D65
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 75D4A1A19986EB66, 67E45CC8492A1D65
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 67E45CC8492A1D65
|
|
// shader: 8B30, 38CAF26C67399908
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - const_color[3].aaa) * (texcolor1.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((1.0 - const_color[3].a) * (texcolor1.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: A26A834D2EF63C87, 38CAF26C67399908
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 38CAF26C67399908
|
|
// shader: 8B30, DE5A847F780ACB2D
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: F2B6EF2DAAD17D74, DE5A847F780ACB2D
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, DE5A847F780ACB2D
|
|
// shader: 8B30, C9C5B56557C5004F
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 4E5CE5832B2E6BCE, C9C5B56557C5004F
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, C9C5B56557C5004F
|
|
// shader: 8B30, F076A32898C25D1F
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((texcolor0.rgb) + (const_color[4].rgb), vec3(1.0)) * (texcolor0.aaa), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4 * 1.0, alpha_output_4 * 2.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = (texcolor1.rgb);
|
|
float alpha_output_5 = byteround(clamp((const_color[5].r) * (last_tex_env_out.a) + (last_tex_env_out.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: B7FBFF52BF96B09A, F076A32898C25D1F
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, F076A32898C25D1F
|
|
// shader: 8B30, AD67FF21F4C6AA11
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 4E5CE58365D6E2D4, AD67FF21F4C6AA11
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, AD67FF21F4C6AA11
|
|
// shader: 8B30, D16965BE132A19D9
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 3D2E0BD22B2E6BCE, D16965BE132A19D9
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, D16965BE132A19D9
|
|
// shader: 8B30, 505AF6666F4AACF3
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: C0733CCBD6E66287, 505AF6666F4AACF3
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 505AF6666F4AACF3
|
|
// shader: 8B30, E7D3C377CD704D39
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((texcolor0.rgb) + (const_color[4].rgb), vec3(1.0)) * (texcolor0.aaa), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4 * 1.0, alpha_output_4 * 2.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = (texcolor1.rgb);
|
|
float alpha_output_5 = byteround(clamp((const_color[5].r) * (last_tex_env_out.a) + (last_tex_env_out.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 39D4261A425EB9D3, E7D3C377CD704D39
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, E7D3C377CD704D39
|
|
// shader: 8B30, 5C300A48AF7AB5E5
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: C0733CCB981EEB9D, 5C300A48AF7AB5E5
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 5C300A48AF7AB5E5
|
|
// shader: 8B30, 8A96F203759B603F
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: B301D29AD6E66287, 8A96F203759B603F
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 8A96F203759B603F
|
|
// shader: 8B30, 7FC8985C167A8A61
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((texcolor0.rgb) + (const_color[4].rgb), vec3(1.0)) * (texcolor0.aaa), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4 * 1.0, alpha_output_4 * 2.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = (texcolor1.rgb);
|
|
float alpha_output_5 = byteround(clamp((const_color[5].r) * (last_tex_env_out.a) + (last_tex_env_out.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 712E8C698674A9CF, 7FC8985C167A8A61
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 7FC8985C167A8A61
|
|
// shader: 8B30, 7E11136BF7628D63
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 888996B846589176, 7E11136BF7628D63
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 7E11136BF7628D63
|
|
// shader: 8B30, AC9901DA47E28414
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 34639C16C7A787CC, AC9901DA47E28414
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, AC9901DA47E28414
|
|
// shader: 8B30, 785ABEF81379F9F6
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp(min((texcolor0.rgb) + (const_color[4].rgb), vec3(1.0)) * (texcolor0.aaa), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4 * 1.0, alpha_output_4 * 2.0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = (texcolor1.rgb);
|
|
float alpha_output_5 = byteround(clamp((const_color[5].r) * (last_tex_env_out.a) + (last_tex_env_out.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 712E8C69D2E04A22, 785ABEF81379F9F6
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 785ABEF81379F9F6
|
|
// shader: 8B30, AD7C5E6BE26FA2E3
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 888996B808A0186C, AD7C5E6BE26FA2E3
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, AD7C5E6BE26FA2E3
|
|
// shader: 8B30, 66308F6DF9114D38
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: FBFB78E946589176, 66308F6DF9114D38
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 66308F6DF9114D38
|
|
// shader: 8B30, 6DFF458FDC50F43D
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].aaa) * (texcolor1.aaa) + (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (texcolor0.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 91F664ADDE362819, 6DFF458FDC50F43D
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 6DFF458FDC50F43D
|
|
// reference: 3BF0DC8C7089D8FC, 80936C90EED95ACE
|
|
// reference: 4352CE4481DE48D7, 5F12D3BD90BC91BD
|
|
// shader: 8B30, 9573D0022CBBC642
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
if (!(gl_FragCoord.x >= float(scissor_x1) && gl_FragCoord.y >= float(scissor_y1) && gl_FragCoord.x < float(scissor_x2) && gl_FragCoord.y < float(scissor_y2))) discard;
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
|
|
vec4 diffuse_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec4 specular_sum = vec4(0.0, 0.0, 0.0, 1.0);
|
|
vec3 light_vector = vec3(0.0);
|
|
vec3 refl_value = vec3(0.0);
|
|
vec3 spot_dir = vec3(0.0);
|
|
vec3 half_vector = vec3(0.0);
|
|
float dot_product = 0.0;
|
|
float clamp_highlights = 1.0;
|
|
float geo_factor = 1.0;
|
|
vec3 surface_normal = vec3(0.0, 0.0, 1.0);
|
|
vec3 surface_tangent = vec3(1.0, 0.0, 0.0);
|
|
vec4 normalized_normquat = normalize(normquat);
|
|
vec3 normal = quaternion_rotate(normalized_normquat, surface_normal);
|
|
vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);
|
|
vec4 shadow = vec4(1.0);
|
|
light_vector = normalize(light_src[0].position);
|
|
spot_dir = light_src[0].spot_direction;
|
|
half_vector = normalize(view) + light_vector;
|
|
dot_product = max(dot(light_vector, normal), 0.0);
|
|
refl_value.r = 1.0;
|
|
refl_value.g = refl_value.r;
|
|
refl_value.b = refl_value.r;
|
|
diffuse_sum.rgb += ((light_src[0].diffuse * dot_product) + light_src[0].ambient) * 1.0;
|
|
specular_sum.rgb += ((light_src[0].specular_0) + (light_src[0].specular_1)) * clamp_highlights * 1.0;
|
|
diffuse_sum.rgb += lighting_global_ambient;
|
|
primary_fragment_color = clamp(diffuse_sum, vec4(0.0), vec4(1.0));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((last_tex_env_out.rgb) * (rounded_primary_color.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 47C3ACB61FB0A8BB, 9573D0022CBBC642
|
|
// program: 697A254F4A9BF97A, D7255673101445A5, 9573D0022CBBC642
|
|
// reference: FE040B70782466A4, B4D7345E1C3DEF57
|
|
// shader: 8B30, BDCC184B0771536A
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - const_color[3].aaa) * (texcolor1.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((1.0 - const_color[3].a) * (texcolor1.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: EA90293EEADC2C9B, BDCC184B0771536A
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, BDCC184B0771536A
|
|
// shader: 8B30, 92DEF5D15306DB7A
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: BA4C455E6EFB6D68, 92DEF5D15306DB7A
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 92DEF5D15306DB7A
|
|
// shader: 8B30, 963266B2776A950E
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 06A64FF0EF047BD2, 963266B2776A950E
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 963266B2776A950E
|
|
// shader: 8B30, 17C4B14FCF8ABA6F
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 75D4A1A1EF047BD2, 17C4B14FCF8ABA6F
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 17C4B14FCF8ABA6F
|
|
// shader: 8B30, FC3FB212A567BB30
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((rounded_primary_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_2 = byteround(clamp((texcolor1.aaa) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_2 = byteround(clamp((texcolor1.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_2, alpha_output_2);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: BA4C455E2003E472, FC3FB212A567BB30
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, FC3FB212A567BB30
|
|
// shader: 8B30, 551EF7F28B635035
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 7C99366519E1FD27, 551EF7F28B635035
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 551EF7F28B635035
|
|
// shader: 8B30, 9FA97ACC8F33CA61
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.g), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: AD9EB7CDFF2D5B60, 9FA97ACC8F33CA61
|
|
// program: 888714CB0B590345, 24CFA9CD0C9C43C4, 9FA97ACC8F33CA61
|
|
// shader: 8B30, ED52099320F83CD1
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.g), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: BC7993305719743D, ED52099320F83CD1
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, ED52099320F83CD1
|
|
// shader: 8B30, 505AF66604E1D901
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.g), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 0093999ED6E66287, 505AF66604E1D901
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 505AF66604E1D901
|
|
// shader: 8B30, 8A96F2031E3015CD
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.g), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((vec3(1.0) - texcolor0.rgb) * (const_color[3].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((texcolor0.a) * (const_color[3].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((texcolor0.rgb) * (const_color[4].rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((1.0 - texcolor0.a) * (const_color[4].a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 73E177CFD6E66287, 8A96F2031E3015CD
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 8A96F2031E3015CD
|
|
// shader: 8B30, 551EF7F2E0C825C7
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((const_color[0].rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.g), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_1 = byteround(clamp((rounded_primary_color.rgb) * (vec3(1.0) - texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_1 = (last_tex_env_out.a);
|
|
last_tex_env_out = vec4(color_output_1, alpha_output_1);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].rgb) * (vec3(1.0) - texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = byteround(clamp((const_color[3].a) * (1.0 - texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (texcolor0.rgb) + (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (texcolor0.a) + (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (const_color[5].rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (const_color[5].a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
if (int(last_tex_env_out.a * 255.0) <= alphatest_ref) discard;
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: BC79933019E1FD27, 551EF7F2E0C825C7
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, 551EF7F2E0C825C7
|
|
// shader: 8B30, D002DD0C01C54281
|
|
in vec4 primary_color;
|
|
in vec2 texcoord0;
|
|
in vec2 texcoord1;
|
|
in vec2 texcoord2;
|
|
in float texcoord0_w;
|
|
in vec4 normquat;
|
|
in vec3 view;
|
|
|
|
#ifndef CITRA_GLES
|
|
in vec4 gl_FragCoord;
|
|
#endif // CITRA_GLES
|
|
out vec4 color;
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform sampler2D tex2;
|
|
uniform samplerCube tex_cube;
|
|
uniform samplerBuffer texture_buffer_lut_lf;
|
|
uniform samplerBuffer texture_buffer_lut_rg;
|
|
uniform samplerBuffer texture_buffer_lut_rgba;
|
|
|
|
#define NUM_TEV_STAGES 6
|
|
layout (std140) uniform shader_data {
|
|
int alphatest_ref;
|
|
float depth_scale;
|
|
float depth_offset;
|
|
float shadow_bias_constant;
|
|
float shadow_bias_linear;
|
|
int scissor_x1;
|
|
int scissor_y1;
|
|
int scissor_x2;
|
|
int scissor_y2;
|
|
int fog_lut_offset;
|
|
int proctex_noise_lut_offset;
|
|
int proctex_color_map_offset;
|
|
int proctex_alpha_map_offset;
|
|
int proctex_lut_offset;
|
|
int proctex_diff_lut_offset;
|
|
float proctex_bias;
|
|
vec3 fog_color;
|
|
vec2 proctex_noise_f;
|
|
vec2 proctex_noise_a;
|
|
vec2 proctex_noise_p;
|
|
vec4 const_color[NUM_TEV_STAGES];
|
|
vec4 tev_combiner_buffer_color;
|
|
vec4 clip_coef;
|
|
};
|
|
|
|
#define NUM_LIGHTS 8
|
|
#define NUM_LIGHTING_SAMPLERS 24
|
|
struct LightSrc {
|
|
vec3 specular_0;
|
|
vec3 specular_1;
|
|
vec3 diffuse;
|
|
vec3 ambient;
|
|
vec3 position;
|
|
vec3 spot_direction;
|
|
float dist_atten_bias;
|
|
float dist_atten_scale;
|
|
};
|
|
layout (std140) uniform shader_light_data {
|
|
ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4];
|
|
vec3 lighting_global_ambient;
|
|
LightSrc light_src[NUM_LIGHTS];
|
|
float lut_scale_d0;
|
|
float lut_scale_d1;
|
|
float lut_scale_sp;
|
|
float lut_scale_fr;
|
|
float lut_scale_rb;
|
|
float lut_scale_rg;
|
|
float lut_scale_rr;
|
|
int shadow_texture_bias;
|
|
};
|
|
|
|
// Rotate the vector v by the quaternion q
|
|
vec3 quaternion_rotate(vec4 q, vec3 v) {
|
|
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
|
|
}
|
|
|
|
float LookupLightingLUT(int lut_index, int index, float delta) {
|
|
vec2 entry = texelFetch(texture_buffer_lut_lf, lighting_lut_offset[lut_index >> 2][lut_index & 3] + index).rg;
|
|
return entry.r + entry.g * delta;
|
|
}
|
|
|
|
float LookupLightingLUTUnsigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 256.0), 0, 255);
|
|
float delta = pos * 256.0 - float(index);
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float LookupLightingLUTSigned(int lut_index, float pos) {
|
|
int index = clamp(int(pos * 128.0), -128, 127);
|
|
float delta = pos * 128.0 - float(index);
|
|
if (index < 0) index += 256;
|
|
return LookupLightingLUT(lut_index, index, delta);
|
|
}
|
|
|
|
float byteround(float x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec2 byteround(vec2 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec3 byteround(vec3 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
vec4 byteround(vec4 x) {
|
|
return round(x * 255.0) * (1.0 / 255.0);
|
|
}
|
|
|
|
float getLod(vec2 coord) {
|
|
vec2 d = max(abs(dFdx(coord)), abs(dFdy(coord)));
|
|
return log2(max(d.x, d.y));
|
|
}
|
|
|
|
vec4 shadowTexture(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
vec4 shadowTextureCube(vec2 uv, float w) {
|
|
return vec4(1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 rounded_primary_color = byteround(primary_color);
|
|
vec4 primary_fragment_color = vec4(0.0);
|
|
vec4 secondary_fragment_color = vec4(0.0);
|
|
float z_over_w = 2.0 * gl_FragCoord.z - 1.0;
|
|
float depth = z_over_w * depth_scale + depth_offset;
|
|
vec4 texcolor0 = textureLod(tex0, texcoord0, getLod(texcoord0 * vec2(textureSize(tex0, 0))));
|
|
vec4 texcolor1 = textureLod(tex1, texcoord1, getLod(texcoord1 * vec2(textureSize(tex1, 0))));
|
|
vec4 combiner_buffer = vec4(0.0);
|
|
vec4 next_combiner_buffer = tev_combiner_buffer_color;
|
|
vec4 last_tex_env_out = vec4(0.0);
|
|
vec3 color_output_0 = byteround(clamp((primary_fragment_color.rgb) * (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_0 = byteround(clamp((rounded_primary_color.a) * (texcolor0.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_0, alpha_output_0);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_3 = byteround(clamp((const_color[3].aaa) * (texcolor1.aaa) + (texcolor0.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_3 = (texcolor0.a);
|
|
last_tex_env_out = vec4(color_output_3, alpha_output_3);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_4 = byteround(clamp((const_color[4].rgb) * (last_tex_env_out.rgb) + (combiner_buffer.rgb) * (vec3(1.0) - (last_tex_env_out.rgb)), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_4 = byteround(clamp((const_color[4].a) * (last_tex_env_out.a) + (combiner_buffer.a) * (1.0 - (last_tex_env_out.a)), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_4, alpha_output_4);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
vec3 color_output_5 = byteround(clamp((rounded_primary_color.rgb) * (last_tex_env_out.rgb), vec3(0.0), vec3(1.0)));
|
|
float alpha_output_5 = byteround(clamp((rounded_primary_color.a) * (last_tex_env_out.a), 0.0, 1.0));
|
|
last_tex_env_out = vec4(color_output_5, alpha_output_5);
|
|
last_tex_env_out = clamp(last_tex_env_out, vec4(0.0), vec4(1.0));
|
|
combiner_buffer = next_combiner_buffer;
|
|
|
|
gl_FragDepth = depth;
|
|
color = byteround(last_tex_env_out);
|
|
}
|
|
// reference: 1FD9BDE501E85209, D002DD0C01C54281
|
|
// program: AD35AAAFFE2E55A4, 1C4CBC8096EA16CD, D002DD0C01C54281
|