From 6889b64da8705a0d11cabcb452538397f20bfe57 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 27 Aug 2017 10:20:35 +0000 Subject: [PATCH] Tweak Polymost z-fighting avoidance code git-svn-id: https://svn.eduke32.com/eduke32@6434 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/polymost.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index 34339421c..cdd502389 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -4316,7 +4316,7 @@ int32_t polymost_lintersect(int32_t x1, int32_t y1, int32_t x2, int32_t y2, } #define TSPR_OFFSET_FACTOR .000008f -#define TSPR_OFFSET(tspr) ((TSPR_OFFSET_FACTOR + ((tspr->owner != -1 ? tspr->owner & 63 : 1) * TSPR_OFFSET_FACTOR)) * (sepdist(globalposx - tspr->x, globalposy - tspr->y, globalposz - tspr->z)>>3)) +#define TSPR_OFFSET(tspr) ((TSPR_OFFSET_FACTOR + ((tspr->owner != -1 ? tspr->owner & 63 : 1) * TSPR_OFFSET_FACTOR)) * (float)sepdist(globalposx - tspr->x, globalposy - tspr->y, globalposz - tspr->z) * 0.025f) void polymost_drawsprite(int32_t snum) { @@ -6051,7 +6051,7 @@ void polymost_initosdfuncs(void) { "r_pr_overridemodelscale", "overrides model scale if non-zero; use it to fine-tune DEF tokens", (void *) &pr_overridemodelscale, CVAR_FLOAT | CVAR_NOSAVE, 0, 500 }, { "r_pr_ati_fboworkaround", "enable this to workaround an ATI driver bug that causes sprite shadows to be square - you need to restart the renderer for it to take effect", (void *) &pr_ati_fboworkaround, CVAR_BOOL | CVAR_NOSAVE, 0, 1 }, { "r_pr_ati_nodepthoffset", "enable this to workaround an ATI driver bug that causes sprite drawing to freeze the game on Radeon X1x00 hardware - you need to restart the renderer for it to take effect", (void *) &pr_ati_nodepthoffset, CVAR_BOOL | CVAR_NOSAVE, 0, 1 }, - { "r_pr_nullrender", "disable all draws when enabled, 2: disables updates too", (void *)&pr_nullrender, CVAR_INT | CVAR_NOSAVE, 0, 3 }, + { "r_pr_nullrender", "disable all draws when enabled, 2: disables updates too", (void *)&pr_nullrender, CVAR_INT | CVAR_NOSAVE, 0, 3 }, #endif #ifdef __ANDROID__