Sky disapearing
RobinYH opened this issue ยท 6 comments
What happened?
When using some shaders with a custom sky (such as Builders QOL/stereo's default+) don't work. They load properly, but the sky is COMPLETELY black except for the sun/moon.
Screenshots
Relevant log output
Iris and Minecraft Version
iris-mc1.17-1.1.1, Minecraft 1.17.1
Are you running Sodium along with Iris?
No
Operating System
Windows 10 (pro but that doesn't matter)
What is your GPU?
Intel integrated graphics
Java Version
Java 16
Additional context
I don't actually use a custom sky texture, which is the cause of Builder's QOL and Project LUMA not working iirc, and my shader should work fine. And it indeed does on Iris 1.1.1 in 1.16.5 (except clouds, which I believe was fixed in a 1.17.1 dev version, might also require a fix from me with how iris works and/or do to the sky issues anyways) to my testing on v2.3 of Stereo's Default+, however on (again Iris 1.1.1) 1.17.1 nothing works in the sky with the exact same shader selected. I have tried to mitigate this via adding gbuffers_skybasic
gbuffers_skytextured
and gbuffers_clouds
, It seemed when I had both gbuffers_skybasic
and gbuffers_skytextured
that some issues were fixed, like the sky finally had color but nothing else (ie stars), however, I don't think it used the skybox so it was only a solid color when I tested (both day and night).
FTR these 3 files I added used the same code as gbuffers_entities, which does work in 1.17.1, and generally fixes things not getting picked up by the shader (ie entities)
1.17.1: (No Code Changes, this is stock v2.3)
1.16.5: (No Code Changes, this is stock v2.3)
relevant code that is used everywhere in my shader:
/*FSH*/
#version 120
varying vec2 TexCoords;
varying vec2 LightmapCoords;
varying vec3 Normal117;
varying vec4 Color117;
uniform sampler2D texture;
void main(){
vec4 Albedo = texture2D(texture, TexCoords) * Color117;
/* DRAWBUFFERS:012 */
gl_FragData[0] = Albedo;
gl_FragData[1] = vec4(Normal117 * 0.5f + 0.5f, 1.0f);
gl_FragData[2] = vec4(LightmapCoords, 0.0f, 1.0f);
}
/*VSH*/
#version 120
varying vec2 lmcoord;
varying vec2 texcoord;
varying vec2 TexCoords;
varying vec2 LightmapCoords;
varying vec3 Normal117;
varying vec4 Color117;
void main() {
texcoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
lmcoord = (gl_TextureMatrix[1] * gl_MultiTexCoord1).xy;
gl_Position = ftransform();
TexCoords = gl_MultiTexCoord0.st;
LightmapCoords = mat2(gl_TextureMatrix[1]) * gl_MultiTexCoord1.st;
LightmapCoords = (LightmapCoords * 33.05f / 32.0f) - (1.05f / 32.0f);
Normal117 = gl_NormalMatrix * gl_Normal;
Color117 = gl_Color;
}
I will reiterate that the code works elsewhere in the shaders 100% fine, but has limited effects on sky stuff. OptiFine has none of these issues, even if I add these 3 files in with this code.