1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/raycastlib.git synced 2024-11-21 20:29:59 +01:00

Fix floor texcoords

This commit is contained in:
Miloslav Číž 2018-09-18 17:40:32 +02:00
parent c82fb56e91
commit 259fe1826a

View file

@ -25,7 +25,7 @@
- Screen coordinates are normal: [0,0] = top left, x goes right, y goes down.
author: Miloslav "drummyfish" Ciz
license: CC0
license: CC0 1.0
version: 0.1
*/
@ -1283,7 +1283,7 @@ RCL_Unit coordStep = 1;
#if RCL_COMPUTE_FLOOR_TEXCOORDS == 1
RCL_Unit dx = p.hit.position.x - _RCL_camera.position.x;
RCL_Unit dy = p.hit.position.y - _RCL_camera.position.y;
RCL_Unit pixPos = y - _RCL_middleRow + 1;
RCL_Unit pixPos = y - _RCL_middleRow;
RCL_Unit rayCameraCos = RCL_vectorsAngleCos(
RCL_angleToDirection(_RCL_camera.direction),ray.direction);