Last commit breaks Nfity’s text rendering

Since that commit I don’t get nifty’s text on controls.

The controls are there, buttons, layers, etc, but any text isn’t. It’s empty.

(Edited post to reflect the real commit guilty of breaking nifty.)

The “shader fix” completly broke my program too. I had to revert to a previous revision.

As soon as I start my program, the camera get stuck at water level.

Can’t say I’m having camera problems though, but thanks for the confirm. I’ll revert those changes.

Nevermind, it’s not that commit that broke Nifty here. It’s the modification made by @nehon

Reverting before the “Shader fix” but after “Uniform” still gave me the nifty problem. Updating to prior to that last one fixed it.

It looks like in clearValues() he pushes new data into the uniform value… which is bad if (like BitmapText and so many other cases) you’ve actually set your uniform to one of the color constants.

For example, material.setColor( “Color”, ColorRGBA.White )…

I believe that the code he added will turn white into 0,0,0,0, ie: invisible. I’m just guessing from a quick code review (made a bunch harder because the file was reformatted in the same commit :().

A motivated person could test it by printing or examining ColorRGBA.White in the update loop. If my theory is correct then it gets zeroed out.

I’m not entirely sure why the change was made but it feels wrong to me on several levels.

Ok my bad, this was causing an issue in the material rendering and I thought it would be a good solution.

I reverted it, and just changed how things are done in the material.

Now everything should work


Hey it’s all good @nehon We still love you. :wink: lol

hehehe thanks :wink:

But I thought it was good? Is it because setValue() uses references which clearValue() (with the modification) modifies those references?

Yeah. And it’s good that it uses references as that makes code a lot simpler. The funky voodoo that multipass lighting has to do shouldn’t impose limitations on other parts of the code, I think.