diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-04-19 16:46:52 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-04-19 16:46:52 -0300 |
commit | a4c1fa12a54df2fe332db2ab08a03c844e4dcc93 (patch) | |
tree | 0e3fa1b801c174b1e56d81d2744be05361fbcd46 /drivers/gles2 | |
parent | 0360b454a432dc851cc1c5b0c365049ebafcec46 (diff) |
heck
Diffstat (limited to 'drivers/gles2')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 4 | ||||
-rw-r--r-- | drivers/gles2/shaders/copy.glsl | 7 |
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; } |