mirror of
https://git.coom.tech/drummyfish/raycastlib.git
synced 2025-01-06 03:46:24 +01:00
Optimize horizontal depth
This commit is contained in:
parent
f891b6317a
commit
eda0106d08
1 changed files with 2 additions and 1 deletions
|
@ -1092,7 +1092,8 @@ static inline int16_t _RCL_drawHorizontalColumn(
|
|||
if (doDepth) /*constant condition - compiler should optimize it out*/\
|
||||
{\
|
||||
depth += depthIncrement;\
|
||||
pixelInfo->depth = RCL_max(0,depth); /*TODO: optimize */\
|
||||
pixelInfo->depth = depth * (depth > 0); /* fast abs val */ \
|
||||
/* ^ int comparison is fast, it is not braching! (= test instr.) */\
|
||||
}\
|
||||
if (doCoords) /*constant condition - compiler should optimize it out*/\
|
||||
{\
|
||||
|
|
Loading…
Reference in a new issue