From 606020312dfc99087b3d38167ba8da8e03f449fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Thu, 6 Sep 2018 11:11:00 +0200 Subject: [PATCH] Fix ceil texture --- raycastlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raycastlib.h b/raycastlib.h index 18ab5f0..9205634 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -770,7 +770,7 @@ void _columnFunction(HitResult *hits, uint16_t hitCount, uint16_t x, Ray ray) p.hit = hit; if (_computeTextureCoords) - p.textureCoordY = UNITS_PER_SQUARE - 1 - ((i - z1ScreenCeilNoClamp) * + p.textureCoordY = ((i - z1ScreenCeilNoClamp) * UNITS_PER_SQUARE) / wallScreenHeightCeilNoClamp; _pixelFunction(p);