summaryrefslogtreecommitdiff
path: root/drivers/gles2
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles2')
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp4
-rw-r--r--drivers/gles2/shaders/copy.glsl7
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
index 7d732f1968..58abb71a12 100644
--- a/drivers/gles2/rasterizer_gles2.cpp
+++ b/drivers/gles2/rasterizer_gles2.cpp
@@ -3290,6 +3290,7 @@ RID RasterizerGLES2::render_target_create(){
texture->active=false;
texture->total_data_size=0;
texture->render_target=rt;
+ texture->ignore_mipmaps=true;
rt->texture_ptr=texture;
rt->texture=texture_owner.make_rid( texture );
rt->texture_ptr->active=false;
@@ -5911,6 +5912,7 @@ void RasterizerGLES2::end_scene() {
copy_shader.set_conditional(CopyShaderGLES2::USE_GAMMA,current_env && current_env->fx_enabled[VS::ENV_FX_GAMMA]);
copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW,current_env && current_env->fx_enabled[VS::ENV_FX_GLOW]);
copy_shader.set_conditional(CopyShaderGLES2::USE_HDR,current_env && current_env->fx_enabled[VS::ENV_FX_HDR]);
+ copy_shader.set_conditional(CopyShaderGLES2::USE_NO_ALPHA,true);
copy_shader.bind();
//copy_shader.set_uniform(CopyShaderGLES2::SOURCE,0);
@@ -5954,6 +5956,8 @@ void RasterizerGLES2::end_scene() {
copy_shader.set_conditional(CopyShaderGLES2::USE_GAMMA,false);
copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW,false);
copy_shader.set_conditional(CopyShaderGLES2::USE_HDR,false);
+ copy_shader.set_conditional(CopyShaderGLES2::USE_NO_ALPHA,false);
+
material_shader.set_conditional(MaterialShaderGLES2::USE_HDR,false);
diff --git a/drivers/gles2/shaders/copy.glsl b/drivers/gles2/shaders/copy.glsl
index 2ed19cbd65..d4b0c31b7d 100644
--- a/drivers/gles2/shaders/copy.glsl
+++ b/drivers/gles2/shaders/copy.glsl
@@ -248,6 +248,11 @@ void main() {
#ifdef USE_ENERGY
color.rgb*=energy;
#endif
- gl_FragColor = color;
+
+#ifdef USE_NO_ALPHA
+ color.a=1.0;
+#endif
+
+ gl_FragColor = color;
}