Skip to content

Commit

Permalink
Minor shadow fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Mar 30, 2024
1 parent bd81c6b commit a787322
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.ajoberstar.grgit.Grgit
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform

object Constants {
// https://fabricmc.net/develop/
Expand Down Expand Up @@ -169,7 +170,7 @@ dependencies {

tasks {
runClient {
if (Constants.ACTIVATE_RENDERDOC) {
if (Constants.ACTIVATE_RENDERDOC && DefaultNativePlatform.getCurrentOperatingSystem().isLinux) {
environment("LD_PRELOAD", "/usr/lib/librenderdoc.so")
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/irisshaders/iris/Iris.java
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,9 @@ public static String getFormattedVersion() {
ChatFormatting color;
String version = getVersion();

if (version.endsWith("-development-environment")) {
if (FabricLoader.getInstance().isDevelopmentEnvironment()) {
color = ChatFormatting.GOLD;
version = version.replace("-development-environment", " (Development Environment)");
version = version + " (Development Environment)";
} else if (version.endsWith("-dirty") || version.contains("unknown") || version.endsWith("-nogit")) {
color = ChatFormatting.RED;
} else if (version.contains("+rev.")) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.irisshaders.iris.gui.screen;

import com.mojang.blaze3d.platform.InputConstants;
import net.fabricmc.loader.api.FabricLoader;
import net.irisshaders.iris.Iris;
import net.irisshaders.iris.api.v0.IrisApi;
import net.irisshaders.iris.gui.GuiUtil;
Expand Down Expand Up @@ -80,9 +81,8 @@ public ShaderPackScreen(Screen parent) {

String irisName = Iris.MODNAME + " " + Iris.getVersion();

if (irisName.contains("-development-environment")) {
if (FabricLoader.getInstance().isDevelopmentEnvironment()) {
this.developmentComponent = Component.literal("Development Environment").withStyle(ChatFormatting.GOLD);
irisName = irisName.replace("-development-environment", "");
}

this.irisTextComponent = Component.literal(irisName).withStyle(ChatFormatting.GRAY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,17 +776,11 @@ public void addGbufferOrShadowSamplers(SamplerHolder samplers, ImageHolder image
IrisSamplers.addCustomImages(samplerHolder, customImages);

if (IrisSamplers.hasShadowSamplers(samplerHolder)) {
if (!isShadowPass) {
shadowTargetsSupplier.get();
}

IrisSamplers.addShadowSamplers(samplerHolder, Objects.requireNonNull(shadowRenderTargets), null, separateHardwareSamplers);
IrisSamplers.addShadowSamplers(samplerHolder, shadowTargetsSupplier.get(), null, separateHardwareSamplers);
}

if (isShadowPass || IrisImages.hasShadowImages(images)) {
// Note: hasShadowSamplers currently queries for shadow images too, so the shadow render targets will be
// created by this point... that's sorta ugly, though.
IrisImages.addShadowColorImages(images, Objects.requireNonNull(shadowRenderTargets), null);
IrisImages.addShadowColorImages(images, shadowTargetsSupplier.get(), null);
}
}

Expand Down

0 comments on commit a787322

Please sign in to comment.