Browse logs with clarity: filter by type/year, search text, and inspect parsed commit details.

2100Total Files
2088SVN Logs
12Git Changelogs
518Filtered Results

Detail

2013.02.14.Log0749.txt

📄SVN 📅2013-02-14 💾2,1 KB 3 Parsed entries CON BUILD FIX

Revision r3483

Classic renderer: high-precision sprite drawing, preventing stray lines on top.

Face- and wall-aligned sprites are drawn using the wall routines in BUILD.
However, the per-x-screen-coordinate distance (swall[]) is calculated in a way
that potentially incurs great precision loss (for example 5 bits for
xdimen=1280, yxaspect=65536). This leads to the starting (top) vertical texture
coordinate possibly wrapping to large values, leaving an unsightly "stray line"
on top of the sprite from certain viewing angles/horiz values.

The approach to fix it has two parts: first, the distance is calculated using
float values, preventing the precision loss. Because this doesn't fully prevent
the unwanted lines, the texture coords are clamped to the mininum and maximum
(0 and UINT32_MAX respectively) when calculating them for sprites.

Note that stray lines may still appear at the *bottom* of sprites under certain
circumstances, for example when viewing at a y-flipped sprite from above.
These should be less noticable in real-world usage though.

The feature is guarded by a macro HIGH_PRECISION_SPRITE in case using floating
point or 64-bit integers is undesirable/impossible on some platforms.

Revision r3482

engine.c: factor out calculation of texture coords / addresses in wall drawing.

Revision r3481

engine.c: don't pass [udls]wal to maskwallscan(), use *wall globals instead.
------------------------------------------------------------------------
Raw Content
------------------------------------------------------------------------
r3484 | helixhorned | 2013-02-14 08:02:16 -0800 (Thu, 14 Feb 2013) | 1 line

Fix build without Ken's ZIP library (WITHKPLIB not #define'd in compat.h).
------------------------------------------------------------------------
r3483 | helixhorned | 2013-02-14 08:02:12 -0800 (Thu, 14 Feb 2013) | 20 lines

Classic renderer: high-precision sprite drawing, preventing stray lines on top.

Face- and wall-aligned sprites are drawn using the wall routines in BUILD.
However, the per-x-screen-coordinate distance (swall[]) is calculated in a way
that potentially incurs great precision loss (for example 5 bits for
xdimen=1280, yxaspect=65536). This leads to the starting (top) vertical texture
coordinate possibly wrapping to large values, leaving an unsightly "stray line"
on top of the sprite from certain viewing angles/horiz values.

The approach to fix it has two parts: first, the distance is calculated using
float values, preventing the precision loss. Because this doesn't fully prevent
the unwanted lines, the texture coords are clamped to the mininum and maximum
(0 and UINT32_MAX respectively) when calculating them for sprites.

Note that stray lines may still appear at the *bottom* of sprites under certain
circumstances, for example when viewing at a y-flipped sprite from above.
These should be less noticable in real-world usage though.

The feature is guarded by a macro HIGH_PRECISION_SPRITE in case using floating
point or 64-bit integers is undesirable/impossible on some platforms.
------------------------------------------------------------------------
r3482 | helixhorned | 2013-02-14 08:02:06 -0800 (Thu, 14 Feb 2013) | 1 line

engine.c: factor out calculation of texture coords / addresses in wall drawing.
------------------------------------------------------------------------
r3481 | helixhorned | 2013-02-14 08:01:59 -0800 (Thu, 14 Feb 2013) | 1 line

engine.c: don't pass [udls]wal to maskwallscan(), use *wall globals instead.
------------------------------------------------------------------------