Search in sources :

Example 1 with ModelShaderLoaderCallback

use of com.gempukku.libgdx.graph.plugin.models.ModelShaderLoaderCallback in project gdx-graph by MarcinSc.

the class ModelShaderRendererPipelineNodeProducer method createColorShader.

private static GraphShader createColorShader(JsonValue shaderDefinition, Texture defaultTexture) {
    JsonValue shaderGraph = shaderDefinition.get("shader");
    String tag = shaderDefinition.getString("tag");
    Gdx.app.debug("Shader", "Building shader with tag: " + tag);
    return GraphLoader.loadGraph(shaderGraph, new ModelShaderLoaderCallback(tag, defaultTexture, false, configurations), PropertyLocation.Uniform);
}
Also used : JsonValue(com.badlogic.gdx.utils.JsonValue) ModelShaderLoaderCallback(com.gempukku.libgdx.graph.plugin.models.ModelShaderLoaderCallback)

Example 2 with ModelShaderLoaderCallback

use of com.gempukku.libgdx.graph.plugin.models.ModelShaderLoaderCallback in project gdx-graph by MarcinSc.

the class ModelShaderRendererPipelineNodeProducer method createDepthShader.

private static GraphShader createDepthShader(JsonValue shaderDefinition, Texture defaultTexture) {
    JsonValue shaderGraph = shaderDefinition.get("shader");
    String tag = shaderDefinition.getString("tag");
    Gdx.app.debug("Shader", "Building shader with tag: " + tag);
    return GraphLoader.loadGraph(shaderGraph, new ModelShaderLoaderCallback(tag, defaultTexture, true, configurations), PropertyLocation.Uniform);
}
Also used : JsonValue(com.badlogic.gdx.utils.JsonValue) ModelShaderLoaderCallback(com.gempukku.libgdx.graph.plugin.models.ModelShaderLoaderCallback)

Example 3 with ModelShaderLoaderCallback

use of com.gempukku.libgdx.graph.plugin.models.ModelShaderLoaderCallback in project gdx-graph by MarcinSc.

the class ShadowShaderRendererPipelineNodeProducer method createDepthShader.

private static GraphShader createDepthShader(JsonValue shaderDefinition, Texture defaultTexture) {
    JsonValue shaderGraph = shaderDefinition.get("shader");
    String tag = shaderDefinition.getString("tag");
    Gdx.app.debug("Shader", "Building shader with tag: " + tag);
    return GraphLoader.loadGraph(shaderGraph, new ModelShaderLoaderCallback(tag, defaultTexture, true, configurations), PropertyLocation.Uniform);
}
Also used : JsonValue(com.badlogic.gdx.utils.JsonValue) ModelShaderLoaderCallback(com.gempukku.libgdx.graph.plugin.models.ModelShaderLoaderCallback)

Aggregations

JsonValue (com.badlogic.gdx.utils.JsonValue)3 ModelShaderLoaderCallback (com.gempukku.libgdx.graph.plugin.models.ModelShaderLoaderCallback)3