Skip to content

Commit 0e4314e

Browse files
committed
xrRender_RX: reduce differences between renderers
1 parent 0346ad8 commit 0e4314e

File tree

10 files changed

+60
-100
lines changed

10 files changed

+60
-100
lines changed

src/Layers/xrRender/Blender_Particle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void CBlender_Particle::Compile(CBlender_Compile& C)
201201
C.r_dx10Texture("s_base", C.L_textures[0]);
202202
u32 hSampler = C.r_dx10Sampler("smp_base");
203203
if (oClamp.value && (hSampler != (u32)-1))
204-
C.i_dx10Address(hSampler, D3DTADDRESS_CLAMP);
204+
C.i_Address(hSampler, D3DTADDRESS_CLAMP);
205205
// Igor: soft particles
206206
// C.r_Sampler ("s_position", "$user$position");
207207
C.r_dx10Texture("s_position", "$user$position");
@@ -243,7 +243,7 @@ void CBlender_Particle::Compile(CBlender_Compile& C)
243243
C.r_dx10Texture("s_base", C.L_textures[0]);
244244
u32 hSampler = C.r_dx10Sampler("smp_base");
245245
if (oClamp.value && (hSampler != (u32)-1))
246-
C.i_dx10Address(hSampler, D3DTADDRESS_CLAMP);
246+
C.i_Address(hSampler, D3DTADDRESS_CLAMP);
247247
// Igor: soft particles
248248
//C.r_Sampler ("s_position", "$user$position");
249249
C.r_dx10Texture("s_position", "$user$position");

src/Layers/xrRender/Blender_Recorder_R2.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ void CBlender_Compile::i_Projective(u32 s, bool b)
102102
else
103103
RS.SetTSS(s, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE);
104104
}
105+
#endif // USE_DX10
106+
105107
void CBlender_Compile::i_Address(u32 s, u32 address)
106108
{
107109
RS.SetSAMP(s, D3DSAMP_ADDRESSU, address);
@@ -118,6 +120,8 @@ void CBlender_Compile::i_Filter(u32 s, u32 _min, u32 _mip, u32 _mag)
118120
i_Filter_Mip(s, _mip);
119121
i_Filter_Mag(s, _mag);
120122
}
123+
124+
#if !defined(USE_DX10) && !defined(USE_DX11)
121125
u32 CBlender_Compile::r_Sampler(
122126
LPCSTR _name, LPCSTR texture, bool b_ps1x_ProjectiveDivide, u32 address, u32 fmin, u32 fmip, u32 fmag)
123127
{
@@ -185,4 +189,4 @@ void CBlender_Compile::r_End()
185189
#endif
186190
SH->passes.push_back(RImplementation.Resources->_CreatePass(dest));
187191
}
188-
#endif // USE_DX10
192+
#endif // USE_DX10

src/Layers/xrRender/Blender_Screen_SET.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void CBlender_Screen_SET::Compile(CBlender_Compile& C)
129129
C.r_dx10Texture("s_base", C.L_textures[0]);
130130
int iSmp = C.r_dx10Sampler("smp_base");
131131
if (oClamp.value)
132-
C.i_dx10Address(iSmp, D3DTADDRESS_CLAMP);
132+
C.i_Address(iSmp, D3DTADDRESS_CLAMP);
133133
}
134134
else
135135
{
@@ -165,7 +165,7 @@ void CBlender_Screen_SET::Compile(CBlender_Compile& C)
165165
C.r_dx10Texture("s_base", C.L_textures[0]);
166166
int iSmp = C.r_dx10Sampler("smp_base");
167167
if ((oClamp.value) && (iSmp != u32(-1)))
168-
C.i_dx10Address(iSmp, D3DTADDRESS_CLAMP);
168+
C.i_Address(iSmp, D3DTADDRESS_CLAMP);
169169
}
170170

171171
C.PassSET_ZB(oZTest.value, oZWrite.value);

src/Layers/xrRender/blenders/Blender_Recorder.h

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,26 +118,21 @@ class CBlender_Compile
118118
void Stage_Constant(LPCSTR name);
119119
void StageEnd();
120120

121-
// R1/R2-compiler [programmable]
122-
#if defined(USE_DX10) || defined(USE_DX11)
123-
void i_dx10Address(u32 s, u32 address);
124-
void i_dx10Filter_Min(u32 s, u32 f);
125-
void i_dx10Filter_Mip(u32 s, u32 f);
126-
void i_dx10Filter_Mag(u32 s, u32 f);
127-
void i_dx10FilterAnizo(u32 s, BOOL value);
128-
void i_dx10Filter(u32 s, u32 _min, u32 _mip, u32 _mag);
129-
void i_dx10BorderColor(u32 s, u32 color);
130-
#else // USE_DX10
121+
// R1/R2-compiler [programmable]
122+
#if defined(USE_DX9) || defined(USE_OGL)
131123
u32 i_Sampler(LPCSTR name);
132124
void i_Texture(u32 s, LPCSTR name);
133125
void i_Projective(u32 s, bool b);
126+
#endif
134127
void i_Address(u32 s, u32 address);
135128
void i_Filter_Min(u32 s, u32 f);
136129
void i_Filter_Mip(u32 s, u32 f);
137130
void i_Filter_Mag(u32 s, u32 f);
131+
#if defined(USE_DX10) || defined(USE_DX11)
132+
void i_dx10FilterAnizo(u32 s, BOOL value);
133+
#endif
138134
void i_Filter(u32 s, u32 _min, u32 _mip, u32 _mag);
139135
void i_BorderColor(u32 s, u32 color);
140-
#endif // USE_DX10
141136

142137
// R1/R2-compiler [programmable] - templates
143138
void r_Pass(LPCSTR vs, LPCSTR ps, bool bFog, BOOL bZtest = TRUE, BOOL bZwrite = TRUE, BOOL bABlend = FALSE,

src/Layers/xrRender/uber_deffer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void uber_deffer(CBlender_Compile& C, bool hq, LPCSTR _vspec, LPCSTR _pspec, BOO
148148
u32 stage = C.r_dx10Sampler("smp_bump_ds");
149149
if (stage != -1)
150150
{
151-
C.i_dx10Address(stage, D3DTADDRESS_WRAP);
151+
C.i_Address(stage, D3DTADDRESS_WRAP);
152152
C.i_dx10FilterAnizo(stage, TRUE);
153153
}
154154
if (ps_r2_ls_flags_ext.test(R2FLAGEXT_WIREFRAME))
@@ -341,7 +341,7 @@ void uber_shadow(CBlender_Compile& C, LPCSTR _vspec)
341341
u32 stage = C.r_dx10Sampler("smp_bump_ds");
342342
if (stage != -1)
343343
{
344-
C.i_dx10Address(stage, D3DTADDRESS_WRAP);
344+
C.i_Address(stage, D3DTADDRESS_WRAP);
345345
C.i_dx10FilterAnizo(stage, TRUE);
346346
}
347347
if (ps_r2_ls_flags_ext.test(R2FLAGEXT_WIREFRAME))

src/Layers/xrRenderDX10/3DFluid/dx103DFluidBlenders.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,29 +152,29 @@ void SetupSamplers(CBlender_Compile& C)
152152
int smp = C.r_dx10Sampler("samPointClamp");
153153
if (smp != u32(-1))
154154
{
155-
C.i_dx10Address(smp, D3DTADDRESS_CLAMP);
156-
C.i_dx10Filter(smp, D3DTEXF_POINT, D3DTEXF_POINT, D3DTEXF_POINT);
155+
C.i_Address(smp, D3DTADDRESS_CLAMP);
156+
C.i_Filter(smp, D3DTEXF_POINT, D3DTEXF_POINT, D3DTEXF_POINT);
157157
}
158158

159159
smp = C.r_dx10Sampler("samLinear");
160160
if (smp != u32(-1))
161161
{
162-
C.i_dx10Address(smp, D3DTADDRESS_CLAMP);
163-
C.i_dx10Filter(smp, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
162+
C.i_Address(smp, D3DTADDRESS_CLAMP);
163+
C.i_Filter(smp, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
164164
}
165165

166166
smp = C.r_dx10Sampler("samLinearClamp");
167167
if (smp != u32(-1))
168168
{
169-
C.i_dx10Address(smp, D3DTADDRESS_CLAMP);
170-
C.i_dx10Filter(smp, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
169+
C.i_Address(smp, D3DTADDRESS_CLAMP);
170+
C.i_Filter(smp, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
171171
}
172172

173173
smp = C.r_dx10Sampler("samRepeat");
174174
if (smp != u32(-1))
175175
{
176-
C.i_dx10Address(smp, D3DTADDRESS_WRAP);
177-
C.i_dx10Filter(smp, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
176+
C.i_Address(smp, D3DTADDRESS_WRAP);
177+
C.i_Filter(smp, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
178178
}
179179
}
180180
void SetupTextures(CBlender_Compile& C)

src/Layers/xrRenderDX10/Blender_Recorder_R3.cpp

Lines changed: 14 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -52,51 +52,12 @@ void CBlender_Compile::r_dx10Texture(LPCSTR ResourceName, LPCSTR texture)
5252
passTextures.push_back(std::make_pair(stage, ref_texture(RImplementation.Resources->_CreateTexture(TexName))));
5353
}
5454

55-
void CBlender_Compile::i_dx10Address(u32 s, u32 address)
56-
{
57-
// VERIFY(s!=u32(-1));
58-
if (s == u32(-1))
59-
{
60-
Msg("s != u32(-1)");
61-
}
62-
RS.SetSAMP(s, D3DSAMP_ADDRESSU, address);
63-
RS.SetSAMP(s, D3DSAMP_ADDRESSV, address);
64-
RS.SetSAMP(s, D3DSAMP_ADDRESSW, address);
65-
}
66-
67-
void CBlender_Compile::i_dx10BorderColor(u32 s, u32 color) { RS.SetSAMP(s, D3DSAMP_BORDERCOLOR, color); }
68-
void CBlender_Compile::i_dx10Filter_Min(u32 s, u32 f)
69-
{
70-
VERIFY(s != u32(-1));
71-
RS.SetSAMP(s, D3DSAMP_MINFILTER, f);
72-
}
73-
74-
void CBlender_Compile::i_dx10Filter_Mip(u32 s, u32 f)
75-
{
76-
VERIFY(s != u32(-1));
77-
RS.SetSAMP(s, D3DSAMP_MIPFILTER, f);
78-
}
79-
80-
void CBlender_Compile::i_dx10Filter_Mag(u32 s, u32 f)
81-
{
82-
VERIFY(s != u32(-1));
83-
RS.SetSAMP(s, D3DSAMP_MAGFILTER, f);
84-
}
85-
8655
void CBlender_Compile::i_dx10FilterAnizo(u32 s, BOOL value)
8756
{
8857
VERIFY(s != u32(-1));
8958
RS.SetSAMP(s, XRDX10SAMP_ANISOTROPICFILTER, value);
9059
}
9160

92-
void CBlender_Compile::i_dx10Filter(u32 s, u32 _min, u32 _mip, u32 _mag)
93-
{
94-
VERIFY(s != u32(-1));
95-
i_dx10Filter_Min(s, _min);
96-
i_dx10Filter_Mip(s, _mip);
97-
i_dx10Filter_Mag(s, _mag);
98-
}
99-
10061
u32 CBlender_Compile::r_dx10Sampler(LPCSTR ResourceName)
10162
{
10263
// TEST
@@ -121,52 +82,52 @@ u32 CBlender_Compile::r_dx10Sampler(LPCSTR ResourceName)
12182
// Use D3DTADDRESS_CLAMP, D3DTEXF_POINT, D3DTEXF_NONE, D3DTEXF_POINT
12283
if (0 == xr_strcmp(ResourceName, "smp_nofilter"))
12384
{
124-
i_dx10Address(stage, D3DTADDRESS_CLAMP);
125-
i_dx10Filter(stage, D3DTEXF_POINT, D3DTEXF_NONE, D3DTEXF_POINT);
85+
i_Address(stage, D3DTADDRESS_CLAMP);
86+
i_Filter(stage, D3DTEXF_POINT, D3DTEXF_NONE, D3DTEXF_POINT);
12687
}
12788

12889
// Use D3DTADDRESS_CLAMP, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR
12990
if (0 == xr_strcmp(ResourceName, "smp_rtlinear"))
13091
{
131-
i_dx10Address(stage, D3DTADDRESS_CLAMP);
132-
i_dx10Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
92+
i_Address(stage, D3DTADDRESS_CLAMP);
93+
i_Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
13394
}
13495

13596
// Use D3DTADDRESS_WRAP, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR
13697
if (0 == xr_strcmp(ResourceName, "smp_linear"))
13798
{
138-
i_dx10Address(stage, D3DTADDRESS_WRAP);
139-
i_dx10Filter(stage, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
99+
i_Address(stage, D3DTADDRESS_WRAP);
100+
i_Filter(stage, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
140101
}
141102

142103
// Use D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC, D3DTEXF_LINEAR, D3DTEXF_ANISOTROPIC
143104
if (0 == xr_strcmp(ResourceName, "smp_base"))
144105
{
145-
i_dx10Address(stage, D3DTADDRESS_WRAP);
106+
i_Address(stage, D3DTADDRESS_WRAP);
146107
i_dx10FilterAnizo(stage, TRUE);
147-
// i_dx10Filter(stage, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
108+
// i_Filter(stage, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
148109
}
149110

150111
// Use D3DTADDRESS_CLAMP, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR
151112
if (0 == xr_strcmp(ResourceName, "smp_material"))
152113
{
153-
i_dx10Address(stage, D3DTADDRESS_CLAMP);
154-
i_dx10Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
114+
i_Address(stage, D3DTADDRESS_CLAMP);
115+
i_Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
155116
RS.SetSAMP(stage, D3DSAMP_ADDRESSW, D3DTADDRESS_WRAP);
156117
}
157118

158119
if (0 == xr_strcmp(ResourceName, "smp_smap"))
159120
{
160-
i_dx10Address(stage, D3DTADDRESS_CLAMP);
161-
i_dx10Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
121+
i_Address(stage, D3DTADDRESS_CLAMP);
122+
i_Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
162123
RS.SetSAMP(stage, XRDX10SAMP_COMPARISONFILTER, TRUE);
163124
RS.SetSAMP(stage, XRDX10SAMP_COMPARISONFUNC, (u32)D3D_COMPARISON_LESS_EQUAL);
164125
}
165126

166127
if (0 == xr_strcmp(ResourceName, "smp_jitter"))
167128
{
168-
i_dx10Address(stage, D3DTADDRESS_WRAP);
169-
i_dx10Filter(stage, D3DTEXF_POINT, D3DTEXF_NONE, D3DTEXF_POINT);
129+
i_Address(stage, D3DTADDRESS_WRAP);
130+
i_Filter(stage, D3DTEXF_POINT, D3DTEXF_NONE, D3DTEXF_POINT);
170131
}
171132

172133
return stage;

src/Layers/xrRenderPC_R3/blender_light_direct.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C)
7777
jitter(C);
7878
{
7979
u32 s = C.r_dx10Sampler("smp_smap");
80-
C.i_dx10Address(s, D3DTADDRESS_BORDER);
81-
C.i_dx10BorderColor(s, D3DCOLOR_ARGB(255, 255, 255, 255));
80+
C.i_Address(s, D3DTADDRESS_BORDER);
81+
C.i_BorderColor(s, D3DCOLOR_ARGB(255, 255, 255, 255));
8282
}
8383

8484
C.r_End();
@@ -251,8 +251,8 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C)
251251
jitter(C);
252252
{
253253
u32 s = C.r_dx10Sampler("smp_smap");
254-
C.i_dx10Address(s, D3DTADDRESS_BORDER);
255-
C.i_dx10BorderColor(s, D3DCOLOR_ARGB(255, 255, 255, 255));
254+
C.i_Address(s, D3DTADDRESS_BORDER);
255+
C.i_BorderColor(s, D3DCOLOR_ARGB(255, 255, 255, 255));
256256
}
257257

258258
C.r_End();

src/Layers/xrRenderPC_R4/CSCompiler.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ CSCompiler& CSCompiler::defSampler(LPCSTR ResourceName)
2323
// Use D3DTADDRESS_CLAMP, D3DTEXF_POINT, D3DTEXF_NONE, D3DTEXF_POINT
2424
if (0 == xr_strcmp(ResourceName, "smp_nofilter"))
2525
{
26-
// i_dx10Address( stage, D3DTADDRESS_CLAMP);
27-
// i_dx10Filter(stage, D3DTEXF_POINT, D3DTEXF_NONE, D3DTEXF_POINT);
26+
// i_Address( stage, D3DTADDRESS_CLAMP);
27+
// i_Filter(stage, D3DTEXF_POINT, D3DTEXF_NONE, D3DTEXF_POINT);
2828
desc.AddressU = desc.AddressV = desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
2929
desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
3030
return defSampler(ResourceName, desc);
@@ -33,8 +33,8 @@ CSCompiler& CSCompiler::defSampler(LPCSTR ResourceName)
3333
// Use D3DTADDRESS_CLAMP, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR
3434
if (0 == xr_strcmp(ResourceName, "smp_rtlinear"))
3535
{
36-
// i_dx10Address( stage, D3DTADDRESS_CLAMP);
37-
// i_dx10Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
36+
// i_Address( stage, D3DTADDRESS_CLAMP);
37+
// i_Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
3838
desc.AddressU = desc.AddressV = desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
3939
desc.Filter = D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT;
4040
return defSampler(ResourceName, desc);
@@ -43,8 +43,8 @@ CSCompiler& CSCompiler::defSampler(LPCSTR ResourceName)
4343
// Use D3DTADDRESS_WRAP, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR
4444
if (0 == xr_strcmp(ResourceName, "smp_linear"))
4545
{
46-
// i_dx10Address( stage, D3DTADDRESS_WRAP);
47-
// i_dx10Filter(stage, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
46+
// i_Address( stage, D3DTADDRESS_WRAP);
47+
// i_Filter(stage, D3DTEXF_LINEAR, D3DTEXF_LINEAR, D3DTEXF_LINEAR);
4848
desc.AddressU = desc.AddressV = desc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
4949
desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
5050
return defSampler(ResourceName, desc);
@@ -53,7 +53,7 @@ CSCompiler& CSCompiler::defSampler(LPCSTR ResourceName)
5353
// Use D3DTADDRESS_WRAP, D3DTEXF_ANISOTROPIC, D3DTEXF_LINEAR, D3DTEXF_ANISOTROPIC
5454
if (0 == xr_strcmp(ResourceName, "smp_base"))
5555
{
56-
// i_dx10Address( stage, D3DTADDRESS_WRAP);
56+
// i_Address( stage, D3DTADDRESS_WRAP);
5757
// i_dx10FilterAnizo( stage, TRUE);
5858
desc.AddressU = desc.AddressV = desc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
5959
desc.Filter = D3D11_FILTER_ANISOTROPIC;
@@ -64,8 +64,8 @@ CSCompiler& CSCompiler::defSampler(LPCSTR ResourceName)
6464
// Use D3DTADDRESS_CLAMP, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR
6565
if (0 == xr_strcmp(ResourceName, "smp_material"))
6666
{
67-
// i_dx10Address( stage, D3DTADDRESS_CLAMP);
68-
// i_dx10Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
67+
// i_Address( stage, D3DTADDRESS_CLAMP);
68+
// i_Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
6969
// RS.SetSAMP(stage,D3DSAMP_ADDRESSW, D3DTADDRESS_WRAP);
7070
desc.AddressU = desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
7171
desc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
@@ -75,8 +75,8 @@ CSCompiler& CSCompiler::defSampler(LPCSTR ResourceName)
7575

7676
if (0 == xr_strcmp(ResourceName, "smp_smap"))
7777
{
78-
// i_dx10Address( stage, D3DTADDRESS_CLAMP);
79-
// i_dx10Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
78+
// i_Address( stage, D3DTADDRESS_CLAMP);
79+
// i_Filter(stage, D3DTEXF_LINEAR, D3DTEXF_NONE, D3DTEXF_LINEAR);
8080
// RS.SetSAMP(stage, XRDX10SAMP_COMPARISONFILTER, TRUE);
8181
// RS.SetSAMP(stage, XRDX10SAMP_COMPARISONFUNC, D3D_COMPARISON_LESS_EQUAL);
8282
desc.AddressU = desc.AddressV = desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
@@ -87,8 +87,8 @@ CSCompiler& CSCompiler::defSampler(LPCSTR ResourceName)
8787

8888
if (0 == xr_strcmp(ResourceName, "smp_jitter"))
8989
{
90-
// i_dx10Address( stage, D3DTADDRESS_WRAP);
91-
// i_dx10Filter(stage, D3DTEXF_POINT, D3DTEXF_NONE, D3DTEXF_POINT);
90+
// i_Address( stage, D3DTADDRESS_WRAP);
91+
// i_Filter(stage, D3DTEXF_POINT, D3DTEXF_NONE, D3DTEXF_POINT);
9292
desc.AddressU = desc.AddressV = desc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
9393
desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
9494
return defSampler(ResourceName, desc);

src/Layers/xrRenderPC_R4/blender_light_direct.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ void CBlender_accum_direct::Compile(CBlender_Compile& C)
7777
jitter(C);
7878
{
7979
u32 s = C.r_dx10Sampler("smp_smap");
80-
C.i_dx10Address(s, D3DTADDRESS_BORDER);
81-
C.i_dx10BorderColor(s, D3DCOLOR_ARGB(255, 255, 255, 255));
80+
C.i_Address(s, D3DTADDRESS_BORDER);
81+
C.i_BorderColor(s, D3DCOLOR_ARGB(255, 255, 255, 255));
8282
}
8383

8484
C.r_End();
@@ -251,8 +251,8 @@ void CBlender_accum_direct_msaa::Compile(CBlender_Compile& C)
251251
jitter(C);
252252
{
253253
u32 s = C.r_dx10Sampler("smp_smap");
254-
C.i_dx10Address(s, D3DTADDRESS_BORDER);
255-
C.i_dx10BorderColor(s, D3DCOLOR_ARGB(255, 255, 255, 255));
254+
C.i_Address(s, D3DTADDRESS_BORDER);
255+
C.i_BorderColor(s, D3DCOLOR_ARGB(255, 255, 255, 255));
256256
}
257257

258258
C.r_End();

0 commit comments

Comments
 (0)