|
17 | 17 | #define BIND_DECLARE(xf)\ |
18 | 18 | class cl_xform_##xf : public R_constant_setup\ |
19 | 19 | {\ |
20 | | - virtual void setup(R_constant* C) {RCache.xforms.set_c_##xf(C); }\ |
| 20 | + virtual void setup(R_constant* C) { RCache.xforms.set_c_##xf(C); }\ |
21 | 21 | };\ |
22 | 22 | static cl_xform_##xf binder_##xf |
23 | 23 | BIND_DECLARE(w); |
@@ -318,9 +318,53 @@ static class cl_screen_res : public R_constant_setup |
318 | 318 | } |
319 | 319 | } binder_screen_res; |
320 | 320 |
|
| 321 | +// SM_TODO: RCache.hemi заменить на более "логичное" место |
| 322 | +static class cl_hud_params : public R_constant_setup //--#SM+#-- |
| 323 | +{ |
| 324 | + virtual void setup(R_constant* C) { RCache.set_c(C, g_pGamePersistent->m_pGShaderConstants->hud_params); } |
| 325 | +} binder_hud_params; |
| 326 | + |
| 327 | +static class cl_script_params : public R_constant_setup //--#SM+#-- |
| 328 | +{ |
| 329 | + virtual void setup(R_constant* C) { RCache.set_c(C, g_pGamePersistent->m_pGShaderConstants->m_script_params); } |
| 330 | +} binder_script_params; |
| 331 | + |
| 332 | +static class cl_blend_mode : public R_constant_setup //--#SM+#-- |
| 333 | +{ |
| 334 | + virtual void setup(R_constant* C) { RCache.set_c(C, g_pGamePersistent->m_pGShaderConstants->m_blender_mode); } |
| 335 | +} binder_blend_mode; |
| 336 | + |
| 337 | +class cl_camo_data : public R_constant_setup //--#SM+#-- |
| 338 | +{ |
| 339 | + virtual void setup(R_constant* C) { RCache.hemi.c_camo_data = C; } |
| 340 | +}; |
| 341 | +static cl_camo_data binder_camo_data; |
| 342 | + |
| 343 | +class cl_custom_data : public R_constant_setup //--#SM+#-- |
| 344 | +{ |
| 345 | + virtual void setup(R_constant* C) { RCache.hemi.c_custom_data = C; } |
| 346 | +}; |
| 347 | +static cl_custom_data binder_custom_data; |
| 348 | + |
| 349 | +class cl_entity_data : public R_constant_setup //--#SM+#-- |
| 350 | +{ |
| 351 | + virtual void setup(R_constant* C) { RCache.hemi.c_entity_data = C; } |
| 352 | +}; |
| 353 | +static cl_entity_data binder_entity_data; |
| 354 | + |
321 | 355 | // Standart constant-binding |
322 | 356 | void CBlender_Compile::SetMapping() |
323 | 357 | { |
| 358 | + // misc |
| 359 | + r_Constant("m_hud_params", &binder_hud_params); //--#SM+#-- |
| 360 | + r_Constant("m_script_params", &binder_script_params); //--#SM+#-- |
| 361 | + r_Constant("m_blender_mode", &binder_blend_mode); //--#SM+#-- |
| 362 | + |
| 363 | + // objects data |
| 364 | + r_Constant("m_obj_camo_data", &binder_camo_data); //--#SM+#-- |
| 365 | + r_Constant("m_obj_custom_data", &binder_custom_data); //--#SM+#-- |
| 366 | + r_Constant("m_obj_entity_data", &binder_entity_data); //--#SM+#-- |
| 367 | + |
324 | 368 | // matrices |
325 | 369 | r_Constant("m_W", &binder_w); |
326 | 370 | r_Constant("m_invW", &binder_invw); |
@@ -374,7 +418,7 @@ void CBlender_Compile::SetMapping() |
374 | 418 | r_Constant("screen_res", &binder_screen_res); |
375 | 419 |
|
376 | 420 | // detail |
377 | | - //if (bDetail && detail_scaler) |
| 421 | + // if (bDetail && detail_scaler) |
378 | 422 | // Igor: bDetail can be overridden by no_detail_texture option. |
379 | 423 | // But shader can be deatiled implicitly, so try to set this parameter |
380 | 424 | // anyway. |
|
0 commit comments