mirror of
https://git.coom.tech/drummyfish/raycastlib.git
synced 2024-11-21 20:29:59 +01:00
Fix texture overflow
This commit is contained in:
parent
184cfb633c
commit
aa88bdaa3e
1 changed files with 2 additions and 2 deletions
|
@ -745,7 +745,7 @@ void _columnFunction(HitResult *hits, uint16_t hitCount, uint16_t x, Ray ray)
|
||||||
p.hit = hit;
|
p.hit = hit;
|
||||||
|
|
||||||
if (_computeTextureCoords)
|
if (_computeTextureCoords)
|
||||||
p.textureCoordY = UNITS_PER_SQUARE - ((i - z1ScreenNoClamp) *
|
p.textureCoordY = UNITS_PER_SQUARE - 1 -((i - z1ScreenNoClamp) *
|
||||||
UNITS_PER_SQUARE) / wallScreenHeightNoClamp;
|
UNITS_PER_SQUARE) / wallScreenHeightNoClamp;
|
||||||
|
|
||||||
_pixelFunction(p);
|
_pixelFunction(p);
|
||||||
|
@ -766,7 +766,7 @@ void _columnFunction(HitResult *hits, uint16_t hitCount, uint16_t x, Ray ray)
|
||||||
p.hit = hit;
|
p.hit = hit;
|
||||||
|
|
||||||
if (_computeTextureCoords)
|
if (_computeTextureCoords)
|
||||||
p.textureCoordY = UNITS_PER_SQUARE - ((i - z1ScreenCeilNoClamp) *
|
p.textureCoordY = UNITS_PER_SQUARE - 1 - ((i - z1ScreenCeilNoClamp) *
|
||||||
UNITS_PER_SQUARE) / wallScreenHeightCeilNoClamp;
|
UNITS_PER_SQUARE) / wallScreenHeightCeilNoClamp;
|
||||||
|
|
||||||
_pixelFunction(p);
|
_pixelFunction(p);
|
||||||
|
|
Loading…
Reference in a new issue