Fix world texture sampling
This commit is contained in:
parent
9e80ac2c96
commit
a3c03cafef
2 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack --config ./webpack.config.js --mode=production",
|
"build": "webpack --config ./webpack.config.js --mode=production",
|
||||||
"dev": "webpack serve --config ./webpack.config.js --mode=development",
|
"start": "webpack serve --config ./webpack.config.js --mode=development",
|
||||||
"gh-pages": "npm run build && push-dir --dir=build --branch=gh-pages"
|
"gh-pages": "npm run build && push-dir --dir=build --branch=gh-pages"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ float rand(vec2 co) {
|
||||||
}
|
}
|
||||||
|
|
||||||
vec2 roundUvToCellCenter(vec2 uv) {
|
vec2 roundUvToCellCenter(vec2 uv) {
|
||||||
return floor(uv * WORLD_SIZE) / WORLD_SIZE;
|
return floor(uv * WORLD_SIZE) / WORLD_SIZE + cellSize * 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tryGetFood(vec2 pos) {
|
bool tryGetFood(vec2 pos) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue