Package com.jme3.material
Class ShaderGenerationInfo
java.lang.Object
com.jme3.material.ShaderGenerationInfo
This class is basically a struct that contains the ShaderNodes information
in an appropriate way to ease the shader generation process and make it
faster.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<ShaderNodeVariable>the list of attributes of the vertex shaderprotected List<ShaderNodeVariable>the list of all the fragment shader global outputs (to assign ot gl_FragColor or gl_Fragdata[n])protected List<ShaderNodeVariable>the list of all the uniforms to declare in the fragment shaderthe unused node names of this shader (node whose output are never used)protected List<ShaderNodeVariable>the list of varyingsprotected ShaderNodeVariablethe global output of the vertex shader (to assign ot gl_Position)protected List<ShaderNodeVariable>the list of all the uniforms to declare in the vertex shader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ShaderGenerationInfoclone()voidread(JmeImporter im) voidsetUnusedNodes(List<String> unusedNodes) the list of unused node namesvoidsetVertexGlobal(ShaderNodeVariable vertexGlobal) sets the vertex shader global outputtoString()convenient toString methodvoidwrite(JmeExporter ex)
-
Field Details
-
attributes
the list of attributes of the vertex shader -
vertexUniforms
the list of all the uniforms to declare in the vertex shader -
vertexGlobal
the global output of the vertex shader (to assign ot gl_Position) -
varyings
the list of varyings -
fragmentUniforms
the list of all the uniforms to declare in the fragment shader -
fragmentGlobals
the list of all the fragment shader global outputs (to assign ot gl_FragColor or gl_Fragdata[n]) -
unusedNodes
the unused node names of this shader (node whose output are never used)
-
-
Constructor Details
-
ShaderGenerationInfo
public ShaderGenerationInfo()
-
-
Method Details
-
getAttributes
- Returns:
- the attributes
-
getVertexUniforms
- Returns:
- the vertex shader uniforms
-
getFragmentUniforms
- Returns:
- the fragment shader uniforms
-
getVertexGlobal
- Returns:
- the vertex shader global output
-
getFragmentGlobals
- Returns:
- the fragment shader global outputs
-
getVaryings
- Returns:
- the varyings
-
setVertexGlobal
sets the vertex shader global output- Parameters:
vertexGlobal- the global output
-
getUnusedNodes
- Returns:
- the list of unused node names
-
setUnusedNodes
the list of unused node names- Parameters:
unusedNodes- the new list (alias created)
-
toString
convenient toString method -
write
- Specified by:
writein interfaceSavable- Throws:
IOException
-
read
- Specified by:
readin interfaceSavable- Throws:
IOException
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-