ebiten/internal/graphicsdriver/opengl
divVerent f2209a0b51
internal/atlas: optimization: send premultiplied alpha from vertex to fragment shader. (#1996)
Note that this applies only to the builtin shaders - interface for Kage stays
unchanged for compatibility.

Minor compatibility delta: when interpolating alpha values, previous code has
created nonsense values, such as, when interpolating from
fully-transparent-black (0,0,0,0) to opaque-white (1,1,1,1), something like
half-transparent-grey (0.25,0.25,0.25,0.5) where half-transparent-white
(0.5,0.5,0.5,0.5) is used by the new code.

I assume this is a strict improvement, however this may warrant some testing.

Possible later improvement could be moving the premultiplication from fragment
shader to CPU. Did not do this as it makes the code rather inconsistent of Kage
vs built-in shader usage.

Updates #1772
2022-02-24 02:27:50 +09:00
..
gl .github/workflow: add a test to build with the build tag ebitencbackend 2022-02-13 16:57:48 +09:00
gles internal/graphicsdriver/opengl/gles: add GLES_SILENCE_DEPRECATION to suppress warnings 2022-01-05 01:54:00 +09:00
bytes.go Add go:build comments with go1.17beta1 fmt 2021-06-11 01:11:46 +09:00
context_desktop.go all: reorder build tags in an alphabetical order 2022-02-08 15:49:15 +09:00
context_js.go internal/driver: rename to internal/graphicsdriver 2022-02-06 20:41:32 +09:00
context_mobile.go internal/driver: rename to internal/graphicsdriver 2022-02-06 20:41:32 +09:00
context_notwebgl1.go Add go:build comments with go1.17beta1 fmt 2021-06-11 01:11:46 +09:00
context_webgl1.go Add go:build comments with go1.17beta1 fmt 2021-06-11 01:11:46 +09:00
context.go internal/driver: rename to internal/graphicsdriver 2022-02-06 20:41:32 +09:00
defaultshader.go internal/atlas: optimization: send premultiplied alpha from vertex to fragment shader. (#1996) 2022-02-24 02:27:50 +09:00
framebuffer.go graphicsdriver/opengl: Rename Driver -> Graphics 2020-04-04 17:23:38 +09:00
gl_js.go internal/graphicsdriver: Bug fix: getting a WebGL2 context might fail even though WebGL2RenderingContext exists 2021-08-01 22:00:47 +09:00
graphics_mobile.go Add go:build comments with go1.17beta1 fmt 2021-06-11 01:11:46 +09:00
graphics.go internal/graphicsdriver/metal: call PresentDrawable only when necessary 2022-02-22 01:37:13 +09:00
image.go internal/driver: rename to internal/graphicsdriver 2022-02-06 20:41:32 +09:00
locationcache.go internal/graphicsdriver/opengl: Bug fix: A location cache map must be reset when a program is deleted 2021-08-15 04:54:20 +09:00
program.go internal/driver: rename to internal/graphicsdriver 2022-02-06 20:41:32 +09:00
shader_desktop.go all: reorder build tags in an alphabetical order 2022-02-08 15:49:15 +09:00
shader_js.go internal/graphicsdriver: Bug fix: getting a WebGL2 context might fail even though WebGL2RenderingContext exists 2021-08-01 22:00:47 +09:00
shader_mobile.go internal/graphicsdriver: Bug fix: getting a WebGL2 context might fail even though WebGL2RenderingContext exists 2021-08-01 22:00:47 +09:00
shader.go internal/driver: rename to internal/graphicsdriver 2022-02-06 20:41:32 +09:00