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

14 lines
367 B
Plaintext
Raw Normal View History

2023-08-10 21:53:51 +00:00
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;
2023-08-10 22:46:04 +00:00
vec3 n = normalize(mat3(MVP) * v_normal); // transform normal to eye space
fragColor = diff;// * vec4(v_normal.xyz, 1);
2023-08-10 21:53:51 +00:00
}