struct new in Git master
DistanceFieldVectorMaterialUniformMaterial uniform for distance field vector shaders.
Describes material properties referenced from DistanceFieldVectorDrawUniform::
Constructors, destructors, conversion operators
- DistanceFieldVectorMaterialUniform(DefaultInitT = DefaultInit) explicit constexpr noexcept
- Construct with default parameters.
- DistanceFieldVectorMaterialUniform(NoInitT) explicit noexcept
- Construct without initializing the contents.
Public variables
- Color4 color
- Fill color.
- Color4 outlineColor
- Outline color.
- Float outlineStart
- Outline start.
- Float outlineEnd
- Outline end.
- Float smoothness
- Smoothness radius.
Convenience setters
Provided to allow the use of method chaining for populating a structure in a single expression, otherwise equivalent to accessing the fields directly. Also guaranteed to provide backwards compatibility when packing of the actual fields changes.
- auto setColor(const Color4& color) -> DistanceFieldVectorMaterialUniform&
- Set the color field.
- auto setOutlineColor(const Color4& color) -> DistanceFieldVectorMaterialUniform&
- Set the outlineColor field.
- auto setOutlineRange(Float start, Float end) -> DistanceFieldVectorMaterialUniform&
- Set the outlineStart and outlineEnd fields.
- auto setSmoothness(Float smoothness) -> DistanceFieldVectorMaterialUniform&
- Set the smoothness field.
Function documentation
DistanceFieldVectorMaterialUniform& Magnum:: Shaders:: DistanceFieldVectorMaterialUniform:: setColor(const Color4& color)
Set the color field.
Returns | Reference to self (for method chaining) |
---|
DistanceFieldVectorMaterialUniform& Magnum:: Shaders:: DistanceFieldVectorMaterialUniform:: setOutlineColor(const Color4& color)
Set the outlineColor field.
Returns | Reference to self (for method chaining) |
---|
DistanceFieldVectorMaterialUniform& Magnum:: Shaders:: DistanceFieldVectorMaterialUniform:: setOutlineRange(Float start,
Float end)
Set the outlineStart and outlineEnd fields.
Returns | Reference to self (for method chaining) |
---|
DistanceFieldVectorMaterialUniform& Magnum:: Shaders:: DistanceFieldVectorMaterialUniform:: setSmoothness(Float smoothness)
Set the smoothness field.
Returns | Reference to self (for method chaining) |
---|
Variable documentation
Color4 Magnum:: Shaders:: DistanceFieldVectorMaterialUniform:: outlineColor
Outline color.
Default value is 0x00000000_rgbaf
and the outline is not drawn — see outlineStart and outlineEnd for more information.
Float Magnum:: Shaders:: DistanceFieldVectorMaterialUniform:: outlineStart
Outline start.
Describe where fill ends and possible outline starts. Default value is 0.5f
, larger values will make the vector art look thinner, smaller will make it look thicker.
Float Magnum:: Shaders:: DistanceFieldVectorMaterialUniform:: outlineEnd
Outline end.
Describe where outline ends. If set to a value larger than outlineStart, the outline is not drawn. Initial value is 1.0f
.
Float Magnum:: Shaders:: DistanceFieldVectorMaterialUniform:: smoothness
Smoothness radius.
Larger values will make edges look less aliased (but blurry), smaller values will make them look more crisp (but possibly aliased). Initial value is 0.04f
.