|
@@ -701,6 +701,7 @@ layout(location = 2) out vec3 outGPos;
|
|
|
|
|
|
#with TNS_SHADER_COLOR_COMMON
|
|
#with TNS_SHADER_COLOR_COMMON
|
|
#with TNS_SHADER_LIBRARY
|
|
#with TNS_SHADER_LIBRARY
|
|
|
|
+#with TNS_GLES_UINT_TEXTURE
|
|
|
|
|
|
vec3 ConvertColorSpace(vec3 color){
|
|
vec3 ConvertColorSpace(vec3 color){
|
|
if(InputColorSpace!=OutputColorSpace){
|
|
if(InputColorSpace!=OutputColorSpace){
|
|
@@ -726,6 +727,13 @@ vec3 ConvertColorSpace(vec3 color){
|
|
}
|
|
}
|
|
return color;
|
|
return color;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+#ifdef GLES_UINT_TEXTURE
|
|
|
|
+vec4 cunpack(uint d){
|
|
|
|
+ return vec4(float(d&0xFFu)/255.,float((d>>8u)&0xFFu)/255.,float((d>>16u)&0xFFu)/255.,float((d>>24u)&0xFFu)/255.);
|
|
|
|
+}
|
|
|
|
+#endif
|
|
|
|
+
|
|
void main(){
|
|
void main(){
|
|
vec4 color=vec4(1,0,1,1);
|
|
vec4 color=vec4(1,0,1,1);
|
|
if(TextureMode==0){ color = fColor; if(UseHalftone>0.) color.a=HalftoneSingle(color.a,htsize,rad(7.),0.); }
|
|
if(TextureMode==0){ color = fColor; if(UseHalftone>0.) color.a=HalftoneSingle(color.a,htsize,rad(7.),0.); }
|
|
@@ -740,7 +748,11 @@ void main(){
|
|
color/=float(SampleAmount);
|
|
color/=float(SampleAmount);
|
|
if(MultiplyColor!=0){color*=fColor;}
|
|
if(MultiplyColor!=0){color*=fColor;}
|
|
}else if(TextureMode==4){
|
|
}else if(TextureMode==4){
|
|
|
|
+#ifdef GLES_UINT_TEXTURE
|
|
|
|
+ color=cunpack(texture(TexColorUI,fUV.st).r);
|
|
|
|
+#else
|
|
color=vec4(texture(TexColorUI,fUV.st))/vec4(65535.);
|
|
color=vec4(texture(TexColorUI,fUV.st))/vec4(65535.);
|
|
|
|
+#endif
|
|
if(MultiplyColor!=0){color*=fColor;}
|
|
if(MultiplyColor!=0){color*=fColor;}
|
|
}else if(TextureMode==101){ // YUYV
|
|
}else if(TextureMode==101){ // YUYV
|
|
ivec2 tsize = textureSize(TexColor,0);
|
|
ivec2 tsize = textureSize(TexColor,0);
|