public ShaderProgram Translate( out ShaderProgramInfo shaderProgramInfo, TranslatorContext nextStage = null, TranslatorContext other = null) { if (nextStage != null) { _config.MergeFromtNextStage(nextStage._config); } FunctionCode[] code = EmitShader(_program, _config, initializeOutputs: other == null, out _); if (other != null) { other._config.MergeOutputUserAttributes(_config.UsedOutputAttributes, 0); FunctionCode[] otherCode = EmitShader(other._program, other._config, initializeOutputs: true, out int aStart); code = Combine(otherCode, code, aStart); _config.InheritFrom(other._config); } return(Translator.Translate(code, _config, out shaderProgramInfo)); }
public void SetNextStage(TranslatorContext nextStage) { _config.MergeFromtNextStage(nextStage._config); }