Package limn.render3d
Record Class Environment
java.lang.Object
java.lang.Record
limn.render3d.Environment
An image-based lighting environment as a procedural gradient sky:
sky
straight up, horizon at the equator, ground straight down, in
linear color, scaled by intensity. It drives diffuse irradiance (baked to
spherical harmonics; see IrradianceSh), analytic specular reflections in
the PBR shader, and the skybox background. A full HDR/equirect loader can replace
the analytic sky later without changing the shading path.-
Constructor Summary
ConstructorsConstructorDescriptionEnvironment(Vec3 sky, Vec3 horizon, Vec3 ground, float intensity) Creates an instance of aEnvironmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static EnvironmentA three-stop sky gradient used as ambient light, in linear units.ground()Returns the value of thegroundrecord component.final inthashCode()Returns a hash code value for this object.horizon()Returns the value of thehorizonrecord component.floatReturns the value of theintensityrecord component.intensity(float intensity) Scales the whole environment's contribution;1leaves it as authored.Incoming radiance fromdirection(need not be normalized).sky()Returns the value of theskyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Environment
Creates an instance of aEnvironmentrecord class.- Parameters:
sky- the value for theskyrecord componenthorizon- the value for thehorizonrecord componentground- the value for thegroundrecord componentintensity- the value for theintensityrecord component
-
-
Method Details
-
gradient
A three-stop sky gradient used as ambient light, in linear units. -
intensity
Scales the whole environment's contribution;1leaves it as authored. -
radiance
Incoming radiance fromdirection(need not be normalized). -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
sky
Returns the value of theskyrecord component.- Returns:
- the value of the
skyrecord component
-
horizon
Returns the value of thehorizonrecord component.- Returns:
- the value of the
horizonrecord component
-
ground
Returns the value of thegroundrecord component.- Returns:
- the value of the
groundrecord component
-
intensity
public float intensity()Returns the value of theintensityrecord component.- Returns:
- the value of the
intensityrecord component
-