File tree Expand file tree Collapse file tree 11 files changed +62
-37
lines changed
app/build/outputs/apk/release Expand file tree Collapse file tree 11 files changed +62
-37
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ ChangeLog
197197
198198- 3.3.1 (12/09/2022)
199199 - (f) fixed texture issue + color issue + blending issue. fixed #214
200+ - (f) fixed texture issue #204
200201- 3.3.0 (23/06/2022)
201202 - (n) interactive object orientation
202203 - (n) isometric, orthographic and free camera view
Original file line number Diff line number Diff line change 11precision mediump float;
22
33// colors
4- uniform vec4 vColorMask;
54varying vec4 v_Color;
5+ uniform vec4 vColorMask;
66
77// texture
88uniform bool u_Textured;
99uniform sampler2D u_Texture;
1010varying vec2 v_TexCoordinate;
1111
1212void main(){
13- if (u_Textured){
14- gl_FragColor = v_Color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
13+ vec4 color = v_Color;
14+ if (u_Textured && length(vec3(color)) > 0.0){
15+ gl_FragColor = color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
16+ } else if (u_Textured){
17+ gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * vColorMask;
1518 } else {
16- gl_FragColor = v_Color * vColorMask;
19+ gl_FragColor = color * vColorMask;
1720 }
18- gl_FragColor[3] = v_Color [3];
21+ gl_FragColor[3] = color [3];
1922}
Original file line number Diff line number Diff line change @@ -10,10 +10,13 @@ uniform sampler2D u_Texture;
1010varying vec2 v_TexCoordinate;
1111
1212void main(){
13- if (u_Textured){
14- gl_FragColor = v_Color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
13+ vec4 color = v_Color;
14+ if (u_Textured && length(vec3(color)) > 0.0){
15+ gl_FragColor = color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
16+ } else if (u_Textured){
17+ gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * vColorMask;
1518 } else {
16- gl_FragColor = v_Color * vColorMask;
19+ gl_FragColor = color * vColorMask;
1720 }
18- gl_FragColor[3] = v_Color [3];
21+ gl_FragColor[3] = color [3];
1922}
Original file line number Diff line number Diff line change 11precision mediump float;
22
33// colors
4- uniform vec4 vColorMask;
54varying vec4 v_Color;
5+ uniform vec4 vColorMask;
66
77// texture
88uniform bool u_Textured;
99uniform sampler2D u_Texture;
1010varying vec2 v_TexCoordinate;
1111
1212void main(){
13- if (u_Textured){
14- gl_FragColor = v_Color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
13+ vec4 color = v_Color;
14+ if (u_Textured && length(vec3(color)) > 0.0){
15+ gl_FragColor = color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
16+ } else if (u_Textured){
17+ gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * vColorMask;
1518 } else {
16- gl_FragColor = v_Color * vColorMask;
19+ gl_FragColor = color * vColorMask;
1720 }
18- gl_FragColor[3] = v_Color [3];
21+ gl_FragColor[3] = color [3];
1922}
Original file line number Diff line number Diff line change @@ -10,10 +10,13 @@ uniform sampler2D u_Texture;
1010varying vec2 v_TexCoordinate;
1111
1212void main(){
13- if (u_Textured){
14- gl_FragColor = vColor * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
13+ vec4 color = vColor;
14+ if (u_Textured && length(vec3(color)) > 0.0){
15+ gl_FragColor = color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
16+ } else if (u_Textured){
17+ gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * vColorMask;
1518 } else {
16- gl_FragColor = vColor * vColorMask;
19+ gl_FragColor = color * vColorMask;
1720 }
18- gl_FragColor[3] = vColor [3];
21+ gl_FragColor[3] = color [3];
1922}
Original file line number Diff line number Diff line change 11precision mediump float;
22
33// colors
4- uniform vec4 vColorMask;
54varying vec4 v_Color;
5+ uniform vec4 vColorMask;
66
77void main(){
88 gl_FragColor = v_Color * vColorMask;
Original file line number Diff line number Diff line change 11precision mediump float;
22
33// colors
4- uniform vec4 vColorMask;
54varying vec4 v_Color;
5+ uniform vec4 vColorMask;
66
77// texture
88uniform bool u_Textured;
99uniform sampler2D u_Texture;
1010varying vec2 v_TexCoordinate;
1111
1212void main(){
13- if (u_Textured){
14- gl_FragColor = v_Color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
13+ vec4 color = v_Color;
14+ if (u_Textured && length(vec3(color)) > 0.0){
15+ gl_FragColor = color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
16+ } else if (u_Textured){
17+ gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * vColorMask;
1518 } else {
16- gl_FragColor = v_Color * vColorMask;
19+ gl_FragColor = color * vColorMask;
1720 }
18- gl_FragColor[3] = v_Color [3];
21+ gl_FragColor[3] = color [3];
1922}
Original file line number Diff line number Diff line change @@ -10,10 +10,13 @@ uniform sampler2D u_Texture;
1010varying vec2 v_TexCoordinate;
1111
1212void main(){
13- if (u_Textured){
14- gl_FragColor = v_Color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
13+ vec4 color = v_Color;
14+ if (u_Textured && length(vec3(color)) > 0.0){
15+ gl_FragColor = color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
16+ } else if (u_Textured){
17+ gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * vColorMask;
1518 } else {
16- gl_FragColor = v_Color * vColorMask;
19+ gl_FragColor = color * vColorMask;
1720 }
18- gl_FragColor[3] = v_Color [3];
21+ gl_FragColor[3] = color [3];
1922}
Original file line number Diff line number Diff line change 11precision mediump float;
22
33// colors
4- uniform vec4 vColorMask;
54varying vec4 v_Color;
5+ uniform vec4 vColorMask;
66
77// texture
88uniform bool u_Textured;
99uniform sampler2D u_Texture;
1010varying vec2 v_TexCoordinate;
1111
1212void main(){
13- if (u_Textured){
14- gl_FragColor = v_Color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
13+ vec4 color = v_Color;
14+ if (u_Textured && length(vec3(color)) > 0.0){
15+ gl_FragColor = color * texture2D(u_Texture, v_TexCoordinate) * vColorMask;
16+ } else if (u_Textured){
17+ gl_FragColor = texture2D(u_Texture, v_TexCoordinate) * vColorMask;
1518 } else {
16- gl_FragColor = v_Color * vColorMask;
19+ gl_FragColor = color * vColorMask;
1720 }
18- gl_FragColor[3] = v_Color [3];
21+ gl_FragColor[3] = color [3];
1922}
You can’t perform that action at this time.
0 commit comments