Package org.sunflow.core.gi
Class InstantGI
- java.lang.Object
-
- org.sunflow.core.gi.InstantGI
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
InstantGI.PointLight
private class
InstantGI.PointLightStore
-
Field Summary
Fields Modifier and Type Field Description private float
c
private int
numBias
private int
numPhotons
private int
numSets
private InstantGI.PointLight[][]
virtualLights
-
Constructor Summary
Constructors Constructor Description InstantGI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Color
getGlobalRadiance(ShadingState state)
This is an optional method for engines that contain a secondary illumination engine which can return an approximation of the global radiance in the scene (like a photon map).Color
getIrradiance(ShadingState state, Color diffuseReflectance)
Return the incomming irradiance due to indirect diffuse illumination at the specified surface point.boolean
init(Options options, Scene scene)
Initialize the engine.
-
-
-
Field Detail
-
numPhotons
private int numPhotons
-
numSets
private int numSets
-
c
private float c
-
numBias
private int numBias
-
virtualLights
private InstantGI.PointLight[][] virtualLights
-
-
Method Detail
-
getGlobalRadiance
public Color getGlobalRadiance(ShadingState state)
Description copied from interface:GIEngine
This is an optional method for engines that contain a secondary illumination engine which can return an approximation of the global radiance in the scene (like a photon map). Engines can safely returnColor.BLACK
if they can't or don't wish to support this.- Specified by:
getGlobalRadiance
in interfaceGIEngine
- Parameters:
state
- shading state- Returns:
- color approximating global radiance
-
init
public boolean init(Options options, Scene scene)
Description copied from interface:GIEngine
Initialize the engine. This is called before rendering begins.
-
getIrradiance
public Color getIrradiance(ShadingState state, Color diffuseReflectance)
Description copied from interface:GIEngine
Return the incomming irradiance due to indirect diffuse illumination at the specified surface point.- Specified by:
getIrradiance
in interfaceGIEngine
- Parameters:
state
- current render state describing the point to be computeddiffuseReflectance
- diffuse albedo of the point being shaded, this can be used for importance tracking- Returns:
- irradiance from indirect diffuse illumination at the specified point
-
-