From 0120abe5b071ec38a897d55f00d48cfec71b2877 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 7 May 2010 15:58:26 +0100 Subject: [PATCH] test-cogl-multitexture: Set linear filters on the two textures Otherwise it seems that rounding errors will cause the fragments at the edge of the quad to blend with neighbouring quarters of the texture which cause the test to fail. --- tests/conform/test-cogl-multitexture.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/conform/test-cogl-multitexture.c b/tests/conform/test-cogl-multitexture.c index 9466ea6a4..97b01edbc 100644 --- a/tests/conform/test-cogl-multitexture.c +++ b/tests/conform/test-cogl-multitexture.c @@ -132,8 +132,17 @@ on_paint (ClutterActor *actor, TestState *state) cogl_material_set_layer (material, 0, tex0); cogl_material_set_layer_combine (material, 0, "RGBA = REPLACE (TEXTURE)", NULL); + /* We'll use nearest filtering mode on the textures, otherwise the + edge of the quad can pull in texels from the neighbouring + quarters of the texture due to imprecision */ + cogl_material_set_layer_filters (material, 0, + COGL_MATERIAL_FILTER_NEAREST, + COGL_MATERIAL_FILTER_NEAREST); cogl_material_set_layer (material, 1, tex1); + cogl_material_set_layer_filters (material, 1, + COGL_MATERIAL_FILTER_NEAREST, + COGL_MATERIAL_FILTER_NEAREST); status = cogl_material_set_layer_combine (material, 1, "RGBA = ADD (PREVIOUS, TEXTURE)", &error);