hello,
in a shader node, this code works :
outColor = vec4(simplexColor,1);
while this code does not
outColor = vec4(simplexColor,simplexColor.x);
and is replaced in the final shader by
outColor = vec4(BinaryFrag_simplexColor,simplexColor.x);
for some reason, the second instance of simplexColor is not properly replaced by BinaryFrag_simplexColor
so I use BinaryFrag_simplexColor instead as a workaround
just to let you know
regards
1 Like
nehon
February 9, 2015, 7:08pm
2
uh!
that’s definitely a bug.
Thanks for reporting, I’ll take care of it.
no problemo
can you check this one ?
Hello,
I wrote a shader (par of shader nodes) containing a simplex noise function
but I need to work in different manners from one case to another
defines dont seem to be recognized, this dont work
MaterialDef Simple {
Technique {
Defines {
SIMPLEX_GRAY : SIMPLEX_GRAY
}
....
void main(){
#ifdef SIMPLEX_GRAY
simplexColor = ...
#else
simplexColor = ....;
#endif
seems SIMPLEX_GRAY is never considered by the compiler as if it was not defined and so the secon…
thanks
so I just update jme with the nightly build occasionaly?
normen
February 9, 2015, 7:39pm
6
There is no nightly build as the current development version isn’t compatible with the 3.0 release.
nehon
February 9, 2015, 7:43pm
7
Well, once the bug is fixed, the best way will be to only pick the ShaderNodeGenerator, and use assetManager.setShaderNodeGenerator(…).
Many things changed on master and it’s yet a bit unstable.So it’s not worth to pull everything.
1 Like
I’ll keep with my workaround then
thanks
nehon
February 10, 2015, 8:13pm
9
I’m actually looking into this right now.
An easier workaround is to add a space before simplexColor.x
Then the generator replaces the variable.
Still an issue, some regex issue, but the workaround seemed more elegant.