当前位置: 首页>>代码示例>>C++>>正文


C++ CBlender_Compile::r_End方法代码示例

本文整理汇总了C++中CBlender_Compile::r_End方法的典型用法代码示例。如果您正苦于以下问题:C++ CBlender_Compile::r_End方法的具体用法?C++ CBlender_Compile::r_End怎么用?C++ CBlender_Compile::r_End使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBlender_Compile的用法示例。


在下文中一共展示了CBlender_Compile::r_End方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

//	TODO: DX10: if nesessary for NV stencil optimisation implement pass 1
void	CBlender_light_occq::Compile(CBlender_Compile& C)
{
	IBlender::Compile	(C);

	switch (C.iElement) 
	{
	case 0:			// occlusion testing
		C.r_Pass	("dumb", "dumb",false,TRUE,FALSE,FALSE);
		C.r_End		();
		//	Color write as well as culling and stencil are set up manually in code.
		break;
	case 1:			// NV40 optimization :)
		C.r_Pass	("stub_notransform_t", "dumb",false,FALSE,FALSE,FALSE);
		C.r_ColorWriteEnable	(false,false,false,false);
		C.r_CullMode			(D3DCULL_NONE);
		C.r_Stencil				(TRUE,D3DCMP_LESSEQUAL,0xff,0x00);	// keep/keep/keep
		C.r_End		();
		break;
	case 2:			// Stencil clear in case we've ran out of markers.
		C.r_Pass	("stub_notransform_t", "dumb",false,FALSE,FALSE,FALSE);
		C.r_ColorWriteEnable	(false,false,false,false);
		C.r_CullMode			(D3DCULL_NONE);
		if( RImplementation.o.dx10_msaa )
			C.r_Stencil				(TRUE,D3DCMP_ALWAYS,0x00,0x7E, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO);
		else
		{
			//	Clear all bits except the last one
			C.r_Stencil				(TRUE,D3DCMP_ALWAYS,0x00,0xFE, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO);
		}
		//C.r_Stencil				(TRUE,D3DCMP_ALWAYS,0x00,0xFF, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO, D3DSTENCILOP_ZERO);	// keep/keep/keep
		C.r_End		();
		break;
	}
}
开发者ID:2asoft,项目名称:xray-16,代码行数:35,代码来源:blender_light_occq.cpp

示例2: Compile

void CBlender_Model_EbB::Compile( CBlender_Compile& C )
{
	IBlender::Compile(C);

	if (oBlend.value)	
	{
		// forward
		LPCSTR	vsname			= 0;
		LPCSTR	psname			= 0;
		switch(C.iElement) 
		{
		case 0:
		case 1:
			vsname = psname =	"model_env_lq"; 
			C.r_Pass			(vsname,psname,TRUE,TRUE,FALSE,TRUE,D3DBLEND_SRCALPHA,	D3DBLEND_INVSRCALPHA,	TRUE,0);
			//C.r_Sampler			("s_base",	C.L_textures[0]);
			//C.r_Sampler			("s_env",	oT2_Name,false,D3DTADDRESS_CLAMP);
			C.r_dx10Texture		("s_base",	C.L_textures[0]);
			C.r_dx10Texture		("s_env",	oT2_Name);

			C.r_dx10Sampler			("smp_base");
			C.r_dx10Sampler			("smp_rtlinear");
			C.r_End				();
			break;
		}
	} 
	else 
	{
		// deferred
		switch(C.iElement) 
		{
		case SE_R2_NORMAL_HQ: 	// deffer
			uber_deffer		(C,true,	"model","base",false,0,true);
			C.r_Stencil		( TRUE,D3DCMP_ALWAYS,0xff,0x7f,D3DSTENCILOP_KEEP,D3DSTENCILOP_REPLACE,D3DSTENCILOP_KEEP);
			C.r_StencilRef	(0x01);
			C.r_End			();
			break;
		case SE_R2_NORMAL_LQ: 	// deffer
			uber_deffer		(C,false,	"model","base",false,0,true);
			C.r_Stencil		( TRUE,D3DCMP_ALWAYS,0xff,0x7f,D3DSTENCILOP_KEEP,D3DSTENCILOP_REPLACE,D3DSTENCILOP_KEEP);
			C.r_StencilRef	(0x01);
			C.r_End			();
			break;
		case SE_R2_SHADOW:		// smap
			//if (RImplementation.o.HW_smap)	C.r_Pass	("shadow_direct_model","dumb",	FALSE,TRUE,TRUE,FALSE);
			//else							C.r_Pass	("shadow_direct_model","shadow_direct_base",FALSE);
			C.r_Pass	("shadow_direct_model","dumb",	FALSE,TRUE,TRUE,FALSE);
			//C.r_Sampler		("s_base",C.L_textures[0]);
			C.r_dx10Texture		("s_base",C.L_textures[0]);
			C.r_dx10Sampler		("smp_base");
			C.r_dx10Sampler		("smp_linear");
			C.r_ColorWriteEnable(false, false, false, false);
			C.r_End			();
			break;
		}
	}
}
开发者ID:2asoft,项目名称:xray,代码行数:57,代码来源:Blender_Model_EbB.cpp

示例3:

void	CBlender_Detail_Still::Compile	(CBlender_Compile& C)
{
	IBlender::Compile	(C);

	bool bUseATOC = (RImplementation.o.dx10_msaa_alphatest==CRender::MSAA_ATEST_DX10_0_ATOC);

	switch(C.iElement) 
	{
	case SE_R2_NORMAL_HQ: 		// deffer wave
		if (bUseATOC)
		{
			uber_deffer		(C,false,"detail_w","base_atoc",true,0,true);
			C.r_Stencil		( TRUE,D3DCMP_ALWAYS,0xff,0x7f,D3DSTENCILOP_KEEP,D3DSTENCILOP_REPLACE,D3DSTENCILOP_KEEP);
			C.r_StencilRef	(0x01);
			C.r_ColorWriteEnable(false, false, false, false);
			C.r_CullMode	(D3DCULL_NONE);
			//	Alpha to coverage.
			C.RS.SetRS	(XRDX10RS_ALPHATOCOVERAGE,	TRUE);
			C.r_End			();
		}
		

		uber_deffer		(C,false,"detail_w","base",true, 0, true);
		C.r_Stencil		( TRUE,D3DCMP_ALWAYS,0xff,0x7f,D3DSTENCILOP_KEEP,D3DSTENCILOP_REPLACE,D3DSTENCILOP_KEEP);
		C.r_StencilRef	(0x01);
		C.r_CullMode	(D3DCULL_NONE);
		if (bUseATOC)
			C.RS.SetRS	( D3DRS_ZFUNC, D3DCMP_EQUAL);
		C.r_End			();
		break;
	case SE_R2_NORMAL_LQ: 		// deffer still
		if (bUseATOC)
		{
			uber_deffer		(C,false,"detail_s","base_atoc",true,0,true);
			C.r_Stencil		( TRUE,D3DCMP_ALWAYS,0xff,0x7f,D3DSTENCILOP_KEEP,D3DSTENCILOP_REPLACE,D3DSTENCILOP_KEEP);
			C.r_StencilRef	(0x01);
			C.r_CullMode	(D3DCULL_NONE);
			C.r_ColorWriteEnable(false, false, false, false);
			//	Alpha to coverage.
			C.RS.SetRS	(XRDX10RS_ALPHATOCOVERAGE,	TRUE);
			C.r_End			();
		}

		uber_deffer		(C,false,"detail_s","base",true, 0, true);
		C.r_Stencil		( TRUE,D3DCMP_ALWAYS,0xff,0x7f,D3DSTENCILOP_KEEP,D3DSTENCILOP_REPLACE,D3DSTENCILOP_KEEP);
		C.r_StencilRef	(0x01);
		C.r_CullMode	(D3DCULL_NONE);
		//	Need this for ATOC
		if (bUseATOC)
			C.RS.SetRS	( D3DRS_ZFUNC, D3DCMP_EQUAL);
		C.r_End			();
		break;
	}
}
开发者ID:2asoft,项目名称:xray-16,代码行数:54,代码来源:Blender_detail_still.cpp

示例4:

void	CBlender_deffer_model::Compile(CBlender_Compile& C)
{
	IBlender::Compile		(C);

	BOOL	bForward		= FALSE;
	if (oBlend.value && oAREF.value<16)	bForward	= TRUE;
	if (oStrictSorting.value)			bForward	= TRUE;

	if (bForward)			{
		// forward rendering
		LPCSTR	vsname,psname;
		switch(C.iElement) 
		{
		case 0: 	//
		case 1: 	//
			vsname = psname =	"model_def_lq"; 
			C.r_Pass			(vsname,psname,TRUE,TRUE,FALSE,TRUE,D3DBLEND_SRCALPHA,	D3DBLEND_INVSRCALPHA,	TRUE,oAREF.value);
			C.r_Sampler			("s_base",	C.L_textures[0]);
			C.r_End				();
			break;
		default:
			break;
		}
	} else {
		BOOL	bAref		= oBlend.value;
		// deferred rendering
		// codepath is the same, only the shaders differ
		switch(C.iElement) 
		{
		case SE_R2_NORMAL_HQ: 			// deffer
			uber_deffer		(C,true,	"model",	"base",bAref);
			break;
		case SE_R2_NORMAL_LQ: 			// deffer
			uber_deffer		(C,false,	"model",	"base",bAref);
			break;
		case SE_R2_SHADOW:				// smap
			if (bAref)		{
				if (RImplementation.o.HW_smap)	C.r_Pass	("shadow_direct_model_aref","shadow_direct_base_aref",	FALSE,TRUE,TRUE,FALSE,D3DBLEND_ZERO,D3DBLEND_ONE,TRUE,220);
				else							C.r_Pass	("shadow_direct_model_aref","shadow_direct_base_aref",	FALSE);
				C.r_Sampler		("s_base",		C.L_textures[0]);
				C.r_End			();
				break;
			} else {
				if (RImplementation.o.HW_smap)	C.r_Pass	("shadow_direct_model","dumb",					FALSE,TRUE,TRUE,FALSE);
				else							C.r_Pass	("shadow_direct_model","shadow_direct_base",	FALSE);
				C.r_Sampler		("s_base",		C.L_textures[0]);
				C.r_End			();
				break;
			}
		}
	}
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:52,代码来源:blender_deffer_model.cpp

示例5:

void	CBlender_deffer_aref::Compile(CBlender_Compile& C)
{
	IBlender::Compile		(C);

	// oBlend.value	= FALSE	;

	if (oBlend.value)	{
		switch(C.iElement) 
		{
		case SE_R2_NORMAL_HQ:
		case SE_R2_NORMAL_LQ:
			if (lmapped)	{
				C.r_Pass			("lmapE","lmapE",TRUE,TRUE,FALSE,TRUE,D3DBLEND_SRCALPHA,	D3DBLEND_INVSRCALPHA,	TRUE, oAREF.value);
				C.r_Sampler			("s_base",	C.L_textures[0]	);
				C.r_Sampler			("s_lmap",	C.L_textures[1]	);
				C.r_Sampler_clf		("s_hemi",	*C.L_textures[2]);
				C.r_Sampler			("s_env",	r2_T_envs0,		false,D3DTADDRESS_CLAMP);
				C.r_End				();
			} else {
				C.r_Pass			("vert", "vert", TRUE,TRUE,FALSE,TRUE,D3DBLEND_SRCALPHA,	D3DBLEND_INVSRCALPHA,	TRUE, oAREF.value);
				C.r_Sampler			("s_base",	C.L_textures[0]	);
				C.r_End				();
			}
			break;
		default:
			break;
		}
	} else {
		C.SetParams				(1,false);	//.

		// codepath is the same, only the shaders differ
		// ***only pixel shaders differ***
		switch(C.iElement) 
		{
		case SE_R2_NORMAL_HQ: 	// deffer
			uber_deffer		(C,true,"base","base",true);
			break;
		case SE_R2_NORMAL_LQ: 	// deffer
			uber_deffer		(C,false,"base","base",true);
			break;
		case SE_R2_SHADOW:		// smap
			if (RImplementation.o.HW_smap)	C.r_Pass	("shadow_direct_base_aref","shadow_direct_base_aref",FALSE,TRUE,TRUE,FALSE,D3DBLEND_ZERO,D3DBLEND_ONE,TRUE,220);
			else							C.r_Pass	("shadow_direct_base_aref","shadow_direct_base_aref",FALSE);
			C.r_Sampler		("s_base",C.L_textures[0]);
			C.r_End			();
			break;
		}
	}
}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:49,代码来源:blender_deffer_aref.cpp

示例6:

void CBlender_Editor_Wire::Compile	(CBlender_Compile& C)
{
	IBlender::Compile		(C);
#if !defined(USE_DX10) && !defined(USE_DX11)
	if (C.bEditor)	
	{
		C.PassBegin		();
		{
			C.PassSET_ZB		(TRUE,TRUE);
			C.PassSET_Blend		(FALSE,D3DBLEND_ONE,D3DBLEND_ZERO,	FALSE,0);
			C.PassSET_LightFog	(FALSE,FALSE);

			// Stage0 - Base texture
			C.StageBegin		();
			C.StageSET_Color	(D3DTA_DIFFUSE,	  D3DTOP_MODULATE,		D3DTA_TFACTOR);
			C.StageSET_Alpha	(D3DTA_DIFFUSE,	  D3DTOP_MODULATE,		D3DTA_TFACTOR);
			C.Stage_Texture		("$null");
			C.Stage_Matrix		("$null",	0);
			C.Stage_Constant	("$null");
			//		C.Stage_Constant	("$base0",	"$user$wire");
			C.StageEnd			();
		}
		C.PassEnd			();
	} 
	else 
#endif	//	USE_DX10
	{
		C.r_Pass	("editor","simple_color",FALSE,TRUE,TRUE);
		C.r_End		();
	}
}
开发者ID:2asoft,项目名称:xray-16,代码行数:31,代码来源:Blender_Editor_Wire.cpp

示例7: atoi

//	TODO: DX10:	implement CBlender_accum_direct::Compile
void	CBlender_accum_direct_volumetric_msaa::Compile(CBlender_Compile& C)
{
	IBlender::Compile		(C);

   if( Name )
      ::Render->m_MSAASample = atoi( Definition );
   else
      ::Render->m_MSAASample = -1;

	//	BOOL	b_HW_smap		= RImplementation.o.HW_smap;
	//	BOOL	b_HW_PCF		= RImplementation.o.HW_smap_PCF;
	BOOL		blend		= FALSE;	//RImplementation.o.fp16_blend;
	D3DBLEND	dest		= blend?D3DBLEND_ONE:D3DBLEND_ZERO;
	if (RImplementation.o.sunfilter)	{ blend = FALSE; dest = D3DBLEND_ZERO; }

	switch (C.iElement)
		{
		case 0:		// near pass - enable Z-test to perform depth-clipping
			C.r_Pass			("stub_notransform_2uv","accum_volumetric_sun_msaa",	false,	TRUE,	FALSE,blend,D3DBLEND_ONE,dest);
				C.r_dx10Texture		("s_lmap",			C.L_textures[0]);
				C.r_dx10Texture	("s_smap",			r2_RT_smap_depth);
				 C.r_dx10Texture	("s_noise", "fx\\fx_noise");

         C.r_dx10Sampler		("smp_rtlinear");
				 C.r_dx10Sampler		("smp_linear");
				 C.r_dx10Sampler		("smp_smap");
         C.r_End				();
			break;
		}
   ::Render->m_MSAASample = -1;
}
开发者ID:2asoft,项目名称:xray,代码行数:32,代码来源:blender_light_direct.cpp

示例8:

void	CBlender_Editor_Selection::Compile	(CBlender_Compile& C)
{
	IBlender::Compile		(C);	
	if (C.bEditor)	{
		C.PassBegin		();
		{
			C.PassSET_ZB		(TRUE,FALSE);
			C.PassSET_Blend		(TRUE,D3DBLEND_SRCALPHA,D3DBLEND_INVSRCALPHA,	FALSE,0);
			C.PassSET_LightFog	(FALSE,FALSE);

			// Stage0 - Base texture
			C.StageBegin		();
			C.StageSET_Address	(D3DTADDRESS_CLAMP);
			C.StageSET_Color	(D3DTA_TFACTOR,	  D3DTOP_MODULATE,		D3DTA_DIFFUSE);
			C.StageSET_Alpha	(D3DTA_TFACTOR,	  D3DTOP_MODULATE,		D3DTA_DIFFUSE);
			C.Stage_Texture		(oT_Name	);
			C.Stage_Matrix		(oT_xform,	0);
			C.Stage_Constant	("$null"	);
			C.StageEnd			();
		}
		C.PassEnd			();
	} else {
		C.r_Pass	("editor","simple_color",FALSE,TRUE,FALSE,TRUE,D3DBLEND_SRCALPHA,D3DBLEND_INVSRCALPHA);
		C.r_End		();
	}
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:26,代码来源:Blender_Editor_Selection.cpp

示例9:

void	CBlender_Particle::Compile	(CBlender_Compile& C)
{
	IBlender::Compile		(C);
	switch	(C.iElement) 
	{
	case SE_R2_NORMAL_HQ: 	// deffer
	case SE_R2_NORMAL_LQ: 	// deffer
		switch (oBlend.IDselected)
		{
		case 0:	C.r_Pass	("deffer_particle",	"deffer_particle",	FALSE,	TRUE,TRUE,	FALSE,	D3DBLEND_ONE,		D3DBLEND_ZERO,			FALSE,200);	break;	// SET
		case 1: C.r_Pass	("particle",		"particle",			FALSE,	TRUE,FALSE,	TRUE,	D3DBLEND_SRCALPHA,	D3DBLEND_INVSRCALPHA,	TRUE,0);	break;	// BLEND
		case 2:	C.r_Pass	("particle",		"particle",			FALSE,	TRUE,FALSE,	TRUE,	D3DBLEND_ONE,		D3DBLEND_ONE,			TRUE,0);	break;	// ADD
		case 3:	C.r_Pass	("particle",		"particle",			FALSE,	TRUE,FALSE,	TRUE,	D3DBLEND_DESTCOLOR,	D3DBLEND_ZERO,			TRUE,0);	break;	// MUL
		case 4:	C.r_Pass	("particle",		"particle",			FALSE,	TRUE,FALSE,	TRUE,	D3DBLEND_DESTCOLOR,	D3DBLEND_SRCCOLOR,		TRUE,0);	break;	// MUL_2X
		case 5:	C.r_Pass	("particle",		"particle",			FALSE,	TRUE,FALSE,	TRUE,	D3DBLEND_SRCALPHA,	D3DBLEND_ONE,			TRUE,0);	break;	// ALPHA-ADD
		};
		C.r_Sampler			("s_base",	C.L_textures[0],false,oClamp.value?D3DTADDRESS_CLAMP:D3DTADDRESS_WRAP);
		C.r_Sampler_rtf		("s_position",	"$user$position"); // Nummer: for soft particles
		C.r_End				();
		break;
	case SE_R2_SHADOW:		// smap
		// HARD or SOFT: shadow-map
		switch (oBlend.IDselected)
		{
		case 0:	C.r_Pass	("particle",		"particle",			FALSE,	TRUE,TRUE,	FALSE,	D3DBLEND_ONE,		D3DBLEND_ZERO,	TRUE,200);	break;	// SET
		case 1: C.r_Pass	("particle-clip",	"particle_s-blend",	FALSE,	TRUE,FALSE,	TRUE,	D3DBLEND_DESTCOLOR,	D3DBLEND_ZERO,	TRUE,0);	break;	// BLEND
		case 2:	C.r_Pass	("particle-clip",	"particle_s-add",	FALSE,	TRUE,FALSE,	TRUE,	D3DBLEND_DESTCOLOR,	D3DBLEND_ZERO,	TRUE,0);	break;	// ADD
		case 3:	C.r_Pass	("particle-clip",	"particle_s-mul",	FALSE,	TRUE,FALSE,	TRUE,	D3DBLEND_DESTCOLOR,	D3DBLEND_ZERO,	TRUE,0);	break;	// MUL
		case 4:	C.r_Pass	("particle-clip",	"particle_s-mul",	FALSE,	TRUE,FALSE,	TRUE,	D3DBLEND_DESTCOLOR,	D3DBLEND_ZERO,	TRUE,0);	break;	// MUL_2X
		case 5:	C.r_Pass	("particle-clip",	"particle_s-aadd",	FALSE,	TRUE,FALSE,	TRUE,	D3DBLEND_DESTCOLOR,	D3DBLEND_ZERO,	TRUE,0);	break;	// ALPHA-ADD
		};
		C.r_Sampler			("s_base",	C.L_textures[0],false,oClamp.value?D3DTADDRESS_CLAMP:D3DTADDRESS_WRAP);
		C.r_Sampler_rtf		("s_position",	"$user$position"); // Nummer: for soft particles
		C.r_End				();
		break;
	case 4: 	// deffer-EMAP
		break;
	};
}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:39,代码来源:Blender_Particle.cpp

示例10:

void	CBlender_Model_EbB::Compile(CBlender_Compile& C)
{
	IBlender::Compile		(C);

	if (oBlend.value)	{
		// forward
		LPCSTR	vsname			= 0;
		LPCSTR	psname			= 0;
		switch(C.iElement) 
		{
		case 0:
		case 1:
			vsname = psname =	"model_env_lq"; 
			C.r_Pass			(vsname,psname,TRUE,TRUE,FALSE,TRUE,D3DBLEND_SRCALPHA,	D3DBLEND_INVSRCALPHA,	TRUE,0);
			C.r_Sampler			("s_base",	C.L_textures[0]);
			C.r_Sampler			("s_env",	oT2_Name,false,D3DTADDRESS_CLAMP);
			C.r_End				();
			break;
		}
	} else {
		// deferred
		switch(C.iElement) 
		{
		case SE_R2_NORMAL_HQ: 	// deffer
			uber_deffer		(C,true,	"model","base",false);
			break;
		case SE_R2_NORMAL_LQ: 	// deffer
			uber_deffer		(C,false,	"model","base",false);
			break;
		case SE_R2_SHADOW:		// smap
			if (RImplementation.o.HW_smap)	C.r_Pass	("shadow_direct_model","dumb",					FALSE,TRUE,TRUE,FALSE);
			else							C.r_Pass	("shadow_direct_model","shadow_direct_base",	FALSE);
			C.r_Sampler		("s_base",		C.L_textures[0]);
			C.r_End			();
			break;
		}
	}
}
开发者ID:2asoft,项目名称:xray,代码行数:38,代码来源:Blender_Model_EbB.cpp

示例11:

void	CBlender_luminance::Compile(CBlender_Compile& C)
{
	IBlender::Compile	(C);

	switch (C.iElement) 
	{
	case 0:				// 256x256	=> 64x64
		C.r_Pass		("null", "bloom_luminance_1",false,FALSE,FALSE,	FALSE);
		C.r_Sampler_clf	("s_image",	r2_RT_bloom1);
		C.r_End			();
		break;
	case 1:				// 64x64	=> 8x8
		C.r_Pass		("null", "bloom_luminance_2",false,FALSE,FALSE,	FALSE);
		C.r_Sampler_clf	("s_image",	r2_RT_luminance_t64);
		C.r_End			();
		break;
	case 2:				// 8x8		=> 1x1, blending with old result
		C.r_Pass		("null", "bloom_luminance_3",false,FALSE,FALSE, FALSE);
		C.r_Sampler_clf	("s_image",		r2_RT_luminance_t8	);
		C.r_Sampler_clf	("s_tonemap",	r2_RT_luminance_src	);
		C.r_End			();
		break;
	}
}
开发者ID:2asoft,项目名称:xray-16,代码行数:24,代码来源:blender_luminance.cpp

示例12:

void	CBlender_deffer_flat::Compile(CBlender_Compile& C)
{
	IBlender::Compile		(C);

	// codepath is the same, only the shaders differ
	switch(C.iElement) 
	{
	case SE_R2_NORMAL_HQ: 		// deffer
		uber_deffer		(C,true,"base","base",false);
		break;
	case SE_R2_NORMAL_LQ: 		// deffer
		uber_deffer		(C,false,"base","base",false);
		break;
	case SE_R2_SHADOW:			// smap-direct
		if (RImplementation.o.HW_smap)	C.r_Pass	("shadow_direct_base","dumb",	FALSE,TRUE,TRUE,FALSE);
		else							C.r_Pass	("shadow_direct_base","shadow_direct_base",FALSE);
		C.r_Sampler		("s_base",C.L_textures[0]);
		C.r_End			();
		break;
	}
}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:21,代码来源:blender_deffer_flat.cpp

示例13: accumulator

void	CBlender_accum_direct_mask::Compile(CBlender_Compile& C)
{
	IBlender::Compile		(C);

	switch (C.iElement) 
	{
	case SE_MASK_SPOT:		// spot or omni-part
		C.r_Pass			("accum_mask",		"dumb",				false,	TRUE,FALSE);
		C.r_Sampler_rtf		("s_position",		r2_RT_P);
		C.r_End				();
		break;
	case SE_MASK_POINT:		// point
		C.r_Pass			("accum_mask",		"dumb",				false,	TRUE,FALSE);
		C.r_Sampler_rtf		("s_position",		r2_RT_P);
		C.r_End				();
		break;
	case SE_MASK_DIRECT:	// stencil mask for directional light
		C.r_Pass			("null",			"accum_sun_mask",	false,	FALSE,FALSE,TRUE,D3DBLEND_ZERO,D3DBLEND_ONE,TRUE,1);
		C.r_Sampler_rtf		("s_normal",		r2_RT_N);
		C.r_End				();
		break;
	case SE_MASK_ACCUM_VOL:	// copy accumulator (temp -> real), volumetric (usually after blend)
		C.r_Pass			("accum_volume",	"copy_p",			false,	FALSE,FALSE);
		C.r_Sampler_rtf		("s_base",			r2_RT_accum_temp	);
		C.r_End				();
		break;
	case SE_MASK_ACCUM_2D:	// copy accumulator (temp -> real), 2D (usually after sun-blend)
		C.r_Pass			("null",			"copy",				false,	FALSE,FALSE);
		C.r_Sampler_rtf		("s_base",			r2_RT_accum_temp	);
		C.r_End				();
		break;
	case SE_MASK_ALBEDO:	// copy accumulator, 2D (for accum->color, albedo_wo)
		C.r_Pass			("null",			"copy",				false,	FALSE,FALSE);
		C.r_Sampler_rtf		("s_base",			r2_RT_accum			);
		C.r_End				();
		break;
	}
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:38,代码来源:blender_light_mask.cpp

示例14:

void	CBlender_Model::Compile	(CBlender_Compile& C)
{
	IBlender::Compile		(C);
	if (C.bEditor)
	{
		C.PassBegin		();
		{
			C.PassSET_ZB		(TRUE,oBlend.value&&(oAREF.value<200)?FALSE:TRUE);
			if (oBlend.value)	C.PassSET_Blend_BLEND	(TRUE,oAREF.value);
			else				C.PassSET_Blend_SET		();
			C.PassSET_LightFog	(TRUE,TRUE);
			C.StageBegin		();
			C.StageSET_Color	(D3DTA_TEXTURE,	  D3DTOP_MODULATE,		D3DTA_DIFFUSE);
			C.StageSET_Alpha	(D3DTA_TEXTURE,	  D3DTOP_SELECTARG1,	D3DTA_DIFFUSE);
			C.StageSET_TMC		(oT_Name,	"$null",	"$null",	0		);
			C.StageEnd			();
		}
		C.PassEnd			();
	} else {
		LPCSTR	vsname		= 0;
		LPCSTR	psname		= 0;
		switch (C.iElement)
		{
		case SE_R1_NORMAL_HQ:	
			vsname = psname =	"model_def_hq";
			if (oBlend.value)	C.r_Pass	(vsname,psname,TRUE,TRUE,TRUE,TRUE,D3DBLEND_SRCALPHA,	D3DBLEND_INVSRCALPHA,	TRUE,oAREF.value);
			else				C.r_Pass	(vsname,psname,TRUE);
			C.r_Sampler			("s_base",	C.L_textures[0]);
			C.r_Sampler_clf		("s_lmap",	"$user$projector",true);
			C.r_End				();
			break;
		case SE_R1_NORMAL_LQ:
			vsname = psname =	"model_def_lq"; 
			if (oBlend.value)	C.r_Pass	(vsname,psname,TRUE,TRUE,TRUE,TRUE,D3DBLEND_SRCALPHA,	D3DBLEND_INVSRCALPHA,	TRUE,oAREF.value);
			else				C.r_Pass	(vsname,psname,TRUE);
			C.r_Sampler			("s_base",	C.L_textures[0]);
			C.r_End				();
			break;
		case SE_R1_LPOINT:
			vsname				= "model_def_point";
			psname				= "add_point";
			if (oBlend.value)	C.r_Pass	(vsname,psname,FALSE,TRUE,FALSE,TRUE,D3DBLEND_ONE,	D3DBLEND_ONE,TRUE,oAREF.value);
			else				C.r_Pass	(vsname,psname,FALSE,TRUE,FALSE,TRUE,D3DBLEND_ONE,	D3DBLEND_ONE,TRUE);
			C.r_Sampler			("s_base",	C.L_textures[0]);
			C.r_Sampler_clf		("s_lmap",	TEX_POINT_ATT);
			C.r_Sampler_clf		("s_att",	TEX_POINT_ATT);
			C.r_End				();
			break;
		case SE_R1_LSPOT:
			vsname				= "model_def_spot";
			psname				= "add_spot";
			if (oBlend.value)	C.r_Pass	(vsname,psname,FALSE,TRUE,FALSE,TRUE,D3DBLEND_ONE,	D3DBLEND_ONE,TRUE,oAREF.value);
			else				C.r_Pass	(vsname,psname,FALSE,TRUE,FALSE,TRUE,D3DBLEND_ONE,	D3DBLEND_ONE,TRUE);
			C.r_Sampler			("s_base",	C.L_textures[0]);
			C.r_Sampler_clf		("s_lmap",	"internal\\internal_light_att",		true);
			C.r_Sampler_clf		("s_att",	TEX_SPOT_ATT);
			C.r_End				();
			break;
		case SE_R1_LMODELS:
			vsname				= "model_def_shadow";
			psname				= "model_shadow";
			C.r_Pass			(vsname,psname,FALSE,FALSE,FALSE,TRUE,D3DBLEND_ZERO,D3DBLEND_SRCCOLOR,FALSE,0);
			C.r_End				();
			break;
		}
	}
}
开发者ID:2asoft,项目名称:xray-16,代码行数:67,代码来源:Blender_Model.cpp

示例15: atoi

//	TODO: DX10:	implement CBlender_accum_direct::Compile
void	CBlender_accum_direct_msaa::Compile(CBlender_Compile& C)
{
	IBlender::Compile		(C);

   if( Name )
      ::Render->m_MSAASample = atoi( Definition );
   else
      ::Render->m_MSAASample = -1;

//	BOOL	b_HW_smap		= RImplementation.o.HW_smap;
//	BOOL	b_HW_PCF		= RImplementation.o.HW_smap_PCF;
	BOOL		blend		= FALSE;	//RImplementation.o.fp16_blend;
	D3DBLEND	dest		= blend?D3DBLEND_ONE:D3DBLEND_ZERO;
	if (RImplementation.o.sunfilter)	{ blend = FALSE; dest = D3DBLEND_ZERO; }

	switch (C.iElement)
	{
	case SE_SUN_NEAR:		// near pass - enable Z-test to perform depth-clipping
	case SE_SUN_MIDDLE:		// middle pass - enable Z-test to perform depth-clipping
		//	FVF::TL2uv
		//C.r_Pass			("null",			"accum_sun_near",	false,	TRUE,	FALSE,blend,D3DBLEND_ONE,dest);
		C.r_Pass			("accum_sun","accum_sun_near_msaa_nominmax",	false,	TRUE,	FALSE,blend,D3DBLEND_ONE,dest);
		C.r_CullMode		(D3DCULL_NONE);
		C.PassSET_ZB		(TRUE,FALSE,TRUE	);	// force inverted Z-Buffer
		//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_rtf		("s_accumulator",	r2_RT_accum		);
		//C.r_Sampler			("s_lmap",			r2_sunmask		);
		//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_dx10Texture		("s_position",		r2_RT_P);
		C.r_dx10Texture		("s_normal",		r2_RT_N);
		C.r_dx10Texture		("s_material",		r2_material);
		C.r_dx10Texture		("s_accumulator",	r2_RT_accum);
		C.r_dx10Texture		("s_lmap",			r2_sunmask);
		C.r_dx10Texture		("s_smap",			r2_RT_smap_depth);

		C.r_dx10Sampler		("smp_nofilter");
		C.r_dx10Sampler		("smp_material");
		C.r_dx10Sampler		("smp_linear");
		jitter				(C);
		C.r_dx10Sampler		("smp_smap");

		C.r_End				();
		break;
	case SE_SUN_FAR:		// far pass, only stencil clipping performed
		//	FVF::TL2uv
		//C.r_Pass			("null",			"accum_sun_far",	false,	TRUE,	FALSE,blend,D3DBLEND_ONE,dest);
		C.r_Pass			("accum_sun","accum_sun_far_msaa",	false,	TRUE,	FALSE,blend,D3DBLEND_ONE,dest);
		C.r_CullMode		(D3DCULL_NONE);
		//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_rtf		("s_accumulator",	r2_RT_accum		);
		//C.r_Sampler			("s_lmap",			r2_sunmask		);
		//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_dx10Texture		("s_position",		r2_RT_P);
		C.r_dx10Texture		("s_normal",		r2_RT_N);
		C.r_dx10Texture		("s_material",		r2_material);
		C.r_dx10Texture		("s_accumulator",	r2_RT_accum);
		C.r_dx10Texture		("s_lmap",			r2_sunmask);
		C.r_dx10Texture		("s_smap",			r2_RT_smap_depth);

		C.r_dx10Sampler		("smp_nofilter");
		C.r_dx10Sampler		("smp_material");
		C.r_dx10Sampler		("smp_linear");
		jitter				(C);
		{
			u32 s = C.r_dx10Sampler("smp_smap");
			C.i_dx10Address		(s, D3DTADDRESS_BORDER);
			C.i_dx10BorderColor	(s, D3DCOLOR_ARGB(255, 255, 255, 255));
		}

		C.r_End				();
		break;
	case SE_SUN_LUMINANCE:	// luminance pass
		//C.r_Pass			("null",			"accum_sun",		false,	FALSE,	FALSE);
		C.r_Pass			("stub_notransform_aa_AA","accum_sun_msaa",		false,	FALSE,	FALSE);
		C.r_CullMode		(D3DCULL_NONE);
		//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_smap",			r2_RT_generic0	);
//.........这里部分代码省略.........
开发者ID:2asoft,项目名称:xray-16,代码行数:101,代码来源:blender_light_direct.cpp


注:本文中的CBlender_Compile::r_End方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。