parent
7055de4531
commit
9f9edee332
@ -0,0 +1,5 @@ |
||||
#pragma ShaderNode defaults(vec4(1.0), ,vec4(1.0)) |
||||
vec4 ColorMult(const in vec4 color1, const in vec4 color2, const in vec4 color3){ |
||||
return color1 * color2 * color3; |
||||
} |
||||
|
@ -0,0 +1,9 @@ |
||||
#pragma ShaderNode |
||||
vec4 CommonVert(const in mat4 worldViewProjectionMatrix, const in vec3 modelPosition){ |
||||
return worldViewProjectionMatrix * vec4(modelPosition, 1.0); |
||||
} |
||||
|
||||
#pragma ShaderNode |
||||
vec4 DoThing( in vec4 color ){ |
||||
return color * 0.1; |
||||
} |
@ -0,0 +1,45 @@ |
||||
MaterialDef Simple { |
||||
MaterialParameters { |
||||
Vector4 Color |
||||
} |
||||
|
||||
Technique { |
||||
WorldParameters { |
||||
WorldViewProjectionMatrix |
||||
} |
||||
|
||||
VertexShaderNodes { |
||||
ShaderNode CommonVert { |
||||
Definition: CommonVert: jme3test/matdefs/CommonVert.vert |
||||
InputMappings{ |
||||
worldViewProjectionMatrix = WorldParam.WorldViewProjectionMatrix |
||||
modelPosition = Attr.inPosition |
||||
} |
||||
OutputMappings{ |
||||
Global.position = result |
||||
} |
||||
} |
||||
ShaderNode ColorStuff { |
||||
Definition: DoThing: jme3test/matdefs/CommonVert.vert |
||||
InputMappings{ |
||||
color = MatParam.Color |
||||
} |
||||
OutputMappings{ |
||||
} |
||||
} |
||||
} |
||||
|
||||
FragmentShaderNodes { |
||||
ShaderNode ColorMult { |
||||
Definition: ColorMult: jme3test/matdefs/ColorMult.frag |
||||
InputMappings{ |
||||
color2 = ColorStuff.result |
||||
} |
||||
OutputMappings{ |
||||
Global.color = result |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
||||
} |
Loading…
Reference in new issue