Skip to content

Commit e1e6db1

Browse files
committed
Details casts shadow from dynamic lights.
Console command r2_sun_details renamed to r2_detail_shadow.
1 parent ba25be8 commit e1e6db1

File tree

12 files changed

+19
-13
lines changed

12 files changed

+19
-13
lines changed

src/Layers/xrRender/xrRender_console.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ void xrRender_initconsole()
710710

711711
//CMD4(CCC_Float, "r__detail_density", &ps_r__Detail_density, .05f, 0.99f);
712712
CMD4(CCC_Float, "r__detail_density", &ps_current_detail_density/*&ps_r__Detail_density*/, 0.04f, 0.6f); //AVO: extended from 0.2f to 0.04f and replaced variable
713+
CMD3(CCC_Mask, "r2_detail_shadow", &ps_r2_ls_flags, R2FLAG_DETAIL_SHADOW);
713714

714715
#ifdef DEBUG
715716
CMD4(CCC_Float, "r__detail_l_ambient", &ps_r__Detail_l_ambient, .5f, .95f);
@@ -786,7 +787,6 @@ void xrRender_initconsole()
786787
#endif // DEBUG
787788

788789
CMD3(CCC_Mask, "r2_sun", &ps_r2_ls_flags, R2FLAG_SUN);
789-
CMD3(CCC_Mask, "r2_sun_details", &ps_r2_ls_flags, R2FLAG_SUN_DETAILS);
790790
CMD3(CCC_Mask, "r2_sun_focus", &ps_r2_ls_flags, R2FLAG_SUN_FOCUS);
791791
//CMD3(CCC_Mask, "r2_sun_static", &ps_r2_ls_flags, R2FLAG_SUN_STATIC);
792792
//CMD3(CCC_Mask, "r2_exp_splitscene", &ps_r2_ls_flags, R2FLAG_EXP_SPLIT_SCENE);

src/Layers/xrRender/xrRender_console.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ enum
143143
R2FLAG_SUN = (1 << 0),
144144
R2FLAG_SUN_FOCUS = (1 << 1),
145145
R2FLAG_SUN_TSM = (1 << 2),
146-
R2FLAG_SUN_DETAILS = (1 << 3),
146+
R2FLAG_DETAIL_SHADOW = (1 << 3),
147147
R2FLAG_TONEMAP = (1 << 4),
148148
R2FLAG_AA = (1 << 5),
149149
R2FLAG_GI = (1 << 6),

src/Layers/xrRenderPC_GL/r2_R_sun.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ void CRender::render_sun_near()
10251025
RCache.set_xform_view(Fidentity);
10261026
RCache.set_xform_project(fuckingsun->X.D.combine);
10271027
r_dsgraph_render_graph(0);
1028-
if (ps_r2_ls_flags.test(R2FLAG_SUN_DETAILS))
1028+
if (ps_r2_ls_flags.test(R2FLAG_DETAIL_SHADOW))
10291029
Details->Render();
10301030
fuckingsun->X.D.transluent = FALSE;
10311031
if (bSpecial)
@@ -1369,7 +1369,7 @@ void CRender::render_sun_cascade(u32 cascade_ind)
13691369
RCache.set_xform_view(Fidentity);
13701370
RCache.set_xform_project(fuckingsun->X.D.combine);
13711371
r_dsgraph_render_graph(0);
1372-
if (ps_r2_ls_flags.test(R2FLAG_SUN_DETAILS))
1372+
if (ps_r2_ls_flags.test(R2FLAG_DETAIL_SHADOW))
13731373
Details->Render();
13741374
fuckingsun->X.D.transluent = FALSE;
13751375
if (bSpecial)

src/Layers/xrRenderPC_GL/r3_R_rain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ void CRender::render_rain()
254254
RCache.set_xform_view(Fidentity);
255255
RCache.set_xform_project(RainLight.X.D.combine);
256256
r_dsgraph_render_graph(0);
257-
//if (ps_r2_ls_flags.test(R2FLAG_SUN_DETAILS))
257+
//if (ps_r2_ls_flags.test(R2FLAG_DETAIL_SHADOW))
258258
// Details->Render () ;
259259
}
260260
}

src/Layers/xrRenderPC_R2/r2_R_lights.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ void CRender::render_lights(light_Package& LP)
118118
RCache.set_xform_view(L->X.S.view);
119119
RCache.set_xform_project(L->X.S.project);
120120
r_dsgraph_render_graph(0);
121+
if (ps_r2_ls_flags.test(R2FLAG_DETAIL_SHADOW))
122+
Details->Render();
121123
L->X.S.transluent = FALSE;
122124
if (bSpecial)
123125
{

src/Layers/xrRenderPC_R2/r2_R_sun.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,7 @@ void CRender::render_sun_near()
14341434
RCache.set_xform_view(Fidentity);
14351435
RCache.set_xform_project(fuckingsun->X.D.combine);
14361436
r_dsgraph_render_graph(0);
1437-
if (ps_r2_ls_flags.test(R2FLAG_SUN_DETAILS))
1437+
if (ps_r2_ls_flags.test(R2FLAG_DETAIL_SHADOW))
14381438
Details->Render();
14391439
fuckingsun->X.D.transluent = FALSE;
14401440
if (bSpecial)
@@ -1754,7 +1754,7 @@ void CRender::render_sun_cascade(u32 cascade_ind)
17541754
RCache.set_xform_view(Fidentity);
17551755
RCache.set_xform_project(fuckingsun->X.D.combine);
17561756
r_dsgraph_render_graph(0);
1757-
if (ps_r2_ls_flags.test(R2FLAG_SUN_DETAILS))
1757+
if (ps_r2_ls_flags.test(R2FLAG_DETAIL_SHADOW))
17581758
Details->Render();
17591759
fuckingsun->X.D.transluent = FALSE;
17601760
if (bSpecial)

src/Layers/xrRenderPC_R3/r2_R_lights.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ void CRender::render_lights(light_Package& LP)
121121
RCache.set_xform_view(L->X.S.view);
122122
RCache.set_xform_project(L->X.S.project);
123123
r_dsgraph_render_graph(0);
124+
if (ps_r2_ls_flags.test(R2FLAG_DETAIL_SHADOW))
125+
Details->Render();
124126
L->X.S.transluent = FALSE;
125127
if (bSpecial)
126128
{

src/Layers/xrRenderPC_R3/r3_R_rain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ void CRender::render_rain()
244244
RCache.set_xform_view(Fidentity);
245245
RCache.set_xform_project(RainLight.X.D.combine);
246246
r_dsgraph_render_graph(0);
247-
// if (ps_r2_ls_flags.test(R2FLAG_SUN_DETAILS))
247+
// if (ps_r2_ls_flags.test(R2FLAG_DETAIL_SHADOW))
248248
// Details->Render () ;
249249
}
250250
}

src/Layers/xrRenderPC_R3/r3_R_sun.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ void CRender::render_sun_near()
10061006
RCache.set_xform_view(Fidentity);
10071007
RCache.set_xform_project(fuckingsun->X.D.combine);
10081008
r_dsgraph_render_graph(0);
1009-
if (ps_r2_ls_flags.test(R2FLAG_SUN_DETAILS))
1009+
if (ps_r2_ls_flags.test(R2FLAG_DETAIL_SHADOW))
10101010
Details->Render();
10111011
fuckingsun->X.D.transluent = FALSE;
10121012
if (bSpecial)
@@ -1345,7 +1345,7 @@ void CRender::render_sun_cascade(u32 cascade_ind)
13451345
RCache.set_xform_view(Fidentity);
13461346
RCache.set_xform_project(fuckingsun->X.D.combine);
13471347
r_dsgraph_render_graph(0);
1348-
if (ps_r2_ls_flags.test(R2FLAG_SUN_DETAILS))
1348+
if (ps_r2_ls_flags.test(R2FLAG_DETAIL_SHADOW))
13491349
Details->Render();
13501350
fuckingsun->X.D.transluent = FALSE;
13511351
if (bSpecial)

src/Layers/xrRenderPC_R4/r2_R_lights.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ void CRender::render_lights(light_Package& LP)
121121
RCache.set_xform_view(L->X.S.view);
122122
RCache.set_xform_project(L->X.S.project);
123123
r_dsgraph_render_graph(0);
124+
if (ps_r2_ls_flags.test(R2FLAG_DETAIL_SHADOW))
125+
Details->Render();
124126
L->X.S.transluent = FALSE;
125127
if (bSpecial)
126128
{

0 commit comments

Comments
 (0)