26 lines
557 B
GLSL
26 lines
557 B
GLSL
#version 330 core
|
|
|
|
in vec2 v_texcoord;
|
|
// in vec3 v_fragpos;
|
|
in vec3 v_normal;
|
|
|
|
uniform sampler2D u_tex;
|
|
uniform sampler2D u_tex1;
|
|
|
|
uniform float u_uv_mult;
|
|
|
|
layout (location = 0) out vec4 o_color;
|
|
layout (location = 1) out vec4 o_normal;
|
|
|
|
void main() {
|
|
vec2 txc = vec2(v_texcoord.x, 1.0 - v_texcoord.y);
|
|
|
|
vec4 object_color_4 = texture(u_tex, txc) * texture(u_tex1, txc * u_uv_mult);
|
|
if (object_color_4.a < 0.5) discard;
|
|
vec3 object_color = object_color_4.rgb;
|
|
o_color = vec4(object_color, 1.0);
|
|
o_normal = vec4(v_normal, 1.0);
|
|
|
|
|
|
}
|