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