@@ -43,6 +43,7 @@ void CRender::render_lights(light_Package& LP)
43
43
}
44
44
}
45
45
46
+ // 2. refactor
46
47
{
47
48
xr_vector<light*>& source = LP.v_shadowed ;
48
49
xr_vector<light*> refactored;
@@ -129,14 +130,14 @@ void CRender::render_lights(light_Package& LP)
129
130
}
130
131
};
131
132
132
- const auto & flush_lights = [] (CRender& render, xr_vector<task_data_t >& lights_queue)
133
+ const auto & flush_lights = [] (xr_vector<task_data_t >& lights_queue)
133
134
{
134
135
for (const auto & [L, task, batch_id] : lights_queue)
135
136
{
136
137
VERIFY (task);
137
138
TaskScheduler->Wait (*task);
138
139
139
- auto & dsgraph = render .get_context (batch_id);
140
+ auto & dsgraph = RImplementation .get_context (batch_id);
140
141
141
142
const bool bNormal = !dsgraph.mapNormalPasses [0 ][0 ].empty () || !dsgraph.mapMatrixPasses [0 ][0 ].empty ();
142
143
const bool bSpecial = !dsgraph.mapNormalPasses [1 ][0 ].empty () || !dsgraph.mapMatrixPasses [1 ][0 ].empty () ||
@@ -145,27 +146,27 @@ void CRender::render_lights(light_Package& LP)
145
146
{
146
147
PIX_EVENT_CTX (dsgraph.cmd_list , SHADOWED_LIGHT);
147
148
148
- render .Stats .s_merged ++;
149
+ RImplementation .Stats .s_merged ++;
149
150
L_spot_s.push_back (L);
150
- render .Target ->phase_smap_spot (dsgraph.cmd_list , L);
151
+ RImplementation .Target ->phase_smap_spot (dsgraph.cmd_list , L);
151
152
dsgraph.cmd_list .set_xform_world (Fidentity);
152
153
dsgraph.cmd_list .set_xform_view (L->X .S .view );
153
154
dsgraph.cmd_list .set_xform_project (L->X .S .project );
154
155
dsgraph.render_graph (0 );
155
156
if (ps_r2_ls_flags.test (R2FLAG_SUN_DETAILS))
156
157
{
157
- if (check_grass_shadow (L, render .ViewBase ))
158
+ if (check_grass_shadow (L, RImplementation .ViewBase ))
158
159
{
159
- render .Details ->fade_distance = -1 ; // Use light position to calc "fade"
160
- render .Details ->light_position .set (L->position );
161
- render .Details ->Render (dsgraph.cmd_list );
160
+ RImplementation .Details ->fade_distance = -1 ; // Use light position to calc "fade"
161
+ RImplementation .Details ->light_position .set (L->position );
162
+ RImplementation .Details ->Render (dsgraph.cmd_list );
162
163
}
163
164
}
164
165
L->X .S .transluent = FALSE ;
165
166
if (bSpecial)
166
167
{
167
168
L->X .S .transluent = TRUE ;
168
- render .Target ->phase_smap_spot_tsh (dsgraph.cmd_list , L);
169
+ RImplementation .Target ->phase_smap_spot_tsh (dsgraph.cmd_list , L);
169
170
PIX_EVENT_CTX (dsgraph.cmd_list , SHADOWED_LIGHTS_RENDER_GRAPH);
170
171
dsgraph.render_graph (1 ); // normal level, secondary priority
171
172
PIX_EVENT_CTX (dsgraph.cmd_list , SHADOWED_LIGHTS_RENDER_SORTED);
@@ -174,7 +175,7 @@ void CRender::render_lights(light_Package& LP)
174
175
}
175
176
else
176
177
{
177
- render .Stats .s_finalclip ++;
178
+ RImplementation .Stats .s_finalclip ++;
178
179
}
179
180
180
181
L->svis [batch_id].end (); // NOTE(DX11): occqs are fetched here, this should be done on the imm context only
0 commit comments