type: s
(<material_class> | <material_name>)=<shader_class>{<param_1>=<value_1>,...},...
The association mechanism is able to associate an instance of a material (named only) with a new instance of a particular shader class. The material is referenced by the string used in the input file as its name, and the shader is reference by the fully qualified java class name. Any parameters that need to be set should be listed inside the curly braces. Note that the parameter setting mechanism only allows for integers, strings, floats, and doubles. Also note that reflection is used to set the values, and as such the parameter names should be exactly the name of the field in the corresponding class.
The parsing is done in a simple, but effective manner. The equals sign, curly braces,
and commas are used as token delimeters. Any text in between such delimeters is then
trimmed (ie - all whitespace is removed from the ends). The text that is left is
assumed to be the resulting token. Note that this can lead to errors in badly formed
strings. An example would be "material=skar. pax.shaders.Shader1{}". The space
renders the string between the equals sign and curly brace unusable as a fully
qualified java class name.
paxAssoc "MyMaterial=skar.pax.shaders.DirectShader{}" endIf you wanted to make two materials translucent and needed to pass two different sets or parameters to the corresponding materials, you could do the following:
paxAssoc "TransMaterial1 = skar.pax.shaders.Jensen01Shader{sigmaS=0.02, sigmaT=0.022}, TransMaterial2 = skar.pax.shaders.Jensen01Shader{sigmaS=0.04, sigmaT=0.044}" end