Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to make gradients smoother #60

Open
Klemms opened this issue Jan 7, 2023 · 1 comment
Open

A way to make gradients smoother #60

Klemms opened this issue Jan 7, 2023 · 1 comment

Comments

@Klemms
Copy link

Klemms commented Jan 7, 2023

Hi,

This is more an help request post than a real issue, but I was wondering if there was any way to make gradients smoother ?
Maybe there is a way and I didn't find it ^^

This is the example of a gradient and as you can see, the different colors are very visible.
image

@Frosty-J
Copy link

You can apply dithering. I used ShapeRenderer but it's probably much the same process for shapedrawer. This is from an abandoned project and I don't remember if the end result looked any good.

ShaderProgram shader = new ShaderProgram(Gdx.files.internal("dither.vert"), Gdx.files.internal("dither.frag"));
Texture bayer16 = new Texture(Gdx.files.internal("blueTri64_0.png"), Pixmap.Format.RGBA8888, false);
bayer16.setWrap(Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat);

Download shader/texture files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants