Skip to content

Commit 8cbae00

Browse files
committed
xrRenderPC_GL: Update blenders to R3 generation.
1 parent 37182d8 commit 8cbae00

26 files changed

+1843
-206
lines changed

src/Layers/xrRender/uber_deffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void uber_deffer (CBlender_Compile& C, bool hq, LPCSTR _vspec, LPCSTR _pspec, BO
9191
}
9292

9393
// Uber-construct
94-
#if defined(USE_DX10) || defined(USE_DX11)
94+
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
9595
# ifdef USE_DX11
9696
if (bump && hq && RImplementation.o.dx11_enable_tessellation && C.TessMethod!=0)
9797
{

src/Layers/xrRenderPC_GL/blender_bloom_build.cpp

Lines changed: 103 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,122 @@ void CBlender_bloom_build::Compile (CBlender_Compile& C)
1313
switch (C.iElement)
1414
{
1515
case 0: // transfer into bloom-target
16-
C.r_Pass ("stub_notransform_build", "bloom_build", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA);
17-
C.r_Sampler_clf ("s_image", r2_RT_generic1);
16+
C.r_Pass ("stub_notransform_build","bloom_build", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA);
17+
//C.r_Sampler_clf ("s_image", r2_RT_generic1);
18+
C.r_dx10Texture ("s_image", r2_RT_generic1);
19+
C.r_dx10Sampler ("smp_rtlinear");
1820
C.r_End ();
1921
break;
2022
case 1: // X-filter
21-
C.r_Pass ("stub_notransform_filter", "bloom_filter", FALSE, FALSE, FALSE);
22-
C.r_Sampler_clf ("s_bloom", r2_RT_bloom1);
23+
C.r_Pass ("stub_notransform_filter","bloom_filter", FALSE, FALSE, FALSE);
24+
//C.r_Sampler_clf ("s_bloom", r2_RT_bloom1);
25+
C.r_dx10Texture ("s_bloom", r2_RT_bloom1);
26+
C.r_dx10Sampler ("smp_rtlinear");
2327
C.r_End ();
2428
break;
2529
case 2: // Y-filter
26-
C.r_Pass ("stub_notransform_filter", "bloom_filter", FALSE, FALSE, FALSE);
27-
C.r_Sampler_clf ("s_bloom", r2_RT_bloom2);
30+
C.r_Pass ("stub_notransform_filter","bloom_filter", FALSE, FALSE, FALSE);
31+
//C.r_Sampler_clf ("s_bloom", r2_RT_bloom2);
32+
C.r_dx10Texture ("s_bloom", r2_RT_bloom2);
33+
C.r_dx10Sampler ("smp_rtlinear");
2834
C.r_End ();
2935
break;
3036
case 3: // FF-filter_P0
31-
C.r_Pass ("stub_notransform_build", "bloom_filter_f", FALSE, FALSE, FALSE);
32-
C.r_Sampler_clf ("s_bloom", r2_RT_bloom1);
37+
C.r_Pass ("stub_notransform_build","bloom_filter_f", FALSE, FALSE, FALSE);
38+
//C.r_Sampler_clf ("s_bloom", r2_RT_bloom1);
39+
C.r_dx10Texture ("s_bloom", r2_RT_bloom1);
40+
C.r_dx10Sampler ("smp_rtlinear");
3341
C.r_End ();
3442
break;
3543
case 4: // FF-filter_P1
36-
C.r_Pass ("stub_notransform_build", "bloom_filter_f", FALSE, FALSE, FALSE);
37-
C.r_Sampler_clf ("s_bloom", r2_RT_bloom2);
44+
C.r_Pass ("stub_notransform_build","bloom_filter_f", FALSE, FALSE, FALSE);
45+
//C.r_Sampler_clf ("s_bloom", r2_RT_bloom2);
46+
C.r_dx10Texture ("s_bloom", r2_RT_bloom2);
47+
C.r_dx10Sampler ("smp_rtlinear");
3848
C.r_End ();
3949
break;
4050
}
4151
}
52+
53+
CBlender_bloom_build_msaa::CBlender_bloom_build_msaa () { description.CLS = 0; }
54+
CBlender_bloom_build_msaa::~CBlender_bloom_build_msaa () { }
55+
56+
void CBlender_bloom_build_msaa::Compile (CBlender_Compile& C)
57+
{
58+
IBlender::Compile (C);
59+
60+
switch (C.iElement)
61+
{
62+
case 0: // transfer into bloom-target
63+
C.r_Pass ("stub_notransform_build","bloom_build", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA);
64+
//C.r_Sampler_clf ("s_image", r2_RT_generic1);
65+
C.r_dx10Texture ("s_image", r2_RT_generic1);
66+
C.r_dx10Sampler ("smp_rtlinear");
67+
C.r_End ();
68+
break;
69+
case 1: // X-filter
70+
C.r_Pass ("stub_notransform_filter","bloom_filter", FALSE, FALSE, FALSE);
71+
//C.r_Sampler_clf ("s_bloom", r2_RT_bloom1);
72+
C.r_dx10Texture ("s_bloom", r2_RT_bloom1);
73+
C.r_dx10Sampler ("smp_rtlinear");
74+
C.r_End ();
75+
break;
76+
case 2: // Y-filter
77+
C.r_Pass ("stub_notransform_filter","bloom_filter", FALSE, FALSE, FALSE);
78+
//C.r_Sampler_clf ("s_bloom", r2_RT_bloom2);
79+
C.r_dx10Texture ("s_bloom", r2_RT_bloom2);
80+
C.r_dx10Sampler ("smp_rtlinear");
81+
C.r_End ();
82+
break;
83+
case 3: // FF-filter_P0
84+
C.r_Pass ("stub_notransform_build","bloom_filter_f", FALSE, FALSE, FALSE);
85+
//C.r_Sampler_clf ("s_bloom", r2_RT_bloom1);
86+
C.r_dx10Texture ("s_bloom", r2_RT_bloom1);
87+
C.r_dx10Sampler ("smp_rtlinear");
88+
C.r_End ();
89+
break;
90+
case 4: // FF-filter_P1
91+
C.r_Pass ("stub_notransform_build","bloom_filter_f", FALSE, FALSE, FALSE);
92+
//C.r_Sampler_clf ("s_bloom", r2_RT_bloom2);
93+
C.r_dx10Texture ("s_bloom", r2_RT_bloom2);
94+
C.r_dx10Sampler ("smp_rtlinear");
95+
C.r_End ();
96+
break;
97+
}
98+
}
99+
100+
CBlender_postprocess_msaa::CBlender_postprocess_msaa () { description.CLS = 0; }
101+
CBlender_postprocess_msaa::~CBlender_postprocess_msaa () { }
102+
103+
void CBlender_postprocess_msaa::Compile (CBlender_Compile& C)
104+
{
105+
IBlender::Compile (C);
106+
107+
switch (C.iElement)
108+
{
109+
case 0: // transfer into bloom-target
110+
C.r_Pass ("stub_notransform_postpr","postprocess", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA);
111+
C.r_dx10Texture ("s_base0", r2_RT_generic);
112+
C.r_dx10Texture ("s_base1", r2_RT_generic);
113+
C.r_dx10Texture ("s_noise", "fx\\fx_noise2");
114+
115+
C.r_dx10Sampler ("smp_rtlinear");
116+
C.r_dx10Sampler ("smp_linear");
117+
C.r_End ();
118+
break;
119+
120+
case 4: // use color map
121+
C.r_Pass ("stub_notransform_postpr","postprocess_CM", FALSE, FALSE, FALSE, FALSE, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA);
122+
C.r_dx10Texture ("s_base0", r2_RT_generic);
123+
C.r_dx10Texture ("s_base1", r2_RT_generic);
124+
C.r_dx10Texture ("s_noise", "fx\\fx_noise2");
125+
C.r_dx10Texture ("s_grad0", "$user$cmap0");
126+
C.r_dx10Texture ("s_grad1", "$user$cmap1");
127+
128+
C.r_dx10Sampler ("smp_rtlinear");
129+
C.r_dx10Sampler ("smp_linear");
130+
C.r_End ();
131+
break;
132+
}
133+
}
134+

src/Layers/xrRenderPC_GL/blender_bloom_build.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,30 @@ class CBlender_bloom_build : public IBlender
1212
CBlender_bloom_build();
1313
virtual ~CBlender_bloom_build();
1414
};
15+
16+
class CBlender_bloom_build_msaa : public IBlender
17+
{
18+
public:
19+
virtual LPCSTR getComment() { return "INTERNAL: combine to bloom target msaa"; }
20+
virtual BOOL canBeDetailed() { return FALSE; }
21+
virtual BOOL canBeLMAPped() { return FALSE; }
22+
23+
virtual void Compile (CBlender_Compile& C);
24+
25+
CBlender_bloom_build_msaa();
26+
virtual ~CBlender_bloom_build_msaa();
27+
};
28+
29+
class CBlender_postprocess_msaa : public IBlender
30+
{
31+
public:
32+
virtual LPCSTR getComment() { return "INTERNAL: combine to bloom target msaa"; }
33+
virtual BOOL canBeDetailed() { return FALSE; }
34+
virtual BOOL canBeLMAPped() { return FALSE; }
35+
36+
virtual void Compile (CBlender_Compile& C);
37+
38+
CBlender_postprocess_msaa();
39+
virtual ~CBlender_postprocess_msaa();
40+
};
41+

0 commit comments

Comments
 (0)