Skip to content

Configurable Antialiasing #194

Answered by Chlumsky
DennisGruendig asked this question in Q&A
Discussion options

You must be logged in to vote

I don't understand what exactly you mean by "pixelated fonts", "make the edge aliased". Post an example of what you want it to look like.

If you want to disable anti-aliasing and just make each pixel fully transparent or opaque (that's what I might call "pixelated"), then do:

float sd = median(msd.r, msd.g, msd.b);
float opacity = step(0.5, sd);
return lerp(float4(0, 0, 0, 0), fgColor, opacity);

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Chlumsky
Comment options

@DennisGruendig
Comment options

@Chlumsky
Comment options

@DennisGruendig
Comment options

@Chlumsky
Comment options

Answer selected by DennisGruendig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants