variable.setShaderOutput(true); final ShaderNodeVariable leftVariable = variableMapping.getLeftVariable(); if (leftVariable.getName().equals(variable.getName())) { leftVariable.setShaderOutput(true);
/** * Stores a global output. * * @param var the variable to store. * @param varStatement the statement being read. * @throws MatParseException if we have duplicates of a global vertex output variable. */ public void storeGlobal(ShaderNodeVariable var, Statement varStatement) throws MatParseException { var.setShaderOutput(true); final ShaderGenerationInfo generationInfo = techniqueDef.getShaderGenerationInfo(); final ShaderNodeDefinition definition = shaderNode.getDefinition(); if (definition.getType() == ShaderType.Vertex) { ShaderNodeVariable global = generationInfo.getVertexGlobal(); if (global != null) { if (!global.getName().equals(var.getName())) { throw new MatParseException("A global output is already defined for the vertex shader: " + global.getName() + ". vertex shader can only have one global output", varStatement); } } else { generationInfo.setVertexGlobal(var); } } else if (definition.getType() == ShaderType.Fragment) { storeVariable(var, generationInfo.getFragmentGlobals()); } }
variable.setShaderOutput(true); final ShaderNodeVariable leftVariable = variableMapping.getLeftVariable(); if (leftVariable.getName().equals(variable.getName())) { leftVariable.setShaderOutput(true);
/** * stores a global output * * @param var the variable to store * @param statement1 the statement being read * @throws IOException */ public void storeGlobal(ShaderNodeVariable var, Statement statement1) throws IOException { var.setShaderOutput(true); if (shaderNode.getDefinition().getType() == Shader.ShaderType.Vertex) { ShaderNodeVariable global = techniqueDef.getShaderGenerationInfo().getVertexGlobal(); if (global != null) { if (!global.getName().equals(var.getName())) { throw new MatParseException("A global output is already defined for the vertex shader: " + global.getName() + ". vertex shader can only have one global output", statement1); } } else { techniqueDef.getShaderGenerationInfo().setVertexGlobal(var); } } else if (shaderNode.getDefinition().getType() == Shader.ShaderType.Fragment) { storeVariable(var, techniqueDef.getShaderGenerationInfo().getFragmentGlobals()); } }