Class Bumpy
java.lang.Object
org.autochthonous.graphics.rt.Shader
org.autochthonous.graphics.rt.shaders.CookTorranceShader
org.autochthonous.graphics.rt.shaders.ct.Plastic
Bumpy
- public class Bumpy
- extends Plastic
A bumpy shader - an extension of the Plastic one.
Example:
<Bumpy diffuse="0.1" specular="0.3" roughness="0.02"
transparency="0.9" refractiveIndex="1.2" scaleFactors="0.5, 0.5, 0.5">
<Transform>
<Scale value="0.05, 0.05, 0.05"/>
</Transform>
</Bumpy>
Document Type Definition:
<!ENTITY %Float "CDATA">
<!ENTITY %Color3f "CDATA">
<!ENTITY %Vector3f "CDATA">
<!ELEMENT Bumpy (Transform)>
<!ATTLIST Bumpy
ambient (%Color3f; | %Float;) "0, 0, 0"
diffuse (%Color3f; | %Float;) "1, 1, 1"
specular (%Color3f; | %Float;) "0, 0, 0"
roughness %Float "0"
reflectance (%Color3f; | %Float;) "0, 0, 0"
refractiveIndex %Float "1"
transparency (%Color3f; | %Float;) "0, 0, 0"
reflectionRoughness %Float "0">
scaleFactors %Vector3f; "1, 1, 1">
Methods inherited from class org.autochthonous.graphics.rt.shaders.ct.Plastic |
isReflecting, isSpecular, isTransparent, setDiffuse, setDiffuse, setDiffuse, setReflectance, setReflectance, setReflectionRoughness, setRefractiveIndex, setRoughness, setSpecular, setTransparency, setTransparency |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Bumpy
public Bumpy(World world)
getInstance
public static Shader getInstance(World world,
RMLReader in)
throws java.io.IOException
- Throws:
java.io.IOException
processParameters
protected void processParameters(ParametersMap params)
- handle the parameters we want, passing the extras
to our super class for processing.
- Overrides:
processParameters
in class Plastic
setScaleFactors
public void setScaleFactors(float xFact,
float yFact,
float zFact)
- set the scale factors for the bumpyness.
shade
public void shade(Hit hit,
Pixel p)
- the shade routine. We do the normal pertubation and then
pass the result back to the superclass for processing.
- Overrides:
shade
in class Plastic