HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes
tt::SDF8 Struct Reference

#include <TTauri/Foundation/SDF8.hpp>

Inheritance diagram for tt::SDF8:
tt::R8SNorm

Public Member Functions

 SDF8 (SDF8 const &other) noexcept=default
 
 SDF8 (SDF8 &&other) noexcept=default
 
SDF8operator= (SDF8 const &other) noexcept=default
 
SDF8operator= (SDF8 &&other) noexcept=default
 
 SDF8 (float rhs) noexcept
 
SDF8operator= (float rhs) noexcept
 
 operator float () const noexcept
 
void repair () noexcept
 
- Public Member Functions inherited from tt::R8SNorm
 R8SNorm (R8SNorm const &rhs) noexcept=default
 
 R8SNorm (R8SNorm &&rhs) noexcept=default
 
R8SNormoperator= (R8SNorm const &rhs) noexcept=default
 
R8SNormoperator= (R8SNorm &&rhs) noexcept=default
 
 R8SNorm (float rhs) noexcept
 
R8SNormoperator= (float rhs) noexcept
 
 operator float () const noexcept
 

Static Public Attributes

static constexpr float max_distance = 3.0f
 Max distance in pixels represented by the signed distance field.
 
static constexpr float one_over_max_distance = 1.0f / max_distance
 

Additional Inherited Members

- Data Fields inherited from tt::R8SNorm
int8_t value
 

Detailed Description

A pixel of a single channel signed distance field.

https://steamcdn-a.akamaihd.net/apps/valve/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf

Field Documentation

◆ max_distance

constexpr float tt::SDF8::max_distance = 3.0f
staticconstexpr

Max distance in pixels represented by the signed distance field.

The max_distance determines the maximum size of the shadow compared to the font as drawn into the atlas. The maximum distance needs to be at least the diagonal distance between two pixels for proper linear-interpolation sqrt(1.0*1.0 + 1.0*1.0).


The documentation for this struct was generated from the following file: