-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the dither effect cheat a small bit and use a repeating dither t…
…exture no greater than 128x128, to save memory bandwidth.
- Loading branch information
Showing
3 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
uniform sampler2D PREFIX(dither_tex); | ||
uniform vec2 PREFIX(tc_scale); | ||
|
||
vec4 FUNCNAME(vec2 tc) { | ||
// We also choose to dither alpha, just in case. | ||
// Maybe it should in theory have a separate dither, | ||
// but I doubt it matters much. We currently don't | ||
// really handle alpha in any case. | ||
return INPUT(tc) + texture2D(PREFIX(dither_tex), tc).xxxx; | ||
return INPUT(tc) + texture2D(PREFIX(dither_tex), tc * PREFIX(tc_scale)).xxxx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters