mirror of
https://github.com/gpac/gpac.git
synced 2026-01-12 00:05:22 +08:00
fixed bug in gui+shader
This commit is contained in:
@@ -46,8 +46,11 @@ extension.open_local_file = function () {
|
||||
var f = history[history.length - i - 1];
|
||||
var names = f.url.split('/');
|
||||
if (names.length == 0) names = f.url.split('\\');
|
||||
|
||||
o.name = names.pop();
|
||||
if (names.length == 0) {
|
||||
o.name = names.pop();
|
||||
} else {
|
||||
o.name = f.url;
|
||||
}
|
||||
o.directory = false;
|
||||
o.path = f.url;
|
||||
var delim = f.url.slice(-1);
|
||||
|
||||
@@ -319,7 +319,7 @@ void main()
|
||||
rgb.b = dot(yuv, B_mul);
|
||||
|
||||
rgba = vec4(rgb, alpha);
|
||||
|
||||
|
||||
#elif defined(GF_GL_IS_ExternalOES)
|
||||
rgba = texture2D(imgOES, TexCoord);
|
||||
#else
|
||||
@@ -340,9 +340,11 @@ void main()
|
||||
//we have mat 2D + texture
|
||||
#ifndef GF_GL_IS_ExternalOES
|
||||
if (hasMaterial2D) {
|
||||
if(gfEmissionColor.a > 0.0 && gfEmissionColor.a <1.0) {
|
||||
if (gfEmissionColor.a > 0.0) {
|
||||
fragColor *= gfEmissionColor;
|
||||
} else if(fragColor.rgb == vec3(0.0, 0.0, 0.0)){
|
||||
}
|
||||
//hack - if full transparency on texture with material2D, use material color
|
||||
else if (fragColor.rgb == vec3(0.0, 0.0, 0.0)){
|
||||
fragColor.rgb = gfEmissionColor.rgb;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user