mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-23 01:59:39 +08:00
possible mac fix?
This commit is contained in:
parent
466482c31f
commit
e1a5d82298
@ -218,10 +218,10 @@ void main() {
|
|||||||
|
|
||||||
|
|
||||||
#ifdef MC_NORMAL_MAP
|
#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
|
#endif
|
||||||
|
|
||||||
normalMat = vec4(normalize(gl_NormalMatrix *gl_Normal), 1.0);
|
normalMat = vec4(normalize(gl_NormalMatrix * gl_Normal), 1.0);
|
||||||
FlatNormals = normalMat.xyz;
|
FlatNormals = normalMat.xyz;
|
||||||
|
|
||||||
blockID = mc_Entity.x;
|
blockID = mc_Entity.x;
|
||||||
|
@ -317,7 +317,8 @@ void main() {
|
|||||||
// bool blocklights = abs(dataUnpacked1.w-0.8) <0.01;
|
// 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;
|
float depth = z;
|
||||||
|
|
||||||
#ifdef DISTANT_HORIZONS
|
#ifdef DISTANT_HORIZONS
|
||||||
@ -344,11 +345,8 @@ void main() {
|
|||||||
if(z >= 1.0){
|
if(z >= 1.0){
|
||||||
FlatNormals = worldToView(normal);
|
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);
|
gl_FragData[1].xy = SSAO(viewPos, FlatNormals, hand, isLeaf, noise);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef OVERWORLD_SHADER
|
#ifdef OVERWORLD_SHADER
|
||||||
|
@ -43,21 +43,21 @@ uniform int hideGUI;
|
|||||||
uniform sampler2D noisetex; //noise
|
uniform sampler2D noisetex; //noise
|
||||||
uniform sampler2D depthtex0;
|
uniform sampler2D depthtex0;
|
||||||
uniform sampler2D depthtex1;
|
uniform sampler2D depthtex1;
|
||||||
uniform sampler2D depthtex2;
|
// uniform sampler2D depthtex2;
|
||||||
|
#ifdef DISTANT_HORIZONS
|
||||||
uniform sampler2D dhDepthTex;
|
uniform sampler2D dhDepthTex;
|
||||||
uniform sampler2D dhDepthTex1;
|
uniform sampler2D dhDepthTex1;
|
||||||
|
#endif
|
||||||
uniform sampler2D colortex0; //clouds
|
uniform sampler2D colortex0; //clouds
|
||||||
uniform sampler2D colortex1; //albedo(rgb),material(alpha) RGBA16
|
uniform sampler2D colortex1; //albedo(rgb),material(alpha) RGBA16
|
||||||
uniform sampler2D colortex2; //translucents(rgba)
|
uniform sampler2D colortex2; //translucents(rgba)
|
||||||
uniform sampler2D colortex3; //filtered shadowmap(VPS)
|
uniform sampler2D colortex3; //filtered shadowmap(VPS)
|
||||||
// uniform sampler2D colortex4; //LUT(rgb), quarter res depth(alpha)
|
// 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 colortex6; //Noise
|
||||||
uniform sampler2D colortex7; //water?
|
uniform sampler2D colortex7; //water?
|
||||||
uniform sampler2D colortex8; //Specular
|
uniform sampler2D colortex8; //Specular
|
||||||
uniform sampler2D colortex9; //Specular
|
// uniform sampler2D colortex9; //Specular
|
||||||
uniform sampler2D colortex10;
|
uniform sampler2D colortex10;
|
||||||
uniform sampler2D colortex11;
|
uniform sampler2D colortex11;
|
||||||
uniform sampler2D colortex12;
|
uniform sampler2D colortex12;
|
||||||
@ -88,7 +88,6 @@ uniform float dhFarPlane;
|
|||||||
uniform float dhNearPlane;
|
uniform float dhNearPlane;
|
||||||
|
|
||||||
flat varying vec3 zMults;
|
flat varying vec3 zMults;
|
||||||
flat varying vec3 zMults_DH;
|
|
||||||
|
|
||||||
uniform vec2 texelSize;
|
uniform vec2 texelSize;
|
||||||
uniform float viewWidth;
|
uniform float viewWidth;
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#include "/lib/settings.glsl"
|
#include "/lib/settings.glsl"
|
||||||
#include "/lib/res_params.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 WsunVec;
|
||||||
flat varying vec3 averageSkyCol_Clouds;
|
flat varying vec3 averageSkyCol_Clouds;
|
||||||
@ -9,13 +11,10 @@ flat varying vec4 lightCol;
|
|||||||
|
|
||||||
flat varying vec2 TAA_Offset;
|
flat varying vec2 TAA_Offset;
|
||||||
flat varying vec3 zMults;
|
flat varying vec3 zMults;
|
||||||
flat varying vec3 zMults_DH;
|
|
||||||
uniform sampler2D colortex4;
|
uniform sampler2D colortex4;
|
||||||
|
|
||||||
// uniform float far;
|
// uniform float far;
|
||||||
uniform float near;
|
uniform float near;
|
||||||
uniform float dhFarPlane;
|
|
||||||
uniform float dhNearPlane;
|
|
||||||
|
|
||||||
uniform mat4 gbufferModelViewInverse;
|
uniform mat4 gbufferModelViewInverse;
|
||||||
uniform vec3 sunPosition;
|
uniform vec3 sunPosition;
|
||||||
@ -41,10 +40,11 @@ const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
|||||||
void main() {
|
void main() {
|
||||||
gl_Position = ftransform();
|
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 = 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.rgb = texelFetch2D(colortex4,ivec2(6,37),0).rgb;
|
||||||
lightCol.a = float(sunElevation > 1e-5)*2.0 - 1.0;
|
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;
|
averageSkyCol_Clouds = texelFetch2D(colortex4,ivec2(0,37),0).rgb;
|
||||||
|
|
||||||
WsunVec = lightCol.a*normalize(mat3(gbufferModelViewInverse) * sunPosition);
|
WsunVec = lightCol.a*normalize(mat3(gbufferModelViewInverse) * sunPosition);
|
||||||
// WsunVec = normalize(LightDir);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef TAA
|
#ifdef TAA
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "/lib/settings.glsl"
|
#include "/lib/settings.glsl"
|
||||||
|
|
||||||
flat varying vec3 zMults;
|
flat varying vec3 zMults;
|
||||||
flat varying vec3 zMults_DH;
|
|
||||||
|
|
||||||
flat varying vec2 TAA_Offset;
|
flat varying vec2 TAA_Offset;
|
||||||
flat varying vec3 skyGroundColor;
|
flat varying vec3 skyGroundColor;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
varying vec2 texcoord;
|
varying vec2 texcoord;
|
||||||
flat varying vec3 zMults;
|
flat varying vec3 zMults;
|
||||||
flat varying vec3 zMults_DH;
|
|
||||||
flat varying vec3 WsunVec;
|
flat varying vec3 WsunVec;
|
||||||
|
|
||||||
uniform float far;
|
uniform float far;
|
||||||
@ -52,7 +51,6 @@ void main() {
|
|||||||
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition);
|
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition);
|
||||||
|
|
||||||
zMults = vec3(1.0/(far * near),far+near,far-near);
|
zMults = vec3(1.0/(far * near),far+near,far-near);
|
||||||
zMults_DH = vec3(1.0/(dhFarPlane * dhNearPlane),dhFarPlane+dhNearPlane,dhFarPlane-dhNearPlane);
|
|
||||||
|
|
||||||
gl_Position = ftransform();
|
gl_Position = ftransform();
|
||||||
texcoord = gl_MultiTexCoord0.xy;
|
texcoord = gl_MultiTexCoord0.xy;
|
||||||
|
Loading…
Reference in New Issue
Block a user