本文整理汇总了C++中CBlender_Compile::r_Sampler_clw方法的典型用法代码示例。如果您正苦于以下问题:C++ CBlender_Compile::r_Sampler_clw方法的具体用法?C++ CBlender_Compile::r_Sampler_clw怎么用?C++ CBlender_Compile::r_Sampler_clw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBlender_Compile
的用法示例。
在下文中一共展示了CBlender_Compile::r_Sampler_clw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CBlender_accum_spot::Compile(CBlender_Compile& C)
{
IBlender::Compile (C);
BOOL b_HW_smap = RImplementation.o.HW_smap;
BOOL b_HW_PCF = RImplementation.o.HW_smap_PCF;
BOOL blend = RImplementation.o.fp16_blend;
D3DBLEND dest = blend?D3DBLEND_ONE:D3DBLEND_ZERO;
switch (C.iElement)
{
case SE_L_FILL: // masking
C.r_Pass ("null", "copy", false, FALSE, FALSE);
C.r_Sampler ("s_base", C.L_textures[0]);
C.r_End ();
break;
case SE_L_UNSHADOWED: // unshadowed
C.r_Pass ("accum_volume", "accum_spot_unshadowed", false, FALSE,FALSE,blend,D3DBLEND_ONE,dest);
C.r_Sampler_rtf ("s_position", r2_RT_P);
C.r_Sampler_rtf ("s_normal", r2_RT_N);
C.r_Sampler_clw ("s_material", r2_material);
C.r_Sampler ("s_lmap", C.L_textures[0],false,D3DTADDRESS_CLAMP);
C.r_Sampler_rtf ("s_accumulator", r2_RT_accum );
C.r_End ();
break;
case SE_L_NORMAL: // normal
C.r_Pass ("accum_volume", "accum_spot_normal", false, FALSE,FALSE,blend,D3DBLEND_ONE,dest);
C.r_Sampler_rtf ("s_position", r2_RT_P);
C.r_Sampler_rtf ("s_normal", r2_RT_N);
C.r_Sampler_clw ("s_material", r2_material);
C.r_Sampler ("s_lmap", C.L_textures[0],false,D3DTADDRESS_CLAMP);
if (b_HW_smap) {
if (b_HW_PCF) C.r_Sampler_clf ("s_smap",r2_RT_smap_depth );
else C.r_Sampler_rtf ("s_smap",r2_RT_smap_depth );
}
else C.r_Sampler_rtf ("s_smap",r2_RT_smap_surf );
jitter (C);
C.r_Sampler_rtf ("s_accumulator", r2_RT_accum );
C.r_End ();
break;
case SE_L_FULLSIZE: // normal-fullsize
C.r_Pass ("accum_volume", "accum_spot_fullsize", false, FALSE,FALSE,blend,D3DBLEND_ONE,dest);
C.r_Sampler_rtf ("s_position", r2_RT_P);
C.r_Sampler_rtf ("s_normal", r2_RT_N);
C.r_Sampler_clw ("s_material", r2_material);
C.r_Sampler ("s_lmap", C.L_textures[0],false,D3DTADDRESS_CLAMP);
if (b_HW_smap) {
if (b_HW_PCF) C.r_Sampler_clf ("s_smap",r2_RT_smap_depth );
else C.r_Sampler_rtf ("s_smap",r2_RT_smap_depth );
}
else C.r_Sampler_rtf ("s_smap",r2_RT_smap_surf );
jitter (C);
C.r_Sampler_rtf ("s_accumulator", r2_RT_accum );
C.r_End ();
break;
case SE_L_TRANSLUENT: // shadowed + transluency
C.r_Pass ("accum_volume", "accum_spot_fullsize", false, FALSE,FALSE,blend,D3DBLEND_ONE,dest);
C.r_Sampler_rtf ("s_position", r2_RT_P);
C.r_Sampler_rtf ("s_normal", r2_RT_N);
C.r_Sampler_clw ("s_material", r2_material);
C.r_Sampler_clf ("s_lmap", r2_RT_smap_surf); // diff here
if (b_HW_smap) {
if (b_HW_PCF) C.r_Sampler_clf ("s_smap",r2_RT_smap_depth );
else C.r_Sampler_rtf ("s_smap",r2_RT_smap_depth );
}
else C.r_Sampler_rtf ("s_smap",r2_RT_smap_surf );
C.r_Sampler_rtf ("s_accumulator", r2_RT_accum );
jitter (C);
C.r_End ();
break;
}
}
示例2:
void CBlender_combine::Compile(CBlender_Compile& C)
{
IBlender::Compile (C);
switch (C.iElement)
{
case 0: // combine
C.r_Pass ("combine_1", "combine_1", FALSE, FALSE, FALSE, TRUE, D3DBLEND_INVSRCALPHA, D3DBLEND_SRCALPHA); //. MRT-blend?
C.r_Sampler_rtf ("s_position", r2_RT_P );
C.r_Sampler_rtf ("s_normal", r2_RT_N );
C.r_Sampler_rtf ("s_diffuse", r2_RT_albedo );
C.r_Sampler_rtf ("s_accumulator", r2_RT_accum );
C.r_Sampler_rtf ("s_depth", r2_RT_depth );
C.r_Sampler_rtf ("s_tonemap", r2_RT_luminance_cur );
C.r_Sampler_clw ("s_material", r2_material );
C.r_Sampler_clw ("s_occ", r2_RT_ssao_temp );
C.r_Sampler_rtf ("s_half_depth", r2_RT_half_depth);
C.r_Sampler_clf ("env_s0", r2_T_envs0 );
C.r_Sampler_clf ("env_s1", r2_T_envs1 );
C.r_Sampler_clf ("sky_s0", r2_T_sky0 );
C.r_Sampler_clf ("sky_s1", r2_T_sky1 );
jitter(C);
C.r_End ();
break;
case 1: // aa-edge-detection + AA :)
C.r_Pass ("null", "combine_2_AA", FALSE, FALSE, FALSE);
C.r_Sampler_rtf ("s_position", r2_RT_P);
C.r_Sampler_rtf ("s_normal", r2_RT_N);
C.r_Sampler_clf ("s_image", r2_RT_generic0);
C.r_Sampler_clf ("s_bloom", r2_RT_bloom1);
C.r_Sampler_clf ("s_distort", r2_RT_generic1);
C.r_End ();
break;
case 2: // non-AA
C.r_Pass ("null", "combine_2_NAA", FALSE, FALSE, FALSE);
C.r_Sampler_rtf ("s_position", r2_RT_P);
C.r_Sampler_rtf ("s_normal", r2_RT_N);
C.r_Sampler_clf ("s_image", r2_RT_generic0);
C.r_Sampler_clf ("s_bloom", r2_RT_bloom1);
C.r_Sampler_clf ("s_distort", r2_RT_generic1);
C.r_End ();
break;
case 3: // aa-edge-detection + AA :) + DISTORTION
C.r_Pass ("null", "combine_2_AA_D", FALSE, FALSE, FALSE);
C.r_Sampler_rtf ("s_position", r2_RT_P);
C.r_Sampler_rtf ("s_normal", r2_RT_N);
C.r_Sampler_clf ("s_image", r2_RT_generic0);
C.r_Sampler_clf ("s_bloom", r2_RT_bloom1);
C.r_Sampler_clf ("s_distort", r2_RT_generic1);
C.r_End ();
break;
case 4: // non-AA + DISTORTION
C.r_Pass ("null", "combine_2_NAA_D", FALSE, FALSE, FALSE);
C.r_Sampler_rtf ("s_position", r2_RT_P);
C.r_Sampler_rtf ("s_normal", r2_RT_N);
C.r_Sampler_clf ("s_image", r2_RT_generic0);
C.r_Sampler_clf ("s_bloom", r2_RT_bloom1);
C.r_Sampler_clf ("s_distort", r2_RT_generic1);
C.r_End ();
break;
case 5: // post-processing
break;
}
}