osgEarth的Rex引擎原理(四十九)rex引擎的着色器区分顶点和片段
发布时间
阅读量:
阅读量
目标:(四十五)中的问题115
每个着色器文件中都包含一个vp_location参数,在rex引擎运行时会依据这一参数值来确定该着色器所属的具体类型;如果未设置vp_location参数,则该着色器文件将在各个工作流程阶段都被执行处理
osgEarth/ShaderLoader.cpp
bool
ShaderLoader::load(VirtualProgram* vp,
const std::string& filename,
const ShaderPackage& package,
const osgDB::Options* dbOptions)
{
std::string loc = getPragmaValue(source, "vp_location");
ShaderComp::FunctionLocation location;
bool locationSet = true;
if ( ciEquals(loc, "vertex_model") )
全部评论 (0)
还没有任何评论哟~
