v4k-git-backup/engine/art/shaderlib/lightmap.glsl

19 lines
421 B
Plaintext
Raw Normal View History

2024-08-24 13:29:05 +00:00
#ifdef LIGHTMAP_BAKING
void main() {
vec3 n = normalize(v_normal_ws);
vec4 diffuse;
if(u_textured) {
diffuse = texture(u_texture2d, v_texcoord);
} else {
diffuse = u_diffuse; // * v_color;
}
if (u_texlit) {
vec4 litsample = texture(u_lightmap, v_texcoord);
diffuse *= litsample;
}
fragcolor = vec4(diffuse.rgb*u_litboost, 1.0);
}
#endif