Skip to content

Commit

Permalink
Fix ambient occlusion errors with big flower pots (#4).
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdAurora committed Apr 19, 2021
1 parent 669c982 commit 611b2d0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void emitBlockQuads(BlockRenderView blockView, BlockState state, BlockPos
vec.add(offset, .8f, offset);
quad.pos(i, vec);
}
quad.material(RendererAccess.INSTANCE.getRenderer().materialFinder().disableAo(0, true).find());
quad.material(RendererAccess.INSTANCE.getRenderer().materialFinder().disableAo(0, !model.useAmbientOcclusion()).find());
return true;
});
((FabricBakedModel) model).emitBlockQuads(blockView, state, pos, randomSupplier, context);
Expand All @@ -110,7 +110,11 @@ public void emitBlockQuads(BlockRenderView blockView, BlockState state, BlockPos
vec.add(offset, .8f + ratio, offset);
quad.pos(i, vec);
}
quad.material(RendererAccess.INSTANCE.getRenderer().materialFinder().disableAo(0, true).find());
quad.material(
RendererAccess.INSTANCE.getRenderer().materialFinder()
.disableAo(0, !upModel.useAmbientOcclusion())
.find()
);
return true;
});
((FabricBakedModel) upModel).emitBlockQuads(blockView, state, pos.up(), randomSupplier, context);
Expand Down

0 comments on commit 611b2d0

Please sign in to comment.