Added support for subsititing $VAR_NAME entries in shaders to enable writing shaders that work across GLSL versions.

This commit is contained in:
Robert Osfield
2017-09-18 18:09:15 +01:00
parent 5ade852172
commit cc7cf54353
5 changed files with 179 additions and 21 deletions

View File

@@ -618,7 +618,7 @@ void Shader::PerContextShader::compileShader(osg::State& state)
#endif
std::string source = _shader->getShaderSource();
if (_shader->getType()==osg::Shader::VERTEX && (state.getUseVertexAttributeAliasing() || state.getUseModelViewAndProjectionUniforms()))
// if (_shader->getType()==osg::Shader::VERTEX && (state.getUseVertexAttributeAliasing() || state.getUseModelViewAndProjectionUniforms()))
{
state.convertVertexShaderSourceToOsgBuiltIns(source);
}