possible mac fix?

This commit is contained in:
Xonk 2024-03-02 14:58:27 -05:00
parent 466482c31f
commit e1a5d82298
6 changed files with 15 additions and 22 deletions

View File

@ -218,10 +218,10 @@ void main() {
#ifdef MC_NORMAL_MAP
tangent = vec4(normalize(gl_NormalMatrix *at_tangent.rgb),at_tangent.w);
tangent = vec4(normalize(gl_NormalMatrix * at_tangent.rgb), at_tangent.w);
#endif
normalMat = vec4(normalize(gl_NormalMatrix *gl_Normal), 1.0);
normalMat = vec4(normalize(gl_NormalMatrix * gl_Normal), 1.0);
FlatNormals = normalMat.xyz;
blockID = mc_Entity.x;

View File

@ -317,7 +317,8 @@ void main() {
// bool blocklights = abs(dataUnpacked1.w-0.8) <0.01;
#ifdef DENOISE_SSS_AND_SSAO
gl_FragData[1] = vec4(0.0,0.0,0.0,texture2D(colortex14,texcoord).a);
#if defined DENOISE_SSS_AND_SSAO && indirect_effect == 1
float depth = z;
#ifdef DISTANT_HORIZONS
@ -344,11 +345,8 @@ void main() {
if(z >= 1.0){
FlatNormals = worldToView(normal);
}
gl_FragData[1] = vec4(0.0,0.0,0.0,texture2D(colortex14,texcoord).a);
gl_FragData[1].xy = SSAO(viewPos, FlatNormals, hand, isLeaf, noise);
#endif
#ifdef OVERWORLD_SHADER

View File

@ -43,21 +43,21 @@ uniform int hideGUI;
uniform sampler2D noisetex; //noise
uniform sampler2D depthtex0;
uniform sampler2D depthtex1;
uniform sampler2D depthtex2;
// uniform sampler2D depthtex2;
#ifdef DISTANT_HORIZONS
uniform sampler2D dhDepthTex;
uniform sampler2D dhDepthTex1;
#endif
uniform sampler2D colortex0; //clouds
uniform sampler2D colortex1; //albedo(rgb),material(alpha) RGBA16
uniform sampler2D colortex2; //translucents(rgba)
uniform sampler2D colortex3; //filtered shadowmap(VPS)
// uniform sampler2D colortex4; //LUT(rgb), quarter res depth(alpha)
uniform sampler2D colortex5; //TAA buffer/previous frame
// uniform sampler2D colortex5; //TAA buffer/previous frame
uniform sampler2D colortex6; //Noise
uniform sampler2D colortex7; //water?
uniform sampler2D colortex8; //Specular
uniform sampler2D colortex9; //Specular
// uniform sampler2D colortex9; //Specular
uniform sampler2D colortex10;
uniform sampler2D colortex11;
uniform sampler2D colortex12;
@ -88,7 +88,6 @@ uniform float dhFarPlane;
uniform float dhNearPlane;
flat varying vec3 zMults;
flat varying vec3 zMults_DH;
uniform vec2 texelSize;
uniform float viewWidth;

View File

@ -1,7 +1,9 @@
#include "/lib/settings.glsl"
#include "/lib/res_params.glsl"
flat varying float Flashing;
#ifdef END_SHADER
flat varying float Flashing;
#endif
flat varying vec3 WsunVec;
flat varying vec3 averageSkyCol_Clouds;
@ -9,13 +11,10 @@ flat varying vec4 lightCol;
flat varying vec2 TAA_Offset;
flat varying vec3 zMults;
flat varying vec3 zMults_DH;
uniform sampler2D colortex4;
// uniform float far;
uniform float near;
uniform float dhFarPlane;
uniform float dhNearPlane;
uniform mat4 gbufferModelViewInverse;
uniform vec3 sunPosition;
@ -41,10 +40,11 @@ const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
void main() {
gl_Position = ftransform();
Flashing = texelFetch2D(colortex4,ivec2(1,1),0).x/150.0;
#ifdef END_SHADER
Flashing = texelFetch2D(colortex4,ivec2(1,1),0).x/150.0;
#endif
zMults = vec3(1.0/(far * near),far+near,far-near);
zMults_DH = vec3(1.0/(dhFarPlane * dhNearPlane),dhFarPlane+dhNearPlane,dhFarPlane-dhNearPlane);
lightCol.rgb = texelFetch2D(colortex4,ivec2(6,37),0).rgb;
lightCol.a = float(sunElevation > 1e-5)*2.0 - 1.0;
@ -52,7 +52,6 @@ void main() {
averageSkyCol_Clouds = texelFetch2D(colortex4,ivec2(0,37),0).rgb;
WsunVec = lightCol.a*normalize(mat3(gbufferModelViewInverse) * sunPosition);
// WsunVec = normalize(LightDir);
#ifdef TAA

View File

@ -1,7 +1,6 @@
#include "/lib/settings.glsl"
flat varying vec3 zMults;
flat varying vec3 zMults_DH;
flat varying vec2 TAA_Offset;
flat varying vec3 skyGroundColor;

View File

@ -2,7 +2,6 @@
varying vec2 texcoord;
flat varying vec3 zMults;
flat varying vec3 zMults_DH;
flat varying vec3 WsunVec;
uniform float far;
@ -52,7 +51,6 @@ void main() {
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition);
zMults = vec3(1.0/(far * near),far+near,far-near);
zMults_DH = vec3(1.0/(dhFarPlane * dhNearPlane),dhFarPlane+dhNearPlane,dhFarPlane-dhNearPlane);
gl_Position = ftransform();
texcoord = gl_MultiTexCoord0.xy;