RenderObject
, Shader
public class PrimIDShader extends java.lang.Object implements Shader
Constructor | Description |
---|---|
PrimIDShader() |
Modifier and Type | Method | Description |
---|---|---|
Color |
getOpacity(ShadingState state) |
Returns how much light is blocked by this shader.
|
Color |
getRadiance(ShadingState state) |
Gets the radiance for a specified rendering state.
|
boolean |
isOpaque() |
Returns
true if this shader is fully opaque. |
void |
scatterPhoton(ShadingState state,
Color power) |
Scatter a photon with the specied power.
|
boolean |
update(ParameterList pl,
SunflowAPI api) |
Update this object given a list of parameters.
|
public boolean update(ParameterList pl, SunflowAPI api)
RenderObject
update
in interface RenderObject
pl
- list of parameters to read fromapi
- reference to the current scenetrue
if the update is succesfull,
false
otherwisepublic Color getRadiance(ShadingState state)
Shader
getRadiance
in interface Shader
state
- current render statepublic void scatterPhoton(ShadingState state, Color power)
Shader
scatterPhoton
in interface Shader
state
- current statepower
- power of the incoming photon.public boolean isOpaque()
Shader
true
if this shader is fully opaque.
This gives a quick way to find out if a shader needs further processing
when hit by a shadow ray.public Color getOpacity(ShadingState state)
Shader
getOpacity
in interface Shader