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


C++ PixelShader::GetInfo方法代码示例

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


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

示例1: Transform

	PixelShader RemoveMaskedOutputWrites::Transform(const PixelShader& original)
	{
		PixelShader shader;
		shader.SetInfo(original.GetInfo());
		unsigned int i = 0;

		target.reg.type = RegisterType::UNKNOWN;

		for (const Statement& statement : original.GetStatements()) {			
			if (statement.destination.reg.type == RegisterType::OUTPUT && !statement.destination.mask.IsEmpty()) {
				if (target.reg.type == RegisterType::UNKNOWN)
					target = FindUnusedRegister(original, i);
				Replace(&shader, statement, target);
			}
			else
				shader.PushStatement(statement);

			++i;
		}

		if (target.reg.type != RegisterType::UNKNOWN) {
			Statement mov;
			mov.opcode = Opcode::MOV;
			mov.destination.reg.type = RegisterType::OUTPUT;
			mov.source1.registerEntry = target;
			shader.PushStatement(mov);
		}

		return shader;
	}
开发者ID:pagienet,项目名称:psykosoft2-tools,代码行数:30,代码来源:RemoveMaskedOutputWrites.cpp

示例2: WriteShader

	void AGALWriter::WriteShader(const PixelShader& shader, std::ostream& stream)
	{
		stream << shader.GetInfo();
		
		for (const Statement& statement : shader.GetStatements()) {
			stream << statement;
			if (statement.opcode == Opcode::TEXLD)
				stream	<< " <2d, " 
						<< (wrapMode == TextureSampling::CLAMP? "clamp, " : "wrap, ")
						<< (textureFiltering == TextureSampling::LINEAR? "linear, " : "nearest, ")
						<< (mipFiltering == TextureSampling::MIPNONE? "mipnone" : 
						mipFiltering == TextureSampling::MIPLINEAR? "miplinear" :
																	"mipnearest")
						<< ">";
			stream << std::endl;
		}
	}
开发者ID:pagienet,项目名称:psykosoft2-tools,代码行数:17,代码来源:AGALWriter.cpp

示例3: Transform

	PixelShader RemoveMADTransformation::Transform(const PixelShader& original)
	{
		PixelShader shader;
		shader.SetInfo(original.GetInfo());
		unsigned int i = 0;

		for (const Statement& statement : original.GetStatements()) {			
			if (statement.opcode == Opcode::MAD)
				Replace(original, &shader, statement, i);
			else
				shader.PushStatement(statement);

			++i;
		}

		return shader;
	}
开发者ID:pagienet,项目名称:psykosoft2-tools,代码行数:17,代码来源:RemoveMADTransformation.cpp

示例4: Transform

	PixelShader RemoveNegationTransformation::Transform(const PixelShader& original)
	{
		PixelShader shader;
		shader.SetInfo(original.GetInfo());
		unsigned int i = 0;

		for (const Statement& statement : original.GetStatements()) {			
			if (statement.source1.negated || statement.source2.negated) {
				Replace(original, &shader, statement, i);
			}
			else
				shader.PushStatement(statement);

			++i;
		}

		return shader;
	}
开发者ID:pagienet,项目名称:psykosoft2-tools,代码行数:18,代码来源:RemoveNegationTransformation.cpp


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