love.graphics.setColor no longer uses the main per-vertex color attribute. This lets it affect the color of ParticleSystems, and SpriteBatches and Meshes even when they use custom per-vertex colors.

This commit is contained in:
Alex Szpakowski
2015-06-21 11:20:26 -03:00
parent 42ae9c9585
commit c82ccbb89b
10 changed files with 21 additions and 51 deletions
@@ -71,6 +71,7 @@ GLSL.VERTEX = {
attribute vec4 VertexPosition;
attribute vec4 VertexTexCoord;
attribute vec4 VertexColor;
attribute vec4 ConstantColor;
varying vec4 VaryingTexCoord;
varying vec4 VaryingColor;
@@ -82,7 +83,7 @@ uniform mediump float love_PointSize;
FOOTER = [[
void main() {
VaryingTexCoord = VertexTexCoord;
VaryingColor = VertexColor;
VaryingColor = VertexColor * ConstantColor;
#ifdef GL_ES
gl_PointSize = love_PointSize;
#endif