mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphics: Remove roundTexel function
Actually, at least 704d4cf464
,
examples/moire doesn't work well without roundTexel on MacBook Pro.
However, now other parts are fixed (e.g. highp is used), it looks
like roundTexel is no longer needed.
This commit is contained in:
parent
b402cddd01
commit
a1dd7b39a3
@ -86,20 +86,8 @@ varying highp vec2 varying_tex_coord;
|
||||
varying highp vec2 varying_tex_coord_min;
|
||||
varying highp vec2 varying_tex_coord_max;
|
||||
|
||||
highp vec2 roundTexel(highp vec2 p) {
|
||||
// highp (relative) precision is 2^(-16) in the spec.
|
||||
// The minimum value for a denominator is half of 65536.
|
||||
highp float factor = 1.0 / 32768.0;
|
||||
return p - (mod(p + factor * 0.5, factor) - factor * 0.5);
|
||||
}
|
||||
|
||||
void main(void) {
|
||||
highp vec2 pos = varying_tex_coord;
|
||||
|
||||
// pos might include a very slight error.
|
||||
// roundTexel adjusts pos by rounding it (#315, #558).
|
||||
pos = roundTexel(pos);
|
||||
|
||||
highp vec2 texel_size = 1.0 / source_size;
|
||||
|
||||
#if defined(FILTER_NEAREST)
|
||||
|
Loading…
Reference in New Issue
Block a user