0% found this document useful (0 votes)
17 views

fragment_1

The document is a GLSL shader code that defines various inputs, outputs, and uniform variables for rendering graphics. It includes functions for rounding color values and calculating levels of detail, as well as a main function that processes fragment colors and applies alpha testing. There are multiple redeclaration errors for variables, indicating potential issues in the code structure.

Uploaded by

chatini3170
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

fragment_1

The document is a GLSL shader code that defines various inputs, outputs, and uniform variables for rendering graphics. It includes functions for rounding color values and calculating levels of detail, as well as a main function that processes fragment colors and applies alpha testing. There are multiple redeclaration errors for variables, indicating potential issues in the code structure.

Uploaded by

chatini3170
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

#version 320 es

#define CITRA_GLES
#if defined(GL_ANDROID_extension_pack_es31a)
#extension GL_ANDROID_extension_pack_es31a : enable
#endif // defined(GL_ANDROID_extension_pack_es31a)
#if defined(GL_EXT_clip_cull_distance)
#extension GL_EXT_clip_cull_distance : enable
#endif // defined(GL_EXT_clip_cull_distance)

precision highp int;


precision highp float;
precision highp uimage2D;
precision highp usampler2D;
precision highp samplerBuffer;
layout(location=0) in vec4 primary_color;
layout(location=1) in vec4 texcoord0;
layout(location=2) in vec4 texcoord12;
layout(location=3) in vec4 normquat;
layout(location=4) in vec4 view;
out vec4 color;
layout(binding=0) uniform sampler2D tex0;
layout(binding=1) uniform sampler2D tex1;
layout(binding=2) uniform sampler2D tex2;
layout(binding=3) uniform samplerBuffer tex_lut_lf;
layout(binding=4) uniform samplerBuffer tex_lut_rg;
layout(binding=5) uniform samplerBuffer tex_lut_rgba;

layout(binding=0, std140) uniform shader_data {


int scissor_x1;
int scissor_y1;
int scissor_x2;
int scissor_y2;
int fog_lut_offset;
int proctex_lut_offset;
int proctex_diff_lut_offset;
int proctex_noise_lut_offset;
int proctex_color_map_offset;
int proctex_alpha_map_offset;
float alphatest_ref;
float depth_scale;
float depth_offset;
float shadow_bias_constant;
float shadow_bias_linear;
float proctex_bias;
vec3 fog_color;
vec3 tex_lod_bias;
vec2 proctex_noise_f;
vec2 proctex_noise_a;
vec2 proctex_noise_p;
vec4 blend_color;
vec4 tev_combiner_color;
vec4 const_color[6];
};

float ByteRound(float 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));
}

void main() {
vec4 rounded_primary_color = ByteRound(primary_color);
vec4 primary_fragment_color = vec4(0);
vec4 secondary_fragment_color = vec4(0);
discard; }// shader: 8B30, E3E8214155A8F32A
layout(location=0) in vec4 primary_color;
layout(location=1) in vec4 texcoord0;
layout(location=2) in vec4 texcoord12;
layout(location=3) in vec4 normquat;
layout(location=4) in vec4 view;
out vec4 color;
layout(binding=0) uniform sampler2D tex0;
layout(binding=1) uniform sampler2D tex1;
layout(binding=2) uniform sampler2D tex2;
layout(binding=3) uniform samplerBuffer tex_lut_lf;
layout(binding=4) uniform samplerBuffer tex_lut_rg;
layout(binding=5) uniform samplerBuffer tex_lut_rgba;

layout(binding=0, std140) uniform shader_data {


int scissor_x1;
int scissor_y1;
int scissor_x2;
int scissor_y2;
int fog_lut_offset;
int proctex_lut_offset;
int proctex_diff_lut_offset;
int proctex_noise_lut_offset;
int proctex_color_map_offset;
int proctex_alpha_map_offset;
float alphatest_ref;
float depth_scale;
float depth_offset;
float shadow_bias_constant;
float shadow_bias_linear;
float proctex_bias;
vec3 fog_color;
vec3 tex_lod_bias;
vec2 proctex_noise_f;
vec2 proctex_noise_a;
vec2 proctex_noise_p;
vec4 blend_color;
vec4 tev_combiner_color;
vec4 const_color[6];
};

float ByteRound(float 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));
}

void main() {
vec4 rounded_primary_color = ByteRound(primary_color);
vec4 primary_fragment_color = vec4(0);
vec4 secondary_fragment_color = vec4(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.xy, GetLod(texcoord0.xy *
vec2(textureSize(tex0, 0))) + tex_lod_bias[0]);
vec4 combiner_buffer = vec4(0);
vec4 next_combiner_buffer = tev_combiner_color;
vec4 last_tev_out = vec4(0);
vec3 color_output_0 = (rounded_primary_color.rgb);
float alpha_output_0 = (texcolor0.a);
last_tev_out = vec4(color_output_0, alpha_output_0);
last_tev_out = clamp(last_tev_out, vec4(0), vec4(1));
combiner_buffer = next_combiner_buffer;
vec3 color_output_1 = (last_tev_out.rgb);
float alpha_output_1 = ByteRound(clamp((rounded_primary_color.a) *
(last_tev_out.a), 0.0, 1.0));
last_tev_out = vec4(color_output_1, alpha_output_1);
last_tev_out = clamp(last_tev_out, vec4(0), vec4(1));
if (last_tev_out.a <= alphatest_ref) discard;
gl_FragDepth = depth;
color = ByteRound(last_tev_out);
}

1:60: S0022: Symbol 'primary_color' redeclared


1:61: S0022: Symbol 'texcoord0' redeclared
1:62: S0022: Symbol 'texcoord12' redeclared
1:63: S0022: Symbol 'normquat' redeclared
1:64: S0022: Symbol 'view' redeclared
1:65: S0022: Symbol 'color' redeclared
1:66: S0022: Symbol 'tex0' redeclared
1:67: S0022: Symbol 'tex1' redeclared
1:68: S0022: Symbol 'tex2' redeclared
1:69: S0022: Symbol 'tex_lut_lf' redeclared
1:70: S0022: Symbol 'tex_lut_rg' redeclared
1:71: S0022: Symbol 'tex_lut_rgba' redeclared
1:73: S0024: Symbol 'shader_data' redeclared
1:98: S0024: Symbol 'scissor_x1' redeclared
1:98: S0024: Symbol 'scissor_y1' redeclared
1:98: S0024: Symbol 'scissor_x2' redeclared
1:98: S0024: Symbol 'scissor_y2' redeclared
1:98: S0024: Symbol 'fog_lut_offset' redeclared
1:98: S0024: Symbol 'proctex_lut_offset' redeclared
1:98: S0024: Symbol 'proctex_diff_lut_offset' redeclared
1:98: S0024: Symbol 'proctex_noise_lut_offset' redeclared
1:98: S0024: Symbol 'proctex_color_map_offset' redeclared
1:98: S0024: Symbol 'proctex_alpha_map_offset' redeclared
1:98: S0024: Symbol 'alphatest_ref' redeclared
1:98: S0024: Symbol 'depth_scale' redeclared
1:98: S0024: Symbol 'depth_offset' redeclared
1:98: S0024: Symbol 'shadow_bias_constant' redeclared
1:98: S0024: Symbol 'shadow_bias_linear' redeclared
1:98: S0024: Symbol 'proctex_bias' redeclared
1:98: S0024: Symbol 'fog_color' redeclared
1:98: S0024: Symbol 'tex_lod_bias' redeclared
1:98: S0024: Symbol 'proctex_noise_f' redeclared
1:98: S0024: Symbol 'proctex_noise_a' redeclared
1:98: S0024: Symbol 'proctex_noise_p' redeclared
1:98: S0024: Symbol 'blend_color' redeclared
1:98: S0024: Symbol 'tev_combiner_color' redeclared
1:98: S0024: Symbol 'const_color' redeclared#

You might also like