Panda3D
Public Member Functions | List of all members
IESDataset Class Reference

This class generates a LUT from IES data. More...

Public Member Functions

 __init__ ()
 Constructs a new empty dataset. More...
 
 __init__ (const IESDataset)
 
 generateDatasetTextureInto (Texture dest_tex, int z)
 Generates the IES LUT. More...
 
 setCandelaValues (const PTAFloat candela_values)
 Sets the candela values. More...
 
 setHorizontalAngles (const PTAFloat horizontal_angles)
 Sets the horizontal angles of the dataset. More...
 
 setVerticalAngles (const PTAFloat vertical_angles)
 Sets the vertical angles of the dataset. More...
 

Detailed Description

This class generates a LUT from IES data.

This class is used by the IESLoader to generate a LUT texture which is used in the shaders to perform IES lighting. It takes a set of vertical and horizontal angles, as well as a set of candela values, which then are lineary interpolated onto a 2D LUT Texture.

Member Function Documentation

◆ __init__() [1/2]

__init__ ( )

Constructs a new empty dataset.

This constructs a new IESDataset with no data set.

◆ __init__() [2/2]

__init__ ( const  IESDataset)

◆ generateDatasetTextureInto()

generateDatasetTextureInto ( Texture  dest_tex,
int  z 
)

Generates the IES LUT.

This generates the LUT into a given dataset texture. The x-axis referes to the vertical_angle, whereas the y-axis refers to the horizontal angle.

Parameters
dest_texTexture to write the LUT into
zLayer to write the LUT into, in case the texture is a 3D Texture or 2D Texture Array.

◆ setCandelaValues()

setCandelaValues ( const PTAFloat  candela_values)

Sets the candela values.

This sets the candela values of the dataset. They should be an interleaved 2D array with the dimensions vertical_angles x horizontal_angles. They also should be normalized by dividing by the maximum entry.

Parameters
candela_valuesInterleaved 2D-vector of candela values.

◆ setHorizontalAngles()

setHorizontalAngles ( const PTAFloat  horizontal_angles)

Sets the horizontal angles of the dataset.

This sets the list of horizontal angles of the dataset.

Parameters
horizontal_anglesVector of all horizontal angles.

◆ setVerticalAngles()

setVerticalAngles ( const PTAFloat  vertical_angles)

Sets the vertical angles of the dataset.

This sets the list of vertical angles of the dataset.

Parameters
vertical_anglesVector of all vertical angles.