From 4186f05f70642ade07f83a8407a4bdd0286ee714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 12 Feb 2018 00:06:16 +0100 Subject: [PATCH] TextureTools: adapted to the new documentation theme. --- src/Magnum/TextureTools/DistanceField.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Magnum/TextureTools/DistanceField.h b/src/Magnum/TextureTools/DistanceField.h index fa051c863..0baa12c21 100644 --- a/src/Magnum/TextureTools/DistanceField.h +++ b/src/Magnum/TextureTools/DistanceField.h @@ -66,15 +66,16 @@ utility. For each pixel inside @p rectangle the algorithm looks at corresponding pixel in @p input and tries to find nearest pixel of opposite color in area given by @p radius. Signed distance between the points is then saved as value of given -pixel in @p output. Value of `1.0` means that the pixel was originally colored -white and nearest black pixel is farther than @p radius, value of `0.0` means +pixel in @p output. Value of 1.0 means that the pixel was originally colored +white and nearest black pixel is farther than @p radius, value of 0.0 means that the pixel was originally black and nearest white pixel is farther than -@p radius. Values around `0.5` are around edges. +@p radius. Values around 0.5 are around edges. The resulting texture can be used with bilinear filtering. It can be converted -back to binary form in shader using e.g. GLSL `smoothstep()` function with step -around `0.5` to create antialiased edges. Or you can exploit the distance field -features to create many other effects. See also @ref Shaders::DistanceFieldVector. +back to binary form in shader using e.g. GLSL @glsl smoothstep() @ce function +with step around 0.5 to create antialiased edges. Or you can exploit the +distance field features to create many other effects. See also +@ref Shaders::DistanceFieldVector. Based on: *Chris Green - Improved Alpha-Tested Magnification for Vector Textures and Special Effects, SIGGRAPH 2007,