clutter-offscreen-effect: Paint with 'nearest' texture filter mode
The texture containing the image for the redirected actor will always be painted at a 1:1 texel:pixel ratio so there's no need to use linear filtering. This should also counteract some of the effects of rounding errors when calculating the geometry for the quad.
This commit is contained in:
parent
6910be9b23
commit
1d14e7468b
@ -150,8 +150,18 @@ update_fbo (ClutterEffect *effect, int fbo_width, int fbo_height)
|
||||
return TRUE;
|
||||
|
||||
if (priv->target == COGL_INVALID_HANDLE)
|
||||
{
|
||||
priv->target = cogl_material_new ();
|
||||
|
||||
/* We're always going to render the texture at a 1:1 texel:pixel
|
||||
ratio so we can use 'nearest' filtering to decrease the
|
||||
effects of rounding errors in the geometry calculation */
|
||||
cogl_material_set_layer_filters (priv->target,
|
||||
0, /* layer_index */
|
||||
COGL_MATERIAL_FILTER_NEAREST,
|
||||
COGL_MATERIAL_FILTER_NEAREST);
|
||||
}
|
||||
|
||||
texture =
|
||||
clutter_offscreen_effect_create_texture (self, fbo_width, fbo_height);
|
||||
if (texture == COGL_INVALID_HANDLE)
|
||||
|
Loading…
Reference in New Issue
Block a user