mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
graphics: Call roundTexel only on linear filter (#461)
This commit is contained in:
parent
8e72906f3d
commit
0a99103bc1
@ -99,7 +99,7 @@ highp vec2 roundTexel(highp vec2 p) {
|
||||
}
|
||||
|
||||
void main(void) {
|
||||
highp vec2 pos = roundTexel(varying_tex_coord);
|
||||
highp vec2 pos = varying_tex_coord;
|
||||
|
||||
#if defined(FILTER_NEAREST)
|
||||
vec4 color = texture2D(texture, pos);
|
||||
@ -112,6 +112,7 @@ void main(void) {
|
||||
#endif
|
||||
|
||||
#if defined(FILTER_LINEAR)
|
||||
pos = roundTexel(pos);
|
||||
highp vec2 texel_size = 1.0 / source_size;
|
||||
pos -= texel_size * 0.5;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user