From 2d67c2d92c1c72521ac2bd7cf90026143edb5c66 Mon Sep 17 00:00:00 2001 From: engineer_apple Date: Sat, 30 May 2020 13:58:37 +0000 Subject: [PATCH] Burningvideo: fix "Old HW Compatible blending" TextureLightMap2_Add git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6111 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CTRTextureLightMap2_Add.cpp | 3 ++- source/Irrlicht/SoftwareDriver2_helper.h | 6 ++++-- source/Irrlicht/burning_shader_compile_fragment_default.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/Irrlicht/CTRTextureLightMap2_Add.cpp b/source/Irrlicht/CTRTextureLightMap2_Add.cpp index d5cc7e32..11d430bf 100644 --- a/source/Irrlicht/CTRTextureLightMap2_Add.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_Add.cpp @@ -234,7 +234,7 @@ REALINLINE void CTRTextureLightMap2_Add::scanline_bilinear () #else getSample_texture ( r0, g0, b0, &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ); - getSample_texture ( r1, g1, b1, &IT[1], tofix ( line.t[0][1].x,inversew), tofix ( line.t[0][1].y,inversew) ); + getSample_texture ( r1, g1, b1, &IT[1], tofix ( line.t[1][0].x,inversew), tofix ( line.t[1][0].y,inversew) ); dst[i] = fix_to_sample( clampfix_maxcolor ( r0 + r1 ), clampfix_maxcolor ( g0 + g1 ), @@ -641,6 +641,7 @@ namespace video //! creates a flat triangle renderer IBurningShader* createTriangleRendererTextureLightMap2_Add(CBurningVideoDriver* driver) { + /* ETR_TEXTURE_GOURAUD_LIGHTMAP_ADD */ #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ return new CTRTextureLightMap2_Add(driver); #else diff --git a/source/Irrlicht/SoftwareDriver2_helper.h b/source/Irrlicht/SoftwareDriver2_helper.h index 59a91b85..a8979262 100644 --- a/source/Irrlicht/SoftwareDriver2_helper.h +++ b/source/Irrlicht/SoftwareDriver2_helper.h @@ -495,10 +495,12 @@ inline tFixPoint s32_to_fixPoint (const s32 x) return x << FIX_POINT_PRE; } +#if 0 inline tFixPointu u32_to_fixPoint (const u32 x) { return x << FIX_POINT_PRE; } +#endif inline u32 fixPointu_to_u32 (const tFixPointu x) { @@ -641,13 +643,13 @@ REALINLINE tFixPoint saturateFix ( const tFixPoint a) } +#if 0 // rount fixpoint to int inline s32 roundFix ( const tFixPoint x ) { return (s32)(( x + FIX_POINT_ZERO_DOT_FIVE ) >> FIX_POINT_PRE); } - - +#endif // x in [0;1[ #if 0 diff --git a/source/Irrlicht/burning_shader_compile_fragment_default.h b/source/Irrlicht/burning_shader_compile_fragment_default.h index f28ab70d..ab5bb7c7 100644 --- a/source/Irrlicht/burning_shader_compile_fragment_default.h +++ b/source/Irrlicht/burning_shader_compile_fragment_default.h @@ -34,7 +34,7 @@ private: //! constructor -burning_shader_class::burning_shader_color(CBurningVideoDriver* driver) +burning_shader_class::burning_shader_class(CBurningVideoDriver* driver) : IBurningShader(driver) { #ifdef _DEBUG