Keith Packard <[email protected]> writes: > Markus Wick <[email protected]> writes: > >> Am 2014-05-06 00:02, schrieb Keith Packard: >>> +static const char on_off_fs_exec[] = >>> + " float pattern = texture2D(dash, vec2(dash_offset, >>> 0.5)).w;\n" >>> + " if (pattern == 0.0)\n" >>> + " discard;\n"; >> >> Did you care about the sampler configuration? eg with linear filtering, >> you don't have to get exactly 0.0. Maybe it's better to check in this >> way: >> if (pattern < 0.5) > > If the sampler is filtering, then we're going to get the wrong answer. I > do note that I'm not explicitly setting the filtering for the dash > texture; do I need to?
You've got this in glamor_create_tex():
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
So as long as nothing changes that (like, say, glamor_render.c doing
linear filtering from the pixmap), you're safe.
pgpxM0Jkp4kfm.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
