You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Direct3D / OpenGL renderers the custom blend modes were implemented using standard alpha-blend operations, which seem to have two problems:
the result is not precise;
this may conflict with situations where we must use specific kind of alpha blending operations for other reasons.
The latter is now a real problem, after #1874: as the textures used as render targets for the group of sprites must be blended using very particular blend ops.
The proposed solution is to reimplement these Blend Modes using shaders.
My understanding is that in OpenGL shaders must include transparency, because it's currently done through a shader, although I cannot remember why that was made so (afaik this was a part of switching to a more contemporary OpenGL style). Existing shaders may be used as example.
Besides that, we need to decide whether Tint and LightLevel effects should apply along with the BlendMode or not. This decision will affect the complexity of this task.
The text was updated successfully, but these errors were encountered:
My understanding is that in OpenGL shaders must include transparency, because it's currently done through a shader, although I cannot remember why that was made so
I am not 100% sure, but it may be when the OpenGL ES2 version of the renderer was written, because OpenGL ES2 has a lot less things in its API.
Edit: we could move to OpenGL ES3, It may have a bit more things and is available in most devices - Apple added support to WebGL 2.0 in Safari in 2021 which mean it could be used in the Emscripten emulation nowadays.
For Direct3D / OpenGL renderers the custom blend modes were implemented using standard alpha-blend operations, which seem to have two problems:
The latter is now a real problem, after #1874: as the textures used as render targets for the group of sprites must be blended using very particular blend ops.
The proposed solution is to reimplement these Blend Modes using shaders.
My understanding is that in OpenGL shaders must include transparency, because it's currently done through a shader, although I cannot remember why that was made so (afaik this was a part of switching to a more contemporary OpenGL style). Existing shaders may be used as example.
Besides that, we need to decide whether Tint and LightLevel effects should apply along with the BlendMode or not. This decision will affect the complexity of this task.
The text was updated successfully, but these errors were encountered: