Skip to content

Commit

Permalink
Merge pull request IrisShaders#660 from IMS212/trunkgeometry
Browse files Browse the repository at this point in the history
Expose geometry shaders to SodiumTerrainPipeline
  • Loading branch information
IMS212 authored Jul 31, 2021
2 parents 6389563 + f99fe80 commit 0158656
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@

public class SodiumTerrainPipeline {
String terrainVertex;
String terrainGeometry;
String terrainFragment;
String translucentVertex;
String translucentGeometry;
String translucentFragment;
String shadowVertex;
String shadowGeometry;
String shadowFragment;
//GlFramebuffer framebuffer;
ProgramSet programSet;
Expand All @@ -40,16 +43,19 @@ public SodiumTerrainPipeline(ProgramSet programSet, IntFunction<ProgramSamplers>

terrainSource.ifPresent(sources -> {
terrainVertex = sources.getVertexSource().orElse(null);
terrainGeometry = sources.getGeometrySource().orElse(null);
terrainFragment = sources.getFragmentSource().orElse(null);
});

translucentSource.ifPresent(sources -> {
translucentVertex = sources.getVertexSource().orElse(null);
translucentGeometry = sources.getGeometrySource().orElse(null);
translucentFragment = sources.getFragmentSource().orElse(null);
});

shadowSource.ifPresent(sources -> {
shadowVertex = sources.getVertexSource().orElse(null);
shadowGeometry = sources.getGeometrySource().orElse(null);
shadowFragment = sources.getFragmentSource().orElse(null);
});

Expand Down Expand Up @@ -163,6 +169,10 @@ public Optional<String> getTerrainVertexShaderSource() {
return Optional.ofNullable(terrainVertex);
}

public Optional<String> getTerrainGeometryShaderSource() {
return Optional.ofNullable(terrainGeometry);
}

public Optional<String> getTerrainFragmentShaderSource() {
return Optional.ofNullable(terrainFragment);
}
Expand All @@ -171,6 +181,10 @@ public Optional<String> getTranslucentVertexShaderSource() {
return Optional.ofNullable(translucentVertex);
}

public Optional<String> getTranslucentGeometryShaderSource() {
return Optional.ofNullable(translucentGeometry);
}

public Optional<String> getTranslucentFragmentShaderSource() {
return Optional.ofNullable(translucentFragment);
}
Expand All @@ -179,6 +193,10 @@ public Optional<String> getShadowVertexShaderSource() {
return Optional.ofNullable(shadowVertex);
}

public Optional<String> getShadowGeometryShaderSource() {
return Optional.ofNullable(shadowGeometry);
}

public Optional<String> getShadowFragmentShaderSource() {
return Optional.ofNullable(shadowFragment);
}
Expand Down

0 comments on commit 0158656

Please sign in to comment.