Skip to main content

Module glyph_depth_effects

Module glyph_depth_effects 

Source
Expand description

Depth-aware effects for 3D glyphs: self-shadowing, ambient occlusion in concavities, rim lighting for readability, and subsurface scattering.

Structs§

DepthEffectsConfig

Constants§

RIM_LIGHT_GLSL
Fresnel rim light in GLSL.
SELF_SHADOW_GLSL
Self-shadow computation in GLSL.
SSAO_GLSL
Screen-space AO kernel sampling in GLSL.
SUBSURFACE_GLSL
Subsurface scattering approximation in GLSL.

Functions§

apply_depth_effects
Apply all depth effects to a pixel’s final color (CPU reference implementation).
compute_rim_light
Compute Fresnel-based rim lighting for glyph silhouette readability. Rim light is strongest at glancing angles (normal ⊥ view direction).
compute_self_shadow
Self-shadow factor: front faces facing away from the light are shadowed. Returns 0.0 (fully shadowed) to 1.0 (fully lit).
compute_ssao_for_glyph
Compute ambient occlusion for a point in a glyph concavity. neighbors are nearby surface positions. Points surrounded by geometry receive more occlusion.
compute_subsurface
Compute subsurface scattering approximation for thin glyph parts. Light wraps around thin geometry, creating a translucent glow.