Skip to content

Commit

Permalink
cloudHeight uniform
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Aug 18, 2023
1 parent 30a9368 commit cfcc580
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ public static void addWorldInfoUniforms(UniformHolder uniforms) {
return 0;
}
});
uniforms.uniform1f(UniformUpdateFrequency.PER_FRAME, "cloudHeight", () -> {
if (level != null) {
return level.effects().getCloudHeight();
} else {
return 192.0;
}
});

uniforms.uniform1i(UniformUpdateFrequency.PER_FRAME, "heightLimit", () -> {
if (level != null) {
return level.dimensionType().height();
Expand Down

0 comments on commit cfcc580

Please sign in to comment.