简体   繁体   中英

LibGDX - change texture brightness

There is a way to set the texture brightness with libGDX?
I prefer not to use GLSL for that, There is a way to do this with just libGDX?

I couldn't find something like that -

Texture tex = new Texture("tex.png");
tex.brightness = "0.5"; // Couldn't find something like that

If someone can help i will be glad. Thanks.

There is nothing like that.

But you can change the color of the SpriteBatch you use to draw it:

batch.setColor(0.5F, 0.5F, 0.5F, 1F); //It will be darker

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM