This class holds the precalculated result of the inner scattering integral of the Nishita sky model. The outer integral is calculated in armory/Shaders/std/sky.glsl.

See also:

Static variables

@:value(8)staticjSteps:Int = 8

Amount of steps for calculating the inner scattering integral. Heigher values are more precise but take longer to compute.

@:value(128)staticlutAngleSteps:Int = 128

The amount of individual sun angle steps stored in the LUT (and the height of the LUT image).

@:value(128)staticlutHeightSteps:Int = 128

The amount of individual sample heights stored in the LUT (and the width of the LUT image).

@:value(2e-5)staticmieCoeff:Float = 2e-5

Mie scattering coefficient.

@:value(1.2e3)staticmieScale:Float = 1.2e3

Mie scattering scale parameter.

@:value(new Vec3(1.59051840791988e-6, 0.00000096707041180970, 0.00000007309568762914))staticozoneCoeff:Vec3 = new Vec3(1.59051840791988e-6, 0.00000096707041180970, 0.00000007309568762914)

Ozone scattering coefficient.

@:value(6420.0)staticradiusAtmo:Float = 6420.0

Radius of the atmosphere in kilometers.

@:value(6360.0)staticradiusPlanet:Float = 6360.0

Radius of the planet in kilometers. The default value is the earth radius as defined in Cycles.

@:value(new Vec3(5.5e-6, 13.0e-6, 22.4e-6))staticrayleighCoeff:Vec3 = new Vec3(5.5e-6, 13.0e-6, 22.4e-6)

Rayleigh scattering coefficient.

@:value(8e3)staticrayleighScale:Float = 8e3

Rayleigh scattering scale parameter.

Constructor

new()

Variables

Methods

computeLUT(density:Vec3):Void

Computes the LUT texture for the given density values.

Parameters:

density

3D vector of air density, dust density, ozone density

sampleSecondaryRay(height:FastFloat, sunTheta:FastFloat, density:Vec3):Vec3

Calculates the integral for the secondary ray.