Skip to content

Commit

Permalink
Merge branch 'trunk' of https://github.com/IrisShaders/Iris into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbot16 committed Mar 6, 2022
2 parents ae48c51 + 5d7ecba commit a71b689
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 14 deletions.
10 changes: 8 additions & 2 deletions buildscript/src/main/java/Buildscript.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ public Path[] paths(String subdir, boolean onlyHeaders) {

@Override
public String getVersion() {
String baseVersion = super.getVersion().replace("development-environment", "");

String build_id = System.getenv("GITHUB_RUN_NUMBER");

if (build_id != null) {
return baseVersion + "build." + build_id;
}

String commitHash = "";
boolean isDirty = false;
try {
Expand All @@ -108,8 +116,6 @@ public String getVersion() {
e.printStackTrace();
}

String baseVersion = super.getVersion().replace("development-environment", "");

return baseVersion + commitHash + (isDirty ? "-dirty" : "");
}

Expand Down
5 changes: 2 additions & 3 deletions docs/changelogs/1.2.1/full.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Iris 1.2.1 Preliminary Changelog

This update isn't actually released yet, we're just writing this now to keep track of our progress.
# Iris 1.2.1 Changelog

- Switched to the Brachyura build system, substantially speeding up the build process & allowing us to much more easily tweak and debug our build scripts (ThatTrollzer, coderbot, IMS)
- Brachyura is still in development and is incomplete, but Iris is an early adopter. We hope that it will continue to stabilize and become appropriate for use by all Minecraft mods in due time.
Expand Down Expand Up @@ -35,6 +33,7 @@ This update isn't actually released yet, we're just writing this now to keep tra
- Fixes entity shadows on SEUS PTGI.
- Added support for the extended vertex format on entities, block entities, and similar (IMS)
- Fixes rendering issues with Advanced Materials on BSL, AstraLex, and similar packs
- Fixes block breaking animation with KUDA shaders
- Fixes many miscellaneous issues on other older packs

## Translations
Expand Down
2 changes: 1 addition & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You need java, please get it from: [Adoptium.net](https://adoptium.net/?variant=

## How can I configure my shaders?

[#663](https://github.com/IrisShaders/Iris/issues/663)
Go to Options>Video Settings>Shader Packs>Shader Pack Settings.

## Is my system supported?

Expand Down
11 changes: 5 additions & 6 deletions docs/supportedshaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@

* [Continuum 2.0.4](https://continuum.graphics/downloads)

* [SEUS V11](https://www.sonicether.com/seus/)

* [SEUS Renewed](https://www.sonicether.com/seus/)

* [SEUS PTGI E12 / HRR 2.1](https://www.sonicether.com/seus)
* SEUS PTGI HRR 3 is not currently supported.
* SEUS (NVIDIA or AMD GPU required, does not work on Mesa drivers or Intel Windows drivers)
* [SEUS V11](https://www.sonicether.com/seus/)
* [SEUS Renewed](https://www.sonicether.com/seus/)
* [SEUS PTGI E12 / HRR 2.1](https://www.sonicether.com/seus)
* SEUS PTGI HRR 3 is not currently supported.

* [Sildur's Enhanced Default](https://sildurs-shaders.github.io/)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private static float getNightVision() {
return 0.0F;
}

private static int isEyeInWater() {
static int isEyeInWater() {
// Note: With certain utility / cheat mods, this method will return air even when the player is submerged when
// the "No Overlay" feature is enabled.
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
package net.coderbot.iris.uniforms;

import net.coderbot.iris.Iris;
import net.coderbot.iris.gl.uniform.FloatSupplier;
import net.coderbot.iris.gl.uniform.UniformHolder;
import net.coderbot.iris.gl.uniform.UniformUpdateFrequency;
import net.coderbot.iris.mixin.DimensionTypeAccessor;
import net.coderbot.iris.uniforms.transforms.SmoothedFloat;
import net.coderbot.iris.vendored.joml.Math;
import net.minecraft.client.Minecraft;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LightLayer;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.phys.Vec3;

// These expressions are copied directly from BSL and Complementary.

// TODO: Remove once custom uniforms are actually supported, this is just a temporary thing to get BSL & Complementary
// mostly working under Iris.
public class HardcodedCustomUniforms {
private static final Minecraft client = Minecraft.getInstance();

public static void addHardcodedCustomUniforms(UniformHolder holder, FrameUpdateNotifier updateNotifier) {
CameraUniforms.CameraPositionTracker tracker = new CameraUniforms.CameraPositionTracker(updateNotifier);

SmoothedFloat eyeInCave = new SmoothedFloat(6, 12, HardcodedCustomUniforms::getEyeInCave, updateNotifier);

holder.uniform1f(UniformUpdateFrequency.PER_FRAME, "timeAngle", HardcodedCustomUniforms::getTimeAngle);
holder.uniform1f(UniformUpdateFrequency.PER_FRAME, "timeBrightness", HardcodedCustomUniforms::getTimeBrightness);
holder.uniform1f(UniformUpdateFrequency.PER_FRAME, "moonBrightness", HardcodedCustomUniforms::getMoonBrightness);
Expand All @@ -28,10 +36,32 @@ public static void addHardcodedCustomUniforms(UniformHolder holder, FrameUpdateN
holder.uniform1f(UniformUpdateFrequency.PER_FRAME, "isDry", new SmoothedFloat(20, 10, () -> getRawPrecipitation() == 0 ? 1 : 0, updateNotifier));
holder.uniform1f(UniformUpdateFrequency.PER_FRAME, "isRainy", new SmoothedFloat(20, 10, () -> getRawPrecipitation() == 1 ? 1 : 0, updateNotifier));
holder.uniform1f(UniformUpdateFrequency.PER_FRAME, "isSnowy", new SmoothedFloat(20, 10, () -> getRawPrecipitation() == 2 ? 1 : 0, updateNotifier));
holder.uniform1f(UniformUpdateFrequency.PER_FRAME, "isEyeInCave", CommonUniforms.isEyeInWater() == 0 ? eyeInCave : () -> 0);
holder.uniform1f(UniformUpdateFrequency.PER_FRAME, "velocity", () -> getVelocity(tracker));
holder.uniform1f(UniformUpdateFrequency.PER_FRAME, "starter", getStarter(tracker, updateNotifier));
}

private static float getEyeInCave() {
if (client.getCameraEntity().getEyeY() < 5.0) {
return 1.0f - getEyeSkyBrightness() / 240F;
}
return 0.0f;
}

private static float getEyeSkyBrightness() {
if (client.cameraEntity == null || client.level == null) {
return 0;
}

Vec3 feet = client.cameraEntity.position();
Vec3 eyes = new Vec3(feet.x, client.cameraEntity.getEyeY(), feet.z);
BlockPos eyeBlockPos = new BlockPos(eyes);

int skyLight = client.level.getBrightness(LightLayer.SKY, eyeBlockPos);

return skyLight * 16;
}

private static float getVelocity(CameraUniforms.CameraPositionTracker tracker) {
float difX = (float) (tracker.getCurrentCameraPosition().x - tracker.getPreviousCameraPosition().x);
float difY = (float) (tracker.getCurrentCameraPosition().y - tracker.getPreviousCameraPosition().y);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "iris",
"version": "1.2.1-rc1-development-environment",
"version": "1.2.2-pre-development-environment",

"name": "Iris",
"description": "A modern shaders mod for Minecraft intended to be compatible with existing OptiFine shader packs",
Expand Down

0 comments on commit a71b689

Please sign in to comment.