mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-14 06:24:12 +01:00
Turn the cutout off crash off
- MaterialEncoder would trigger an indexing of CutoutShaders.OFF, though PipelineCompiler would explicitly not index OFF - This caused a crash on instancing when MaterialEncoder would delete all pipeline shaders while instancing was trying to upload the packed ubershader uniform
This commit is contained in:
parent
3d2fdb7e83
commit
3a949c717a
@ -61,15 +61,12 @@ public final class PipelineCompiler {
|
||||
MaterialShaderIndices.fogSources()
|
||||
.index(fog.source());
|
||||
|
||||
boolean useCutout = cutout != CutoutShaders.OFF;
|
||||
// Same thing for cutout.
|
||||
// Add OFF to the index here anyway to ensure MaterialEncoder doesn't deleteAll at an inappropriate time.
|
||||
MaterialShaderIndices.cutoutSources()
|
||||
.index(cutout.source());
|
||||
|
||||
if (useCutout) {
|
||||
// Same thing for cutout.
|
||||
MaterialShaderIndices.cutoutSources()
|
||||
.index(cutout.source());
|
||||
}
|
||||
|
||||
return harness.get(new PipelineProgramKey(instanceType, contextShader, light, shaders, useCutout, FrameUniforms.debugOn()));
|
||||
return harness.get(new PipelineProgramKey(instanceType, contextShader, light, shaders, cutout != CutoutShaders.OFF, FrameUniforms.debugOn()));
|
||||
}
|
||||
|
||||
public void delete() {
|
||||
|
Loading…
Reference in New Issue
Block a user