@@ -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-
8655void 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-
10061u32 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;
0 commit comments