mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphics: Rename color_matrix -> color_matrix_body
This commit is contained in:
parent
b86860abcc
commit
e6d0943366
@ -299,7 +299,7 @@ func (s *openGLState) useProgram(proj []float32, texture opengl.Texture, dst, sr
|
||||
esBody, esTranslate := colorM.UnsafeElements()
|
||||
|
||||
if !areSameFloat32Array(s.lastColorMatrix, esBody) {
|
||||
c.UniformFloats(program, "color_matrix", esBody)
|
||||
c.UniformFloats(program, "color_matrix_body", esBody)
|
||||
if s.lastColorMatrix == nil {
|
||||
s.lastColorMatrix = make([]float32, 16)
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ precision mediump float;
|
||||
{{Definitions}}
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform mat4 color_matrix;
|
||||
uniform mat4 color_matrix_body;
|
||||
uniform vec4 color_matrix_translation;
|
||||
|
||||
uniform highp vec2 source_size;
|
||||
@ -148,7 +148,7 @@ void main(void) {
|
||||
color.rgb /= color.a;
|
||||
}
|
||||
// Apply the color matrix
|
||||
color = (color_matrix * color) + color_matrix_translation;
|
||||
color = (color_matrix_body * color) + color_matrix_translation;
|
||||
color = clamp(color, 0.0, 1.0);
|
||||
// Premultiply alpha
|
||||
color.rgb *= color.a;
|
||||
|
Loading…
Reference in New Issue
Block a user