![]() |
VPP
0.8
A high-level modern C++ API for Vulkan
|
Shader (GPU-side) data type for 32-bit floating point values. More...
#include <vppLangScalarTypes.hpp>
Public Member Functions | |
Float () | |
Construct a zero r-value. | |
Float (float value) | |
Construct a r-value from specified C++ value. More... | |
Float | operator+ (const Float &rhs) const |
Standard addition operator. | |
Float | operator- (const Float &rhs) const |
Standard subtraction operator. | |
Float | operator* (const Float &rhs) const |
Standard multiplication operator. | |
Float | operator/ (const Float &rhs) const |
Standard division operator. | |
Float | operator% (const Float &rhs) const |
Standard remainder operator. Result sign is taken from the first operand. | |
Float | operator- () const |
Standard sign reversal operator. | |
Bool | operator== (const Float &rhs) const |
Standard comparison operator (true if equal). | |
Bool | operator!= (const Float &rhs) const |
Standard comparison operator (true if not equal). | |
Bool | operator> (const Float &rhs) const |
Standard comparison operator (true if greater). | |
Bool | operator>= (const Float &rhs) const |
Standard comparison operator (true if greater or equal). | |
Bool | operator< (const Float &rhs) const |
Standard comparison operator (true if less). | |
Bool | operator<= (const Float &rhs) const |
Standard comparison operator (true if less or equal). | |
Shader (GPU-side) data type for 32-bit floating point values.
Use this type inside shader code as a counterpart of CPU-side float type.
This is a r-value type. You must initialize it with value, either CPU-side one (an explicit constant), or an expression computed on GPU side. The value can not be changed.
For mutable variable type, see VFloat. Beware that mutable variables can degrade performance on GPU, therefore Float is preferable, unless you really want a mutable variable.
vpp::Float::Float | ( | float | value | ) |
Construct a r-value from specified C++ value.
The source value can be either a constant, or a parameter passed to shader specific for that shader. The constructor is called once when compiling the pipeline.