ebiten/internal/graphicsdriver/metal
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
..
ca internal/graphicsdriver/metal: Rename files to remove +build comments 2021-08-23 02:06:09 +09:00
mtl internal/graphicsdriver/metal/mtl: bug fix: test compile error 2022-02-11 23:23:22 +09:00
ns internal/graphicsdriver/metal: Rename files to remove +build comments 2021-08-23 02:06:09 +09:00
graphics_darwin.go internal/atlas: optimization: send premultiplied alpha from vertex to fragment shader. (#1996) 2022-02-24 02:27:50 +09:00
README.md Update import paths in the documents 2020-10-04 05:07:08 +09:00
shader_darwin.go internal/graphicsdriver/metal: rename files 2022-02-11 21:49:05 +09:00
view_darwin.go internal/ui: refactoring: remove dependency on the package mtl 2022-02-11 23:11:49 +09:00
view_ios.go internal/graphicsdriver/metal: rename files 2022-02-11 21:49:05 +09:00
view_macos_darwin.go internal/graphicsdriver/metal: rename files 2022-02-11 21:49:05 +09:00

These packages are copied from Dmitri Shuralyov's mtl packages and edited with Dmitri's permission:

  • github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver/metal/ca (copied from dmitri.shuralyov.com/gpu/mtl/example/movingtriangle/internal/ca)
  • github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver/metal/mtl (copied from dmitri.shuralyov.com/gpu/mtl)
  • github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver/metal/ns (copied from dmitri.shuralyov.com/gpu/mtl/example/movingtriangle/internal/ns)