@@ -100,11 +100,11 @@ float ps_r__ssaDONTSORT = 32.f; // RO
100100float ps_r__ssaHZBvsTEX = 96 .f; // RO
101101
102102int ps_r__tf_Anisotropic = 8 ;
103+ float ps_r__tf_Mipbias = 0 .0f ;
103104
104105// R1
105106float ps_r1_ssaLOD_A = 64 .f;
106107float ps_r1_ssaLOD_B = 48 .f;
107- float ps_r1_tf_Mipbias = 0 .0f ;
108108Flags32 ps_r1_flags = {R1FLAG_DLIGHTS}; // r1-only
109109float ps_r1_lmodel_lerp = 0 .1f ;
110110float ps_r1_dlights_clip = 40 .f;
@@ -119,7 +119,6 @@ int ps_r1_SoftwareSkinning = 0; // r1-only
119119// R2
120120float ps_r2_ssaLOD_A = 64 .f;
121121float ps_r2_ssaLOD_B = 48 .f;
122- float ps_r2_tf_Mipbias = 0 .0f ;
123122
124123// R2-specific
125124Flags32 ps_r2_ls_flags = {R2FLAG_SUN
@@ -299,9 +298,10 @@ class CCC_tf_MipBias : public CCC_Float
299298 if (nullptr == HW.pDevice )
300299 return ;
301300
302- #if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
303- // TODO: DX10: Implement mip bias control
304- // VERIFY(!"apply not implmemented.");
301+ #if defined(USE_OGL)
302+ // TODO: OGL: Implement mipmap bias control.
303+ #elif defined(USE_DX10) || defined(USE_DX11)
304+ SSManager.SetMipLODBias (*value);
305305#else // USE_DX10
306306 for (u32 i = 0 ; i < HW.Caps .raster .dwStages ; i++)
307307 CHK_DX (HW.pDevice ->SetSamplerState (i, D3DSAMP_MIPMAPLODBIAS, *((LPDWORD)value)));
@@ -725,12 +725,12 @@ void xrRender_initconsole()
725725#endif // DEBUG
726726
727727 CMD2 (CCC_tf_Aniso, " r__tf_aniso" , &ps_r__tf_Anisotropic); // {1..16}
728+ CMD2 (CCC_tf_MipBias, " r__tf_mipbias" , &ps_r__tf_Mipbias); // {-3 +3}
728729
729730 // R1
730731 CMD4 (CCC_Float, " r1_ssa_lod_a" , &ps_r1_ssaLOD_A, 16 , 96 );
731732 CMD4 (CCC_Float, " r1_ssa_lod_b" , &ps_r1_ssaLOD_B, 16 , 64 );
732733 CMD4 (CCC_Float, " r1_lmodel_lerp" , &ps_r1_lmodel_lerp, 0 , 0 .333f );
733- CMD2 (CCC_tf_MipBias, " r1_tf_mipbias" , &ps_r1_tf_Mipbias); // {-3 +3}
734734 CMD3 (CCC_Mask, " r1_dlights" , &ps_r1_flags, R1FLAG_DLIGHTS);
735735 CMD4 (CCC_Float, " r1_dlights_clip" , &ps_r1_dlights_clip, 10 .f , 150 .f );
736736 CMD4 (CCC_Float, " r1_pps_u" , &ps_r1_pps_u, -1 .f , +1 .f );
@@ -751,7 +751,6 @@ void xrRender_initconsole()
751751 // R2
752752 CMD4 (CCC_Float, " r2_ssa_lod_a" , &ps_r2_ssaLOD_A, 16 , 96 );
753753 CMD4 (CCC_Float, " r2_ssa_lod_b" , &ps_r2_ssaLOD_B, 32 , 64 );
754- CMD2 (CCC_tf_MipBias, " r2_tf_mipbias" , &ps_r2_tf_Mipbias);
755754
756755 // R2-specific
757756 CMD2 (CCC_R2GM, " r2em" , &ps_r2_gmaterial);
@@ -920,14 +919,4 @@ void xrRender_initconsole()
920919 // CMD3(CCC_Mask, "r2_sun_ignore_portals", &ps_r2_ls_flags, R2FLAG_SUN_IGNORE_PORTALS);
921920}
922921
923- void xrRender_apply_tf ()
924- {
925- Console->Execute (" r__tf_aniso" );
926- #if RENDER == R_R1
927- Console->Execute (" r1_tf_mipbias" );
928- #else
929- Console->Execute (" r2_tf_mipbias" );
930- #endif
931- }
932-
933922#endif
0 commit comments