FastUIDraw
Functions
GLSL Fragment Code

This group documents the GLSL functions fastuidraw makes available to GLSL code fragments for only fragment shader for custom shading as embodied by the classes fastuidraw::glsl::PainterItemShaderGLSL, fastuidraw::glsl::PainterBlendShaderGLSL and fastuidraw::glsl::PainterBrushShaderGLSL. More...

Functions

float fastuidraw_banded_rays_compute_coverage (in uint glyph_data_location, in vec2 glyph_coord, in vec2 glyph_coord_fwidth, in uint num_vertical_bands, in uint num_horizontal_bands, in bool use_odd_even_rule)
 
vec3 fastuidraw_clipcolor (in vec3 C)
 clip an RGB value so that its luminosity is within the range fastuidraw_compute_min() and fastuidraw_compute_max().
 
float fastuidraw_color_burn (in float S, in float D)
 perform color burn blending on a single color channel More...
 
float fastuidraw_color_dodge (in float S, in float D)
 perform color dodge blending on a single color channel More...
 
float fastuidraw_compute_luminosity (in vec3 C)
 compute the luminosity of an RGB value
 
float fastuidraw_compute_max (in vec3 C)
 Compute the maximum color channel value.
 
float fastuidraw_compute_min (in vec3 C)
 Compute the minimum color channel value.
 
float fastuidraw_compute_saturation (in vec3 C)
 compute the saturation of an RGB value
 
float fastuidraw_hardlight (in float S, in float D)
 perform hardlight blending on a single color channel More...
 
float fastuidraw_overlay (in float S, in float D)
 perform overlay blending on a single color channel More...
 
float fastuidraw_restricted_rays_compute_coverage (in uint glyph_data_location, in vec2 glyph_coord, in vec2 glyph_coord_dx, in vec2 glyph_coord_dy, in bool use_odd_even_rule)
 
vec3 fastuidraw_set_luminosity (in vec3 C, in vec3 L)
 
vec3 fastuidraw_set_saturation_and_luminosity (in vec3 C, in vec3 S, in vec3 L)
 
float fastuidraw_softlight (in float S, in float D)
 perform softlight blending on a single color channel More...
 
vec3 fastuidraw_undo_alpha (in vec4 S)
 Undo pre-multiply by alpha on the RGB channels of a color value.
 

Detailed Description

This group documents the GLSL functions fastuidraw makes available to GLSL code fragments for only fragment shader for custom shading as embodied by the classes fastuidraw::glsl::PainterItemShaderGLSL, fastuidraw::glsl::PainterBlendShaderGLSL and fastuidraw::glsl::PainterBrushShaderGLSL.

Function Documentation

◆ fastuidraw_banded_rays_compute_coverage()

float fastuidraw_banded_rays_compute_coverage ( in uint  glyph_data_location,
in vec2  glyph_coord,
in vec2  glyph_coord_fwidth,
in uint  num_vertical_bands,
in uint  num_horizontal_bands,
in bool  use_odd_even_rule 
)

Compute the coverage of a fragment within a fastuidraw::GlyphRenderDataBandedRays glyph.

Parameters
glyph_data_locationlocation of the glyph data (see fastuidraw::GlyphRenderDataBandedRays::glyph_offset)
glyph_coordthe coordinate of the fragment in glyph coordinates
glyph_coord_fwidththe value of fwidth(glyph_coord)
num_vertical_bandsthe number of vertical bands of the glyph, see fastuidraw::GlyphRenderDataBandedRays::glyph_num_vertical_bands
num_horizontal_bandsthe number of horizontal bands of the glyph, see fastuidraw::GlyphRenderDataBandedRays::glyph_num_horizontal_bands
use_odd_even_ruleif true, use the odd-even fill rule, otherwise use the non-zero fill rule.

Definition at line 251 of file fastuidraw_banded_rays.glsl.hpp.

◆ fastuidraw_color_burn()

float fastuidraw_color_burn ( in float  S,
in float  D 
)

perform color burn blending on a single color channel

Parameters
SSource input value
DDestination input value

Definition at line 219 of file fastuidraw_blend_util.frag.glsl.hpp.

◆ fastuidraw_color_dodge()

float fastuidraw_color_dodge ( in float  S,
in float  D 
)

perform color dodge blending on a single color channel

Parameters
SSource input value
DDestination input value

Definition at line 196 of file fastuidraw_blend_util.frag.glsl.hpp.

◆ fastuidraw_hardlight()

float fastuidraw_hardlight ( in float  S,
in float  D 
)

perform hardlight blending on a single color channel

Parameters
SSource input value
DDestination input value

Definition at line 177 of file fastuidraw_blend_util.frag.glsl.hpp.

◆ fastuidraw_overlay()

float fastuidraw_overlay ( in float  S,
in float  D 
)

perform overlay blending on a single color channel

Parameters
SSource input value
DDestination input value

Definition at line 140 of file fastuidraw_blend_util.frag.glsl.hpp.

◆ fastuidraw_restricted_rays_compute_coverage()

float fastuidraw_restricted_rays_compute_coverage ( in uint  glyph_data_location,
in vec2  glyph_coord,
in vec2  glyph_coord_dx,
in vec2  glyph_coord_dy,
in bool  use_odd_even_rule 
)

Compute the coverage of a fragment within a fastuidraw::GlyphRenderDataRestrictedRays glyph.

Parameters
glyph_data_locationlocation of the glyph data (see fastuidraw::GlyphRenderDataRestrictedRays::glyph_offset)
glyph_coordthe coordinate of the fragment in glyph coordinates
glyph_coord_dxthe value of dFdx(glyph_coord)
glyph_coord_dythe value of dFdy(glyph_coord)
use_odd_even_ruleif true, use the odd-even fill rule, otherwise use the non-zero fill rule.

◆ fastuidraw_set_luminosity()

vec3 fastuidraw_set_luminosity ( in vec3  C,
in vec3  L 
)

Return an RGB color value generate from taking the chroma of one color value and the luminosity of another

Parameters
Ccolor value from which to take the chroma value
Lcolor value from which to take the luminosity value

Definition at line 87 of file fastuidraw_blend_util.frag.glsl.hpp.

◆ fastuidraw_set_saturation_and_luminosity()

vec3 fastuidraw_set_saturation_and_luminosity ( in vec3  C,
in vec3  S,
in vec3  L 
)

Return an RGB color value generate from taking the chroma of one color value and the luminosity and saturation of other color values

Parameters
Ccolor value from which to take the chroma value
Scolor value from which to take the saturation value
Lcolor value from which to take the luminosity value

Definition at line 104 of file fastuidraw_blend_util.frag.glsl.hpp.

◆ fastuidraw_softlight()

float fastuidraw_softlight ( in float  S,
in float  D 
)

perform softlight blending on a single color channel

Parameters
SSource input value
DDestination input value

Definition at line 154 of file fastuidraw_blend_util.frag.glsl.hpp.