org.sunflow.core.gi
Class FakeGIEngine
java.lang.Object
org.sunflow.core.gi.FakeGIEngine
- GIEngine
public class FakeGIEngine
extends java.lang.Object
This is a quick way to get a bit of ambient lighting into your scene with
hardly any overhead. It's based on the formula found here:
http://www.cs.utah.edu/~shirley/papers/rtrt/node7.html.SECTION00031100000000000000
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(Scene scene) - Initialize the engine.
|
FakeGIEngine
public FakeGIEngine(Options options)
getGlobalRadiance
public 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). Engines can safely return
Color.BLACK
if they can't or don't wish to support this.
- getGlobalRadiance in interface GIEngine
- color approximating global radiance
getIrradiance
public Color getIrradiance(ShadingState state,
Color diffuseReflectance)
Return the incomming irradiance due to indirect diffuse illumination at
the specified surface point.
- getIrradiance in interface GIEngine
state
- current render state describing the point to be computeddiffuseReflectance
- diffuse albedo of the point being shaded, this
can be used for importance tracking
- irradiance from indirect diffuse illumination at the specified
point
init
public boolean init(Scene scene)
Initialize the engine. This is called before rendering begins.
- init in interface GIEngine
true
if the init phase succeeded,
false
otherwise