Skip to content

Commit

Permalink
fix the tesselation sins
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Jul 14, 2024
1 parent e8ad8b9 commit 95d4d6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public enum FeatureFlags {
CUSTOM_IMAGES(() -> true, IrisRenderSystem::supportsImageLoadStore),
PER_BUFFER_BLENDING(() -> true, IrisRenderSystem::supportsBufferBlending),
COMPUTE_SHADERS(() -> true, IrisRenderSystem::supportsCompute),
TESSELATION_SHADERS(() -> true, IrisRenderSystem::supportsTesselation),
TESSELLATION_SHADERS(() -> true, IrisRenderSystem::supportsTesselation),
ENTITY_TRANSLUCENT(() -> true, () -> true),
REVERSED_CULLING(() -> true, () -> true),
BLOCK_EMISSION_ATTRIBUTE(() -> true, () -> true),
Expand Down Expand Up @@ -59,6 +59,11 @@ public static boolean isInvalid(String name) {
}

public static FeatureFlags getValue(String value) {
if (value.equalsIgnoreCase("TESSELATION_SHADERS")) {
// fix the sins of the past
value = "TESSELLATION_SHADERS";
}

try {
return FeatureFlags.valueOf(value.toUpperCase(Locale.US));
} catch (IllegalArgumentException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import net.irisshaders.iris.shaderpack.ShaderPack;
import net.irisshaders.iris.shaderpack.include.AbsolutePackPath;
import net.irisshaders.iris.shaderpack.loading.ProgramArrayId;
import net.irisshaders.iris.shaderpack.loading.ProgramGroup;
import net.irisshaders.iris.shaderpack.loading.ProgramId;
import net.irisshaders.iris.shaderpack.parsing.ComputeDirectiveParser;
import net.irisshaders.iris.shaderpack.parsing.ConstDirectiveParser;
Expand All @@ -22,7 +21,6 @@
import java.util.List;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;

public class ProgramSet implements ProgramSetInterface {
private final PackDirectives packDirectives;
Expand Down Expand Up @@ -53,7 +51,7 @@ public ProgramSet(AbsolutePackPath directory, Function<AbsolutePackPath, String>
//
// - https://github.com/IrisShaders/Iris/issues/483
// - https://github.com/IrisShaders/Iris/issues/987
boolean readTesselation = pack.hasFeature(FeatureFlags.TESSELATION_SHADERS);
boolean readTesselation = pack.hasFeature(FeatureFlags.TESSELLATION_SHADERS);

this.shadowCompute = readComputeArray(directory, sourceProvider, "shadow", shaderProperties);
this.setup = readProgramArray(directory, sourceProvider, "setup", shaderProperties);
Expand Down

0 comments on commit 95d4d6d

Please sign in to comment.