Tue, 12 Aug 2025 21:04:59 +0200
update viewports of cameras before executing behaviors, so that the new viewport information is available in the behavior functions
layout(location = 0) out vec4 diffuse; in vec2 uvcoord; uniform sampler2D map_albedo; uniform sampler2D map_color; uniform vec4 color; void main(void) { // TODO: use greyscale texture instead vec4 color_map_pixel = texture(map_color, uvcoord); if (color_map_pixel.a > 0) { diffuse = color * color_map_pixel * texture(map_albedo, uvcoord); } else { diffuse = texture(map_albedo, uvcoord); } }