|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
One authored expression carried as both a host callable and shader text. More...
#include <DualField.hpp>
Collaboration diagram for MayaFlux::Kinesis::DualField< D, R >:Public Member Functions | |
| bool | has_source () const noexcept |
| Whether the shader half parsed into a usable function definition. | |
| R | operator() (const D &d) const |
| Evaluate the host half. | |
Public Attributes | |
| Tendency< D, R > | cpu |
| FieldSource | source |
One authored expression carried as both a host callable and shader text.
| D | Domain type. |
| R | Range type. |
The cpu member is an ordinary Tendency and is accepted anywhere a Tendency is, including FieldOperator::bind. It composes with combine, chain, scale, clamp, threshold, invert, lerp and select as any Tendency does. Those free functions build closures, so a composed Tendency has no shader half: composition on the GPU is textual and happens in the kernel body, where several emitted functions are called with whatever arithmetic is wanted.
Field bodies must be authored outside namespace Kinesis. See the authoring rules in ShaderCompat.hpp.
Definition at line 69 of file DualField.hpp.