1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

LibGL+LibSoftGPU: Add GL_ADD Texture Environment

This commit is contained in:
Jesse Buhagiar 2022-03-09 21:27:50 +11:00 committed by Andreas Kling
parent e34f199997
commit c9f44c746a
Notes: sideshowbarker 2024-07-17 14:15:38 +09:00
4 changed files with 13 additions and 0 deletions

View file

@ -991,6 +991,12 @@ ALWAYS_INLINE void Device::shade_fragments(PixelQuad& quad)
quad.out_color.set_z(mix(quad.out_color.z(), texel.z(), dst_alpha));
break;
}
case GPU::TextureEnvMode::Add:
quad.out_color.set_x(quad.out_color.x() + texel.x());
quad.out_color.set_y(quad.out_color.y() + texel.y());
quad.out_color.set_z(quad.out_color.z() + texel.z());
quad.out_color.set_w(quad.out_color.w() * texel.w()); // FIXME: If texture format is `GL_INTENSITY` alpha components must be added (https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTexEnv.xml)
break;
default:
VERIFY_NOT_REACHED();
}