Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/layaAir/laya/spine/shader/files/Spine3D.vs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ void main()

#ifdef COLOR2
v_color2 = a_color2;
#ifdef Gamma_u_spineTexture
v_color2.rgb = pow(v_color2.rgb, vec3(2.2));
#endif
#else
v_color2 = vec4(0.0, 0.0, 0.0, 1.0);
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/layaAir/laya/spine/shader/files/Spine3DVertex.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ void getVertexParams(inout Vertex vertex)
vertex.vertexColor = vec4(1.0,1.0,1.0,1.0);

vertex.vertexColor = a_color;
#ifdef Gamma_u_spineTexture
vertex.vertexColor.rgb = pow(vertex.vertexColor.rgb, vec3(2.2));
#endif
vertex.vertexColor.rgb *=a_color.a;

vertex.texCoord0 = a_uv;
Expand Down