Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Incubator Q&A

Welcome to the staging ground for new communities! Each proposal has a description in the "Descriptions" category and a body of questions and answers in "Incubator Q&A". You can ask questions (and get answers, we hope!) right away, and start new proposals.

Are you here to participate in a specific proposal? Click on the proposal tag (with the dark outline) to see only posts about that proposal and not all of the others that are in progress. Tags are at the bottom of each post.

Post History

50%
+0 −0
Incubator Q&A Shaders incorrectly render lower parts of vertically extended worlds

The reason for this is because the bedrock layer is hardcoded into the shader packs. There's a uniform for exposing the data pack specified bedrock level in Iris. This is not available in Optifine...

posted 3mo ago by Andreas witnessed the end of the world today‭  ·  edited 2mo ago by Andreas witnessed the end of the world today‭

Answer
#2: Post edited by user avatar Andreas witnessed the end of the world today‭ · 2024-09-10T20:32:04Z (2 months ago)
Correction
  • The reason for this is because the bedrock layer is hardcoded into the shader packs.
  • There's a uniform for exposing the [data pack specified bedrock level](https://shaders.properties/reference/uniforms/general/bedrocklevel/) in Iris. This is not available in Optifine.
  • The best option is to reach out to the shader developer, and ask for them to update their shaders to use the necessary uniforms to replace the hardcoded values. If that is not an option, you can edit the shader pack files yourself.
  • For instance, to fix the effects in BSL, edit this line in `.minecraft/shaderpacks/BSLOriginal_v8.3.zip/shaders/lib/atmospherics/sky.glsl:68`:
  • ```
  • sky *= clamp((cameraPosition.y + 70.0) / 8.0, 0.0, 1.0);
  • ```
  • as well as this one:
  • ```
  • fog *= clamp((cameraPosition.y + 70.0) / 8.0, 0.0, 1.0);
  • ```
  • in `fog.glsl:58` in the same folder.
  • ---
  • I spoke to the person advocating for the inclusion of these uniforms in Iris, and according to them, the reason why they are not used by shader packs, is simply because the shader packs predate the uniforms, or because the shader developers are not aware of them. After speaking to the BSL developer, that was indeed the case, and they have now added it to their list of features to implement.
  • The reason for this is because the bedrock layer is hardcoded into the shader packs.
  • There's a uniform for exposing the [data pack specified bedrock level](https://shaders.properties/reference/uniforms/general/bedrocklevel/) in Iris. This is not available in Optifine.
  • The best option is to reach out to the shader developer, and ask for them to update their shaders to use the necessary uniforms to replace the hardcoded values. If that is not an option, you can edit the shader pack files yourself.
  • For instance, to fix the effects in BSL, edit these five lines in the files in `.minecraft/shaderpacks/BSLOriginal_v8.3.zip/shaders/lib/atmospherics/`:
  • ```c
  • /*sky.glsl:68*/ sky *= clamp((cameraPosition.y + 70.0) / 8.0, 0.0, 1.0);
  • /*fog.glsl:58*/ fog *= clamp((cameraPosition.y + 70.0) / 8.0, 0.0, 1.0);
  • /*volumetricLight.glsl:151*/ vl *= clamp((cameraPosition.y + 70.0) / 8.0, 0.0, 1.0);
  • /*clouds.glsl:221*/ cloudColor *= clamp((cameraPosition.y + 70.0) / 8.0, 0.0, 1.0);
  • /*sunmoon.glsl:87*/ visibility *= clamp((cameraPosition.y + 70.0) / 8.0, 0.0, 1.0);
  • ```
  • ---
  • I spoke to the person advocating for the inclusion of these uniforms in Iris, and according to them, the reason why they are not used by shader packs, is simply because the shader packs predate the uniforms, or because the shader developers are not aware of them. After speaking to the BSL developer, that was indeed the case, and they have now added it to their list of features to implement.
#1: Initial revision by user avatar Andreas witnessed the end of the world today‭ · 2024-09-03T13:05:58Z (3 months ago)
The reason for this is because the bedrock layer is hardcoded into the shader packs. 

There's a uniform for exposing the [data pack specified bedrock level](https://shaders.properties/reference/uniforms/general/bedrocklevel/) in Iris. This is not available in Optifine.

The best option is to reach out to the shader developer, and ask for them to update their shaders to use the necessary uniforms to replace the hardcoded values. If that is not an option, you can edit the shader pack files yourself. 

For instance, to fix the effects in BSL, edit this line in `.minecraft/shaderpacks/BSLOriginal_v8.3.zip/shaders/lib/atmospherics/sky.glsl:68`:

```
sky *= clamp((cameraPosition.y + 70.0) / 8.0, 0.0, 1.0);
```
as well as this one:
```
fog *= clamp((cameraPosition.y + 70.0) / 8.0, 0.0, 1.0);
```
in `fog.glsl:58` in the same folder.

---

I spoke to the person advocating for the inclusion of these uniforms in Iris, and according to them, the reason why they are not used by shader packs, is simply because the shader packs predate the uniforms, or because the shader developers are not aware of them. After speaking to the BSL developer, that was indeed the case, and they have now added it to their list of features to implement.