本文整理汇总了C++中Pass::SetPixelShaderDefineExcludes方法的典型用法代码示例。如果您正苦于以下问题:C++ Pass::SetPixelShaderDefineExcludes方法的具体用法?C++ Pass::SetPixelShaderDefineExcludes怎么用?C++ Pass::SetPixelShaderDefineExcludes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pass
的用法示例。
在下文中一共展示了Pass::SetPixelShaderDefineExcludes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ret
ea::shared_ptr<Technique> Technique::Clone(const ea::string& cloneName) const
{
ea::shared_ptr<Technique> ret(context_->CreateObject<Technique>());
ret->SetIsDesktop(isDesktop_);
ret->SetName(cloneName);
// Deep copy passes
for (auto i = passes_.begin(); i != passes_.end(); ++i)
{
Pass* srcPass = i->get();
if (!srcPass)
continue;
Pass* newPass = ret->CreatePass(srcPass->GetName());
newPass->SetBlendMode(srcPass->GetBlendMode());
newPass->SetDepthTestMode(srcPass->GetDepthTestMode());
newPass->SetLightingMode(srcPass->GetLightingMode());
newPass->SetDepthWrite(srcPass->GetDepthWrite());
newPass->SetAlphaToCoverage(srcPass->GetAlphaToCoverage());
newPass->SetIsDesktop(srcPass->IsDesktop());
newPass->SetVertexShader(srcPass->GetVertexShader());
newPass->SetPixelShader(srcPass->GetPixelShader());
newPass->SetVertexShaderDefines(srcPass->GetVertexShaderDefines());
newPass->SetPixelShaderDefines(srcPass->GetPixelShaderDefines());
newPass->SetVertexShaderDefineExcludes(srcPass->GetVertexShaderDefineExcludes());
newPass->SetPixelShaderDefineExcludes(srcPass->GetPixelShaderDefineExcludes());
}
return ret;
}
示例2: ret
SharedPtr<Technique> Technique::Clone(const String& cloneName) const
{
SharedPtr<Technique> ret(new Technique(context_));
ret->SetIsDesktop(isDesktop_);
ret->SetName(cloneName);
// Deep copy passes
for (Vector<SharedPtr<Pass> >::ConstIterator i = passes_.Begin(); i != passes_.End(); ++i)
{
Pass* srcPass = i->Get();
if (!srcPass)
continue;
Pass* newPass = ret->CreatePass(srcPass->GetName());
newPass->SetBlendMode(srcPass->GetBlendMode());
newPass->SetDepthTestMode(srcPass->GetDepthTestMode());
newPass->SetLightingMode(srcPass->GetLightingMode());
newPass->SetDepthWrite(srcPass->GetDepthWrite());
newPass->SetAlphaToCoverage(srcPass->GetAlphaToCoverage());
newPass->SetIsDesktop(srcPass->IsDesktop());
newPass->SetVertexShader(srcPass->GetVertexShader());
newPass->SetPixelShader(srcPass->GetPixelShader());
newPass->SetVertexShaderDefines(srcPass->GetVertexShaderDefines());
newPass->SetPixelShaderDefines(srcPass->GetPixelShaderDefines());
newPass->SetVertexShaderDefineExcludes(srcPass->GetVertexShaderDefineExcludes());
newPass->SetPixelShaderDefineExcludes(srcPass->GetPixelShaderDefineExcludes());
}
return ret;
}
示例3: BeginLoad
bool Technique::BeginLoad(Deserializer& source)
{
passes_.clear();
cloneTechniques_.clear();
SetMemoryUse(sizeof(Technique));
ea::shared_ptr<XMLFile> xml(context_->CreateObject<XMLFile>());
if (!xml->Load(source))
return false;
XMLElement rootElem = xml->GetRoot();
if (rootElem.HasAttribute("desktop"))
isDesktop_ = rootElem.GetBool("desktop");
ea::string globalVS = rootElem.GetAttribute("vs");
ea::string globalPS = rootElem.GetAttribute("ps");
ea::string globalVSDefines = rootElem.GetAttribute("vsdefines");
ea::string globalPSDefines = rootElem.GetAttribute("psdefines");
// End with space so that the pass-specific defines can be appended
if (!globalVSDefines.empty())
globalVSDefines += ' ';
if (!globalPSDefines.empty())
globalPSDefines += ' ';
XMLElement passElem = rootElem.GetChild("pass");
while (passElem)
{
if (passElem.HasAttribute("name"))
{
Pass* newPass = CreatePass(passElem.GetAttribute("name"));
if (passElem.HasAttribute("desktop"))
newPass->SetIsDesktop(passElem.GetBool("desktop"));
// Append global defines only when pass does not redefine the shader
if (passElem.HasAttribute("vs"))
{
newPass->SetVertexShader(passElem.GetAttribute("vs"));
newPass->SetVertexShaderDefines(passElem.GetAttribute("vsdefines"));
}
else
{
newPass->SetVertexShader(globalVS);
newPass->SetVertexShaderDefines(globalVSDefines + passElem.GetAttribute("vsdefines"));
}
if (passElem.HasAttribute("ps"))
{
newPass->SetPixelShader(passElem.GetAttribute("ps"));
newPass->SetPixelShaderDefines(passElem.GetAttribute("psdefines"));
}
else
{
newPass->SetPixelShader(globalPS);
newPass->SetPixelShaderDefines(globalPSDefines + passElem.GetAttribute("psdefines"));
}
newPass->SetVertexShaderDefineExcludes(passElem.GetAttribute("vsexcludes"));
newPass->SetPixelShaderDefineExcludes(passElem.GetAttribute("psexcludes"));
if (passElem.HasAttribute("lighting"))
{
ea::string lighting = passElem.GetAttributeLower("lighting");
newPass->SetLightingMode((PassLightingMode)GetStringListIndex(lighting.c_str(), lightingModeNames,
LIGHTING_UNLIT));
}
if (passElem.HasAttribute("blend"))
{
ea::string blend = passElem.GetAttributeLower("blend");
newPass->SetBlendMode((BlendMode)GetStringListIndex(blend.c_str(), blendModeNames, BLEND_REPLACE));
}
if (passElem.HasAttribute("cull"))
{
ea::string cull = passElem.GetAttributeLower("cull");
newPass->SetCullMode((CullMode)GetStringListIndex(cull.c_str(), cullModeNames, MAX_CULLMODES));
}
if (passElem.HasAttribute("depthtest"))
{
ea::string depthTest = passElem.GetAttributeLower("depthtest");
if (depthTest == "false")
newPass->SetDepthTestMode(CMP_ALWAYS);
else
newPass->SetDepthTestMode((CompareMode)GetStringListIndex(depthTest.c_str(), compareModeNames, CMP_LESS));
}
if (passElem.HasAttribute("depthwrite"))
newPass->SetDepthWrite(passElem.GetBool("depthwrite"));
if (passElem.HasAttribute("alphatocoverage"))
newPass->SetAlphaToCoverage(passElem.GetBool("alphatocoverage"));
}
else
URHO3D_LOGERROR("Missing pass name");
passElem = passElem.GetNext("pass");
}
//.........这里部分代码省略.........