Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
Lighting.h File Reference

SVG diffuse and specular lighting compute programs expressed in the shader IR. More...

Include dependency graph for Lighting.h:

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Functions

ShaderResult< IrModule > donner::gpu::shader::programs::BuildDiffuseLightingModule ()
 Builds Lambertian diffuse lighting over the input alpha height map.
ShaderResult< IrModule > donner::gpu::shader::programs::BuildSpecularLightingModule ()
 Builds Phong specular lighting over the input alpha height map.

Detailed Description

SVG diffuse and specular lighting compute programs expressed in the shader IR.

Function Documentation

◆ BuildDiffuseLightingModule()

ShaderResult< IrModule > donner::gpu::shader::programs::BuildDiffuseLightingModule ( )

Builds Lambertian diffuse lighting over the input alpha height map.

The program supports distant, point, and spot lights, including transformed spotlight cones and independently bounded sampling subregions.

◆ BuildSpecularLightingModule()

ShaderResult< IrModule > donner::gpu::shader::programs::BuildSpecularLightingModule ( )

Builds Phong specular lighting over the input alpha height map.

The program shares light-source, normal-reconstruction, and sampling behavior with the diffuse program and writes the largest color channel as alpha.