Open GamzeeRakoon opened 3 years ago
update: User has reported the same issue with a diffrent shader MC: 1.17.1 Iris+sodium: v1.1.2 Shader used in demo: Tea shaders v1.5.5
Video of the issue: https://imgur.com/a/E017t7z
I also have this issue. I have a 1660 Super, and I was using Silder's Enhanced Default on 1.18
I continue to have this issue on 1.18.1 running sodium on Arch Linux with a GTX 1070, however it doesn't happen with complementary shaders so far I've only seen it on sidlurs vibrant and enhanced along with tea shaders
I managed to resolve this issue with Sildur's Enhanced Default on 1.18 by adding a few files to the shader pack.
In the shaders sub-folder, create both gbuffers_damagedblock.fsh and gbuffers_damagedblock.vsh and add the following code:
gbuffers_damagedblock.fsh
#version 120
/* DRAWBUFFERS:02 */ //0=gcolor, 2=gnormal for normals
//Varyings//
varying vec2 texCoord;
//Uniforms//
uniform sampler2D texture;
//Program//
void main() {
//Texture
vec4 albedo = texture2D(texture, texCoord);
#if ALPHA_BLEND == 1
albedo.rgb = pow(albedo.rgb,vec3(2.2)) * 2.25;
#endif
#ifdef WHITE_WORLD
albedo.a = 0.0;
#endif
/* DRAWBUFFERS:0 */
gl_FragData[0] = albedo;
}
gbuffers_damagedblock.vsh
#version 120
//Varyings//
varying vec2 texCoord;
//Uniforms//
#if AA > 0
uniform int frameCounter;
uniform float viewWidth,viewHeight;
#endif
uniform float frameTimeCounter;
uniform mat4 gbufferModelView;
uniform mat4 gbufferModelViewInverse;
//Includes//
// #if AA > 0
// #include "/lib/util/jitter.glsl"
// #endif
//Program//
void main(){
texCoord=(gl_TextureMatrix[0]*gl_MultiTexCoord0).xy;
gl_Position=ftransform();
#if AA > 0
gl_Position.xy=TAAJitter(gl_Position.xy,gl_Position.w);
#endif
}
Could probably be optimized, but I was just adopting similar code from other packs. Hopefully this works for other people.
This does not affect 1.16.5. So there's something different about how 1.17.1+ is doing things that is causing these issues.
I managed to resolve this issue with Sildur's Enhanced Default on 1.18 by adding a few files to the shader pack.
In the shaders sub-folder, create both gbuffers_damagedblock.fsh and gbuffers_damagedblock.vsh and add the following code:
gbuffers_damagedblock.fsh
#version 120 /* DRAWBUFFERS:02 */ //0=gcolor, 2=gnormal for normals //Varyings// varying vec2 texCoord; //Uniforms// uniform sampler2D texture; //Program// void main() { //Texture vec4 albedo = texture2D(texture, texCoord); #if ALPHA_BLEND == 1 albedo.rgb = pow(albedo.rgb,vec3(2.2)) * 2.25; #endif #ifdef WHITE_WORLD albedo.a = 0.0; #endif /* DRAWBUFFERS:0 */ gl_FragData[0] = albedo; }
gbuffers_damagedblock.vsh
#version 120 //Varyings// varying vec2 texCoord; //Uniforms// #if AA > 0 uniform int frameCounter; uniform float viewWidth,viewHeight; #endif uniform float frameTimeCounter; uniform mat4 gbufferModelView; uniform mat4 gbufferModelViewInverse; //Includes// // #if AA > 0 // #include "/lib/util/jitter.glsl" // #endif //Program// void main(){ texCoord=(gl_TextureMatrix[0]*gl_MultiTexCoord0).xy; gl_Position=ftransform(); #if AA > 0 gl_Position.xy=TAAJitter(gl_Position.xy,gl_Position.w); #endif }
Could probably be optimized, but I was just adopting similar code from other packs. Hopefully this works for other people.
THANK YOU SO MUCH! IT WORKS!
I fixed this in 1.1 by adding a gbuffers_damagedblock
shader that skips lighting, and the result seems to match vanilla. This isn't really the behavior I'd expect, though, and it seems odd that it would relate to the game version like this.
@IMS212 Would you be able to give this a look? I wonder if gl_Normal
/ gl_NormalMatrix
are invalid somehow in block breaking.
What happened?
when you have vanillAA enabled on iris and you try breaking a block, the breaking texture will be pure black instead of having greys in it
i have tested it on both optifine and iris and it seems that only iris has this issue
https://github.com/leo60228/VanillAA-Shaders
Screenshots
The breaking texture on Optifine:
The breaking texture on Iris
Relevant log output
Iris and Minecraft Version
iris-and-sodium-mc1.17-1.1.2+build.9.jar
Are you running Sodium along with Iris?
Yes
Operating System
Arch Linux
What is your GPU?
Nvidia GTX 1050TI
Java Version
17
Additional context
No response