mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-12 22:17:26 +01:00
graphics: Refactor shader
This commit is contained in:
parent
b69d564d89
commit
efaa5aa17a
@ -90,9 +90,7 @@ highp vec2 roundTexel(highp vec2 p) {
|
|||||||
// highp (relative) precision is 2^(-16) in the spec.
|
// highp (relative) precision is 2^(-16) in the spec.
|
||||||
// The minimum value for a denominator is half of 65536.
|
// The minimum value for a denominator is half of 65536.
|
||||||
highp float factor = 1.0 / 32768.0;
|
highp float factor = 1.0 / 32768.0;
|
||||||
p.x -= mod(p.x + factor * 0.5, factor) - factor * 0.5;
|
return p - (mod(p.x + factor * 0.5, factor) - factor * 0.5);
|
||||||
p.y -= mod(p.y + factor * 0.5, factor) - factor * 0.5;
|
|
||||||
return p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
|
Loading…
Reference in New Issue
Block a user