mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-09-26 20:11:28 +08:00
colorm: extra notes on how colorm operates (#3307)
This commit is contained in:
@@ -27,13 +27,15 @@ import (
|
||||
// Dim is the dimension of a ColorM.
|
||||
const Dim = affine.ColorMDim
|
||||
|
||||
// ColorM represents a matrix to transform coloring when rendering an image.
|
||||
// ColorM represents a matrix to transform coloring when rendering an image. The matrix
|
||||
// is applied by a fragment shader to each pixel during the rendering process.
|
||||
//
|
||||
// ColorM is applied to the straight alpha color
|
||||
// while an Image's pixels' format is alpha premultiplied.
|
||||
// Before applying a matrix, a color is un-multiplied, and after applying the matrix,
|
||||
// the color is multiplied again.
|
||||
//
|
||||
// The pixel input and output are expected to be r,g,b,a values in the range 0 to 1.
|
||||
|
||||
// The initial value is identity.
|
||||
type ColorM struct {
|
||||
impl affine.ColorM
|
||||
|
Reference in New Issue
Block a user