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:
parent
c82fb56e91
commit
259fe1826a
1 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@
|
||||||
- Screen coordinates are normal: [0,0] = top left, x goes right, y goes down.
|
- Screen coordinates are normal: [0,0] = top left, x goes right, y goes down.
|
||||||
|
|
||||||
author: Miloslav "drummyfish" Ciz
|
author: Miloslav "drummyfish" Ciz
|
||||||
license: CC0
|
license: CC0 1.0
|
||||||
version: 0.1
|
version: 0.1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1283,7 +1283,7 @@ RCL_Unit coordStep = 1;
|
||||||
#if RCL_COMPUTE_FLOOR_TEXCOORDS == 1
|
#if RCL_COMPUTE_FLOOR_TEXCOORDS == 1
|
||||||
RCL_Unit dx = p.hit.position.x - _RCL_camera.position.x;
|
RCL_Unit dx = p.hit.position.x - _RCL_camera.position.x;
|
||||||
RCL_Unit dy = p.hit.position.y - _RCL_camera.position.y;
|
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_Unit rayCameraCos = RCL_vectorsAngleCos(
|
||||||
RCL_angleToDirection(_RCL_camera.direction),ray.direction);
|
RCL_angleToDirection(_RCL_camera.direction),ray.direction);
|
||||||
|
|
Loading…
Reference in a new issue