mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
LibGL+LibSoftGPU: Add GL_ADD
Texture Environment
This commit is contained in:
parent
e34f199997
commit
c9f44c746a
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