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:
parent
e34f199997
commit
c9f44c746a
Notes:
sideshowbarker
2024-07-17 14:15:38 +09:00
Author: https://github.com/Quaker762
Commit: c9f44c746a
Pull-request: https://github.com/SerenityOS/serenity/pull/13271
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/EWouters
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/sunverwerth ✅
4 changed files with 13 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue