mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb/WebGL: Respect UNPACK_PREMULTIPLY_ALPHA
Fixes splats on https://superspl.at having dark splotches, as they expect textures with unpremultiplied alpha.
This commit is contained in:
parent
8f666c6360
commit
8adde0980a
Notes:
github-actions[bot]
2025-11-04 16:07:39 +00:00
Author: https://github.com/Lubrsi
Commit: 8adde0980a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6694
Reviewed-by: https://github.com/gmta ✅
4 changed files with 18 additions and 2 deletions
|
|
@ -1509,6 +1509,8 @@ JS::Value WebGLRenderingContextImpl::get_parameter(WebIDL::UnsignedLong pname)
|
|||
}
|
||||
case UNPACK_FLIP_Y_WEBGL:
|
||||
return JS::Value(m_unpack_flip_y);
|
||||
case UNPACK_PREMULTIPLY_ALPHA_WEBGL:
|
||||
return JS::Value(m_unpack_premultiply_alpha);
|
||||
default:
|
||||
dbgln("Unknown WebGL parameter name: {:x}", pname);
|
||||
set_error(GL_INVALID_ENUM);
|
||||
|
|
@ -1907,6 +1909,9 @@ void WebGLRenderingContextImpl::pixel_storei(WebIDL::UnsignedLong pname, WebIDL:
|
|||
case UNPACK_FLIP_Y_WEBGL:
|
||||
m_unpack_flip_y = param != GL_FALSE;
|
||||
return;
|
||||
case UNPACK_PREMULTIPLY_ALPHA_WEBGL:
|
||||
m_unpack_premultiply_alpha = param != GL_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
glPixelStorei(pname, param);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue