Skip to content

Commit

Permalink
Move shadow target init earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed May 5, 2024
1 parent 5fe3396 commit eb8042f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ public IrisRenderingPipeline(ProgramSet programSet) {
return shadowRenderTargets;
};

if (shadowDirectives.isShadowEnabled() == OptionalBoolean.TRUE) {
shadowTargetsSupplier.get();
}

this.shadowComputes = createShadowComputes(programSet.getShadowCompute(), programSet);

this.beginRenderer = new CompositeRenderer(this, programSet.getPackDirectives(), programSet.getBegin(), programSet.getBeginCompute(), renderTargets, shaderStorageBufferHolder,
Expand Down Expand Up @@ -445,10 +449,6 @@ public IrisRenderingPipeline(ProgramSet programSet) {
WorldRenderingSettings.INSTANCE.setSeparateEntityDraws(programSet.getPackDirectives().shouldUseSeparateEntityDraws());
WorldRenderingSettings.INSTANCE.setUseExtendedVertexFormat(true);

if (shadowRenderTargets == null && shadowDirectives.isShadowEnabled() == OptionalBoolean.TRUE) {
shadowRenderTargets = new ShadowRenderTargets(this, shadowMapResolution, shadowDirectives);
}

if (shadowRenderTargets != null) {
ShaderInstance shader = shaderMap.getShader(ShaderKey.SHADOW_TERRAIN_CUTOUT);
boolean shadowUsesImages = false;
Expand Down

0 comments on commit eb8042f

Please sign in to comment.