Game Development Reference
In-Depth Information
Apart from Texture::setRepeat() , there is one other property that changes the
way a texture is rendered—the smooth filter, which is controlled by Tex-
ture::setSmooth() . If we only use texture on surfaces with their original size (pixel
perfect), then we won't need this functionality. The function itself enables a smooth filter
on the texture, which makes its edge pixels less visible. The effect is mostly visible when
a texel (a pixel of a texture) cannot be directly mapped to a pixel on the screen (scaling,
offsetting by noninteger values, and so on). For pixel perfect graphics, we would want to
avoid using the smooth filter, since it will smudge the texture.
Here is how we can set the smooth filter on:
The following is an example with two sets of textures, one that uses the filter and one that
doesn't:
Search WWH ::




Custom Search