Examples of ShaderNodeDefinition


Examples of com.jme3.shader.ShaderNodeDefinition

            if (statement.getLine().startsWith("ShaderNodeDefinition")) {
                String name = statement.getLine().substring("ShaderNodeDefinition".length()).trim();


                if (!getNodeDefinitions().containsKey(name)) {
                    shaderNodeDefinition = new ShaderNodeDefinition();
                    getNodeDefinitions().put(name, shaderNodeDefinition);
                    shaderNodeDefinition.setName(name);
                    readShaderNodeDefinition(statement.getContents(), key);

                }
View Full Code Here

Examples of com.jme3.shader.ShaderNodeDefinition

    protected void readShaderNode(List<Statement> statements) throws IOException {
        for (Statement statement : statements) {
            String line = statement.getLine();
            String[] split = statement.getLine().split("[ \\{]");
            if (line.startsWith("Definition")) {
                ShaderNodeDefinition def = findDefinition(statement);
                shaderNode.setDefinition(def);               
                if(def.isNoOutput()){
                    techniqueDef.getShaderGenerationInfo().getUnusedNodes().remove(shaderNode.getName());
                }
            } else if (line.startsWith("Condition")) {
                String condition = line.substring(line.lastIndexOf(":") + 1).trim();
                extractCondition(condition, statement);
View Full Code Here

Examples of com.jme3.shader.ShaderNodeDefinition

     */
    public ShaderNodeDefinition findDefinition(Statement statement) throws IOException {
        String defLine[] = statement.getLine().split(":");
        String defName = defLine[1].trim();

        ShaderNodeDefinition def = getNodeDefinitions().get(defName);
        if (def == null) {
            if (defLine.length == 3) {
                List<ShaderNodeDefinition> defs = null;
                try {
                    defs = assetManager.loadAsset(new ShaderNodeDefinitionKey(defLine[2].trim()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.