Shadernodes not replacing variable(BUG)

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

uh!
that’s definitely a bug.
Thanks for reporting, I’ll take care of it.

no problemo
can you check this one ?

thanks

I just answered :wink:

so I just update jme with the nightly build occasionaly?

There is no nightly build as the current development version isn’t compatible with the 3.0 release.

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

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.

It’s fixed on master

neat, thx mate