From 72004b2e238050b6a04cbd07c96d054724739df3 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 2 Oct 2022 19:35:17 +0900 Subject: [PATCH] ebiten: update comments about Vertex Updates #2365 --- image.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/image.go b/image.go index f77ee1ac6..d3c6b230f 100644 --- a/image.go +++ b/image.go @@ -262,10 +262,12 @@ type Vertex struct { // ColorR/ColorG/ColorB/ColorA represents color scaling values. // Their interpretation depends on the concrete draw call used: - // - DrawTriangles: straight-alpha encoded color multiplier. + // - DrawTriangles: straight-alpha or premultiplied-alpha encoded color multiplier. + // The format is determined by ColorScaleFormat in DrawTrianglesOptions. // If ColorA is 0, the vertex is fully transparent and color is ignored. // If ColorA is 1, the vertex has the color (ColorR, ColorG, ColorB). - // Vertex colors are interpolated linearly respecting alpha. + // Vertex colors are converted to premultiplied-alpha internally and + // interpolated linearly respecting alpha. // - DrawTrianglesShader: arbitrary floating point values sent to the shader. // These are interpolated linearly and independently from each other. ColorR float32