From 76b701a03d4ee285a1af9a7fdd60748dfbcd14a8 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 23 Sep 2020 16:24:41 +0900 Subject: [PATCH] ebiten: Better comments about uniform variables --- image.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/image.go b/image.go index 43fdd4ad3..ec2e7473f 100644 --- a/image.go +++ b/image.go @@ -408,6 +408,11 @@ type DrawTrianglesShaderOptions struct { CompositeMode CompositeMode // Uniforms is a set of uniform variables for the shader. + // The keys are the names of the uniform variables. + // The values must be float or []float. + // If the uniform variable type is an array, a vector or a matrix, + // you have to specify linearly flattened values as a slice. + // For example, if the uniform variable type is [4]vec4, the number of the slice values will be 16. Uniforms map[string]interface{} // Images is a set of the source images. @@ -537,6 +542,11 @@ type DrawRectShaderOptions struct { CompositeMode CompositeMode // Uniforms is a set of uniform variables for the shader. + // The keys are the names of the uniform variables. + // The values must be float or []float. + // If the uniform variable type is an array, a vector or a matrix, + // you have to specify linearly flattened values as a slice. + // For example, if the uniform variable type is [4]vec4, the number of the slice values will be 16. Uniforms map[string]interface{} // Images is a set of the source images.