v4k-git-backup/engine/shaders/fs_32_4_model_basic.glsl

14 lines
307 B
GLSL

uniform sampler2D fsDiffTex;
uniform sampler2D fsNormalTex;
uniform sampler2D fsPositionTex;
uniform mat4 MVP;
in vec3 v_normal;
in vec2 v_texcoord;
out vec4 fragColor;
void main() {
vec4 diff = texture(fsDiffTex, v_texcoord).rgba;
vec3 n = normalize(mat3(MVP) * v_normal);
fragColor = diff;
}