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

16 lines
369 B
Plaintext
Raw Permalink Normal View History

2023-08-10 21:53:51 +00:00
uniform sampler2D fsDiffTex;
uniform sampler2D fsNormalTex;
uniform sampler2D fsPositionTex;
uniform mat4 MVP;
2023-09-10 14:46:07 +00:00
2023-08-10 21:53:51 +00:00
in vec3 v_normal;
in vec2 v_texcoord;
out vec4 fragColor;
2023-09-10 14:46:07 +00:00
2023-08-10 21:53:51 +00:00
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
}