Shader source generator value container. Caches the value type and the value variable name (shader local, global parameter or constant value). Supports value type casting and component swizzle.
| 10 | /// Shader source generator value container. Caches the value type and the value variable name (shader local, global parameter or constant value). Supports value type casting and component swizzle. |
| 11 | /// </summary> |
| 12 | struct ShaderGraphValue : Object |
| 13 | { |
| 14 | private: |
| 15 | static const Char* _subs[]; |
| 16 | |
| 17 | public: |
| 18 | /// <summary> |
| 19 | /// The value type. |
| 20 | /// </summary> |
| 21 | VariantType::Types Type; |
| 22 | |
| 23 | /// <summary> |
| 24 | /// The shader value. |
| 25 | /// </summary> |
| 26 | String Value; |
| 27 | |
| 28 | public: |
| 29 | /// <summary> |
| 30 | /// Zero value (as float). |
| 31 | /// </summary> |
| 32 | static const ShaderGraphValue Zero; |
| 33 | |
| 34 | /// <summary> |
| 35 | /// Half value (as float). |
| 36 | /// </summary> |
| 37 | static const ShaderGraphValue Half; |
| 38 | |
| 39 | /// <summary> |
| 40 | /// One value (as float). |
| 41 | /// </summary> |
| 42 | static const ShaderGraphValue One; |
| 43 | |
| 44 | /// <summary> |
| 45 | /// True value (as bool). |
| 46 | /// </summary> |
| 47 | static const ShaderGraphValue True; |
| 48 | |
| 49 | /// <summary> |
| 50 | /// False value (as bool). |
| 51 | /// </summary> |
| 52 | static const ShaderGraphValue False; |
| 53 | |
| 54 | public: |
| 55 | /// <summary> |
| 56 | /// Initializes a new instance of the <see cref="ShaderGraphValue"/> struct. |
| 57 | /// </summary> |
| 58 | ShaderGraphValue() |
| 59 | : Type(VariantType::Types::Null) |
| 60 | { |
| 61 | } |
| 62 | |
| 63 | /// <summary> |
| 64 | /// Initializes a new instance of the <see cref="ShaderGraphValue"/> struct. |
| 65 | /// </summary> |
| 66 | /// <param name="type">The type.</param> |
| 67 | /// <param name="value">The value.</param> |
| 68 | ShaderGraphValue(VariantType::Types type, const Char* value) |
| 69 | : Type(type) |
no outgoing calls
no test coverage detected