@Generated(value={"Immutables.generator","R2SurfaceShaderBasicParametersType"}) public final class R2SurfaceShaderBasicParameters extends Object implements R2SurfaceShaderBasicParametersType
Modifier and Type | Class and Description |
---|---|
static class |
R2SurfaceShaderBasicParameters.Builder
Builds instances of type
R2SurfaceShaderBasicParameters . |
Modifier and Type | Method and Description |
---|---|
com.io7m.jtensors.core.parameterized.vectors.PVector4D<R2SpaceRGBAType> |
albedoColor()
The base albedo color for the surface.
|
double |
albedoMix()
A specification of the mix value between the albedo color and texture.
|
R2Texture2DUsableType |
albedoTexture()
An albedo map which is used to modulate the value of
R2SurfaceShaderBasicParametersValuesType.albedoColor() . |
double |
alphaDiscardThreshold()
The alpha discard threshold specifies a lower bound on the opacity of
surface pixels.
|
static R2SurfaceShaderBasicParameters.Builder |
builder()
Creates a builder for
R2SurfaceShaderBasicParameters . |
static R2SurfaceShaderBasicParameters |
copyOf(R2SurfaceShaderBasicParametersType instance)
Creates an immutable copy of a
R2SurfaceShaderBasicParametersType value. |
double |
emission()
The emission value for the surface, in the range
[0.0, 1.0] . |
R2Texture2DUsableType |
emissionTexture()
An emission map which is used to modulate the value of
R2SurfaceShaderBasicParametersValuesType.emission() . |
boolean |
equals(Object another)
This instance is equal to all instances of
R2SurfaceShaderBasicParameters that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
textureDefaults , albedoColor , specularColor , emission , emissionTexture , albedoTexture , albedoMix , specularTexture , specularExponent , normalTexture , alphaDiscardThreshold . |
R2Texture2DUsableType |
normalTexture()
A normal map used to peturb normal vectors for the surface.
|
static R2SurfaceShaderBasicParameters |
of(R2TextureDefaultsType textureDefaults,
com.io7m.jtensors.core.parameterized.vectors.PVector4D<R2SpaceRGBAType> albedoColor,
com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceRGBType> specularColor,
double emission,
R2Texture2DUsableType emissionTexture,
R2Texture2DUsableType albedoTexture,
double albedoMix,
R2Texture2DUsableType specularTexture,
double specularExponent,
R2Texture2DUsableType normalTexture,
double alphaDiscardThreshold)
Construct a new immutable
R2SurfaceShaderBasicParameters instance. |
com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceRGBType> |
specularColor()
The base specular color for the surface.
|
double |
specularExponent()
The specular exponent.
|
R2Texture2DUsableType |
specularTexture()
A specular map which is used to modulate the value of
R2SurfaceShaderBasicParametersValuesType.specularColor() . |
R2TextureDefaultsType |
textureDefaults() |
String |
toString()
Prints the immutable value
R2SurfaceShaderBasicParameters with attribute values. |
R2SurfaceShaderBasicParameters |
withAlbedoColor(com.io7m.jtensors.core.parameterized.vectors.PVector4D<R2SpaceRGBAType> value)
Copy the current immutable object by setting a value for the
albedoColor attribute. |
R2SurfaceShaderBasicParameters |
withAlbedoMix(double value)
Copy the current immutable object by setting a value for the
albedoMix attribute. |
R2SurfaceShaderBasicParameters |
withAlbedoTexture(R2Texture2DUsableType value)
Copy the current immutable object by setting a value for the
albedoTexture attribute. |
R2SurfaceShaderBasicParameters |
withAlphaDiscardThreshold(double value)
Copy the current immutable object by setting a value for the
alphaDiscardThreshold attribute. |
R2SurfaceShaderBasicParameters |
withEmission(double value)
Copy the current immutable object by setting a value for the
emission attribute. |
R2SurfaceShaderBasicParameters |
withEmissionTexture(R2Texture2DUsableType value)
Copy the current immutable object by setting a value for the
emissionTexture attribute. |
R2SurfaceShaderBasicParameters |
withNormalTexture(R2Texture2DUsableType value)
Copy the current immutable object by setting a value for the
normalTexture attribute. |
R2SurfaceShaderBasicParameters |
withSpecularColor(com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceRGBType> value)
Copy the current immutable object by setting a value for the
specularColor attribute. |
R2SurfaceShaderBasicParameters |
withSpecularExponent(double value)
Copy the current immutable object by setting a value for the
specularExponent attribute. |
R2SurfaceShaderBasicParameters |
withSpecularTexture(R2Texture2DUsableType value)
Copy the current immutable object by setting a value for the
specularTexture attribute. |
R2SurfaceShaderBasicParameters |
withTextureDefaults(R2TextureDefaultsType value)
Copy the current immutable object by setting a value for the
textureDefaults attribute. |
public R2TextureDefaultsType textureDefaults()
textureDefaults
in interface R2SurfaceShaderBasicParametersType
textureDefaults
in interface R2SurfaceShaderBasicParametersValuesType
textureDefaults
attributepublic com.io7m.jtensors.core.parameterized.vectors.PVector4D<R2SpaceRGBAType> albedoColor()
R2SurfaceShaderBasicParametersValuesType
The base albedo color for the surface. This value is mixed with values
sampled from R2SurfaceShaderBasicParametersValuesType.albedoTexture()
based on R2SurfaceShaderBasicParametersValuesType.albedoMix()
.
albedoColor
in interface R2SurfaceShaderBasicParametersType
albedoColor
in interface R2SurfaceShaderBasicParametersValuesType
albedoColor
attributeR2SurfaceShaderBasicParametersValuesType.albedoTexture()
,
R2SurfaceShaderBasicParametersValuesType.albedoMix()
public com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceRGBType> specularColor()
R2SurfaceShaderBasicParametersValuesType
The base specular color for the surface. This essentially encodes both the intensity and color of specular highlights for the surface.
specularColor
in interface R2SurfaceShaderBasicParametersType
specularColor
in interface R2SurfaceShaderBasicParametersValuesType
specularColor
attributepublic double emission()
R2SurfaceShaderBasicParametersValuesType
The emission value for the surface, in the range [0.0, 1.0]
.
The value is typically processed by filters to give surfaces the appearance
of emitting light.
emission
in interface R2SurfaceShaderBasicParametersType
emission
in interface R2SurfaceShaderBasicParametersValuesType
emission
attributepublic R2Texture2DUsableType emissionTexture()
R2SurfaceShaderBasicParametersValuesType
An emission map which is used to modulate the value of R2SurfaceShaderBasicParametersValuesType.emission()
. Specifically, values sampled from the map are multiplied
by R2SurfaceShaderBasicParametersValuesType.emission()
to give per-pixel control of the emission value.
emissionTexture
in interface R2SurfaceShaderBasicParametersType
emissionTexture
in interface R2SurfaceShaderBasicParametersValuesType
emissionTexture
attributepublic R2Texture2DUsableType albedoTexture()
R2SurfaceShaderBasicParametersValuesType
An albedo map which is used to modulate the value of R2SurfaceShaderBasicParametersValuesType.albedoColor()
. Specifically, values sampled from the map are linearly
mixed with R2SurfaceShaderBasicParametersValuesType.albedoColor()
based on R2SurfaceShaderBasicParametersValuesType.albedoMix()
. The alpha
channel of the map is also used so that a texture with transparent sections
will show the underlying R2SurfaceShaderBasicParametersValuesType.albedoColor()
even when the texture is
fully mixed (i.e. R2SurfaceShaderBasicParametersValuesType.albedoMix()
== 1.0
).
albedoTexture
in interface R2SurfaceShaderBasicParametersType
albedoTexture
in interface R2SurfaceShaderBasicParametersValuesType
albedoTexture
attributepublic double albedoMix()
R2SurfaceShaderBasicParametersValuesType
A specification of the mix value between the albedo color and texture.
If 0.0
, the albedo of the surface will be R2SurfaceShaderBasicParametersValuesType.albedoColor()
.
If 1.0
, the albedo of the surface will be a value sampled from
R2SurfaceShaderBasicParametersValuesType.albedoTexture()
. Other values in the range [0.0, 1.0]
will
linearly mix between the two extremes.
albedoMix
in interface R2SurfaceShaderBasicParametersType
albedoMix
in interface R2SurfaceShaderBasicParametersValuesType
albedoMix
attributepublic R2Texture2DUsableType specularTexture()
R2SurfaceShaderBasicParametersValuesType
A specular map which is used to modulate the value of R2SurfaceShaderBasicParametersValuesType.specularColor()
. Specifically, values sampled from the map are multiplied
by R2SurfaceShaderBasicParametersValuesType.specularColor()
to give per-pixel control of specular intensity
and color.
specularTexture
in interface R2SurfaceShaderBasicParametersType
specularTexture
in interface R2SurfaceShaderBasicParametersValuesType
specularTexture
attributepublic double specularExponent()
R2SurfaceShaderBasicParametersValuesType
The specular exponent. This is a value in the range [0.0, 256.0]
and is used directly as the exponent term.
specularExponent
in interface R2SurfaceShaderBasicParametersType
specularExponent
in interface R2SurfaceShaderBasicParametersValuesType
specularExponent
attributepublic R2Texture2DUsableType normalTexture()
R2SurfaceShaderBasicParametersValuesType
A normal map used to peturb normal vectors for the surface. The texture
is expected to contain RGB-encoded vectors such that [0.5, 0.5,
1.0]
represents the "neutral" tangent-space [0.0, 0.0, 1.0]
vector.
A map containing entirely [0.5, 0.5, 1.0]
values will have no
visible effect on the surface.
normalTexture
in interface R2SurfaceShaderBasicParametersType
normalTexture
in interface R2SurfaceShaderBasicParametersValuesType
normalTexture
attributepublic double alphaDiscardThreshold()
R2SurfaceShaderBasicParametersValuesType
The alpha discard threshold specifies a lower bound on the opacity of
surface pixels. For any given surface pixel, if the opacity of the
calculated albedo is less than the R2SurfaceShaderBasicParametersValuesType.alphaDiscardThreshold()
,
then the pixel is simply discarded; the pixel is not written to the
current geometry buffer. This allows for otherwise opaque surfaces
to have fully transparent sections.
alphaDiscardThreshold
in interface R2SurfaceShaderBasicParametersType
alphaDiscardThreshold
in interface R2SurfaceShaderBasicParametersValuesType
alphaDiscardThreshold
attributepublic final R2SurfaceShaderBasicParameters withTextureDefaults(R2TextureDefaultsType value)
textureDefaults
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.value
- A new value for textureDefaultsthis
objectpublic final R2SurfaceShaderBasicParameters withAlbedoColor(com.io7m.jtensors.core.parameterized.vectors.PVector4D<R2SpaceRGBAType> value)
albedoColor
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.value
- A new value for albedoColorthis
objectpublic final R2SurfaceShaderBasicParameters withSpecularColor(com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceRGBType> value)
specularColor
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.value
- A new value for specularColorthis
objectpublic final R2SurfaceShaderBasicParameters withEmission(double value)
emission
attribute.
A value strict bits equality used to prevent copying of the same value by returning this
.value
- A new value for emissionthis
objectpublic final R2SurfaceShaderBasicParameters withEmissionTexture(R2Texture2DUsableType value)
emissionTexture
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.value
- A new value for emissionTexturethis
objectpublic final R2SurfaceShaderBasicParameters withAlbedoTexture(R2Texture2DUsableType value)
albedoTexture
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.value
- A new value for albedoTexturethis
objectpublic final R2SurfaceShaderBasicParameters withAlbedoMix(double value)
albedoMix
attribute.
A value strict bits equality used to prevent copying of the same value by returning this
.value
- A new value for albedoMixthis
objectpublic final R2SurfaceShaderBasicParameters withSpecularTexture(R2Texture2DUsableType value)
specularTexture
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.value
- A new value for specularTexturethis
objectpublic final R2SurfaceShaderBasicParameters withSpecularExponent(double value)
specularExponent
attribute.
A value strict bits equality used to prevent copying of the same value by returning this
.value
- A new value for specularExponentthis
objectpublic final R2SurfaceShaderBasicParameters withNormalTexture(R2Texture2DUsableType value)
normalTexture
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.value
- A new value for normalTexturethis
objectpublic final R2SurfaceShaderBasicParameters withAlphaDiscardThreshold(double value)
alphaDiscardThreshold
attribute.
A value strict bits equality used to prevent copying of the same value by returning this
.value
- A new value for alphaDiscardThresholdthis
objectpublic boolean equals(Object another)
R2SurfaceShaderBasicParameters
that have equal attribute values.public int hashCode()
textureDefaults
, albedoColor
, specularColor
, emission
, emissionTexture
, albedoTexture
, albedoMix
, specularTexture
, specularExponent
, normalTexture
, alphaDiscardThreshold
.public String toString()
R2SurfaceShaderBasicParameters
with attribute values.public static R2SurfaceShaderBasicParameters of(R2TextureDefaultsType textureDefaults, com.io7m.jtensors.core.parameterized.vectors.PVector4D<R2SpaceRGBAType> albedoColor, com.io7m.jtensors.core.parameterized.vectors.PVector3D<R2SpaceRGBType> specularColor, double emission, R2Texture2DUsableType emissionTexture, R2Texture2DUsableType albedoTexture, double albedoMix, R2Texture2DUsableType specularTexture, double specularExponent, R2Texture2DUsableType normalTexture, double alphaDiscardThreshold)
R2SurfaceShaderBasicParameters
instance.textureDefaults
- The value for the textureDefaults
attributealbedoColor
- The value for the albedoColor
attributespecularColor
- The value for the specularColor
attributeemission
- The value for the emission
attributeemissionTexture
- The value for the emissionTexture
attributealbedoTexture
- The value for the albedoTexture
attributealbedoMix
- The value for the albedoMix
attributespecularTexture
- The value for the specularTexture
attributespecularExponent
- The value for the specularExponent
attributenormalTexture
- The value for the normalTexture
attributealphaDiscardThreshold
- The value for the alphaDiscardThreshold
attributepublic static R2SurfaceShaderBasicParameters copyOf(R2SurfaceShaderBasicParametersType instance)
R2SurfaceShaderBasicParametersType
value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance
- The instance to copypublic static R2SurfaceShaderBasicParameters.Builder builder()
R2SurfaceShaderBasicParameters
.Copyright © 2017 <code@io7m.com> http://io7m.com