Skip to content

Commit f37143d

Browse files
committed
Reduce some differences between RGL and R3-R4
1 parent 9677d8a commit f37143d

File tree

3 files changed

+22
-13
lines changed

3 files changed

+22
-13
lines changed

src/Layers/xrRenderPC_GL/rgl.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class CRender : public D3DXRenderBase
5454
u32 ssao_half_data : 1;
5555
u32 ssao_hbao : 1;
5656
u32 ssao_hdao : 1;
57+
u32 ssao_ultra : 1;
5758
u32 hbao_vectorized : 1;
5859

5960
u32 smapsize : 16;
@@ -98,6 +99,8 @@ class CRender : public D3DXRenderBase
9899
u32 dx10_minmax_sm : 2;
99100
u32 dx10_minmax_sm_screenarea_threshold;
100101

102+
u32 dx11_enable_tessellation : 1;
103+
101104
u32 forcegloss : 1;
102105
u32 forceskinw : 1;
103106
float forcegloss_v;
@@ -220,7 +223,6 @@ class CRender : public D3DXRenderBase
220223
void init_cacades();
221224
void render_sun_cascades();
222225

223-
public:
224226
ShaderElement* rimp_select_sh_static(dxRender_Visual* pVisual, float cdist_sq);
225227
ShaderElement* rimp_select_sh_dynamic(dxRender_Visual* pVisual, float cdist_sq);
226228
D3DVERTEXELEMENT9* getVB_Format(int id, BOOL _alt = FALSE);
@@ -240,8 +242,10 @@ class CRender : public D3DXRenderBase
240242

241243
ICF void apply_object(IRenderable* O)
242244
{
243-
if (nullptr == O) return;
244-
if (nullptr == O->renderable_ROS()) return;
245+
if (nullptr == O)
246+
return;
247+
if (nullptr == O->renderable_ROS())
248+
return;
245249
CROS_impl& LT = *(CROS_impl*)O->renderable_ROS();
246250
LT.update_smooth(O);
247251
o_hemi = 0.75f * LT.get_hemi();
@@ -253,14 +257,16 @@ class CRender : public D3DXRenderBase
253257
void apply_lmaterial()
254258
{
255259
R_constant* C = &*RCache.get_c(c_sbase); // get sampler
256-
if (nullptr == C) return;
260+
if (nullptr == C)
261+
return;
257262
VERIFY (RC_dest_sampler == C->destination);
258263
VERIFY (RC_sampler == C->type);
259264
CTexture* T = RCache.get_ActiveTexture(u32(C->samp.index));
260265
VERIFY (T);
261266
float mtl = T->m_material;
262267
#ifdef DEBUG
263-
if (ps_r2_ls_flags.test(R2FLAG_GLOBALMATERIAL)) mtl=ps_r2_gmaterial;
268+
if (ps_r2_ls_flags.test(R2FLAG_GLOBALMATERIAL))
269+
mtl=ps_r2_gmaterial;
264270
#endif
265271
RCache.hemi.set_material(o_hemi, o_sun, 0, (mtl + .5f) / 4.f);
266272
RCache.hemi.set_pos_faces(o_hemi_cube[CROS_impl::CUBE_FACE_POS_X],

src/Layers/xrRenderPC_R3/r3.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,11 @@ class CRender : public D3DXRenderBase
234234

235235
ICF void apply_object(IRenderable* O)
236236
{
237-
if (0 == O)
237+
if (nullptr == O)
238238
return;
239-
if (0 == O->renderable_ROS())
239+
if (nullptr == O->renderable_ROS())
240240
return;
241-
CROS_impl& LT = *((CROS_impl*)O->renderable_ROS());
241+
CROS_impl& LT = *(CROS_impl*)O->renderable_ROS();
242242
LT.update_smooth(O);
243243
o_hemi = 0.75f * LT.get_hemi();
244244
// o_hemi = 0.5f*LT.get_hemi () ;
@@ -249,7 +249,7 @@ class CRender : public D3DXRenderBase
249249
void apply_lmaterial()
250250
{
251251
R_constant* C = &*RCache.get_c(c_sbase); // get sampler
252-
if (0 == C)
252+
if (nullptr == C)
253253
return;
254254
VERIFY(RC_dest_sampler == C->destination);
255255
VERIFY(RC_dx10texture == C->type);
@@ -261,10 +261,12 @@ class CRender : public D3DXRenderBase
261261
mtl = ps_r2_gmaterial;
262262
#endif
263263
RCache.hemi.set_material(o_hemi, o_sun, 0, (mtl + .5f) / 4.f);
264-
RCache.hemi.set_pos_faces(o_hemi_cube[CROS_impl::CUBE_FACE_POS_X], o_hemi_cube[CROS_impl::CUBE_FACE_POS_Y],
265-
o_hemi_cube[CROS_impl::CUBE_FACE_POS_Z]);
266-
RCache.hemi.set_neg_faces(o_hemi_cube[CROS_impl::CUBE_FACE_NEG_X], o_hemi_cube[CROS_impl::CUBE_FACE_NEG_Y],
267-
o_hemi_cube[CROS_impl::CUBE_FACE_NEG_Z]);
264+
RCache.hemi.set_pos_faces(o_hemi_cube[CROS_impl::CUBE_FACE_POS_X],
265+
o_hemi_cube[CROS_impl::CUBE_FACE_POS_Y],
266+
o_hemi_cube[CROS_impl::CUBE_FACE_POS_Z]);
267+
RCache.hemi.set_neg_faces(o_hemi_cube[CROS_impl::CUBE_FACE_NEG_X],
268+
o_hemi_cube[CROS_impl::CUBE_FACE_NEG_Y],
269+
o_hemi_cube[CROS_impl::CUBE_FACE_NEG_Z]);
268270
}
269271

270272
// feature level

src/Layers/xrRenderPC_R4/r4.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ class CRender : public D3DXRenderBase
111111
u32 forceskinw : 1;
112112
float forcegloss_v;
113113
} o;
114+
114115
struct RenderR4Statistics
115116
{
116117
u32 l_total;

0 commit comments

Comments
 (0)