mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 08:42:50 +08:00
tweak enchant glint to be a more consistent brightness. moved some fog settings around. disabled particles before deferred because of iris issues
This commit is contained in:
@ -388,6 +388,10 @@ void main() {
|
||||
//////////////////////////////// ////////////////////////////////
|
||||
|
||||
vec4 Albedo = texture2D_POMSwitch(texture, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM) * color;
|
||||
|
||||
#if defined HAND
|
||||
if (Albedo.a < 0.1) discard;
|
||||
#endif
|
||||
|
||||
if(LIGHTNING > 0) Albedo = vec4(1);
|
||||
|
||||
|
@ -189,7 +189,6 @@ void main() {
|
||||
|
||||
vec3 position = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz;
|
||||
|
||||
|
||||
|
||||
/////// ----- COLOR STUFF ----- ///////
|
||||
color = gl_Color;
|
||||
|
@ -492,7 +492,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
float roughness = max(pow(1.0-SpecularTex.r,2.0),0.05);
|
||||
float f0 = SpecularTex.g;
|
||||
|
||||
if (iswater > 0.0){
|
||||
if (iswater > 0.0 && gl_FragData[0].a < 0.9999999){
|
||||
vec3 Reflections_Final = vec3(0.0);
|
||||
vec4 Reflections = vec4(0.0);
|
||||
vec3 SkyReflection = vec3(0.0);
|
||||
@ -560,6 +560,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
} else {
|
||||
gl_FragData[0].rgb = FinalColor;
|
||||
}
|
||||
|
||||
#else
|
||||
gl_FragData[0].rgb = FinalColor;
|
||||
#endif
|
||||
|
@ -3,6 +3,8 @@ varying vec2 texcoord;
|
||||
|
||||
uniform sampler2D texture;
|
||||
|
||||
flat varying float exposure;
|
||||
|
||||
//faster and actually more precise than pow 2.2
|
||||
vec3 toLinear(vec3 sRGB){
|
||||
return sRGB * (sRGB * (sRGB * 0.305306011 + 0.682171111) + 0.012522878);
|
||||
@ -36,14 +38,14 @@ float encodeVec2(float x,float y){
|
||||
#endif
|
||||
|
||||
#ifdef ENCHANT_GLINT
|
||||
/* DRAWBUFFERS:2 */
|
||||
/* DRAWBUFFERS:2 */
|
||||
#endif
|
||||
|
||||
void main() {
|
||||
|
||||
vec4 Albedo = texture2D(texture, texcoord);
|
||||
|
||||
#if defined SPIDER_EYES || defined BEACON_BEAM || defined GLOWING
|
||||
#if defined SPIDER_EYES || defined BEACON_BEAM || defined GLOWING
|
||||
vec4 data1 = vec4(1.0); float materialMask = 1.0;
|
||||
|
||||
#if defined SPIDER_EYES || defined GLOWING
|
||||
@ -60,8 +62,8 @@ void main() {
|
||||
#endif
|
||||
|
||||
#ifdef ENCHANT_GLINT
|
||||
vec3 GlintColor = toLinear(Albedo.rgb * color.rgb) * Albedo.a;
|
||||
vec3 GlintColor = toLinear(Albedo.rgb * color.rgb) / clamp(exposure,0.01,1.0);
|
||||
|
||||
gl_FragData[0] = vec4(GlintColor, Albedo.a * 0.1);
|
||||
gl_FragData[0] = vec4(GlintColor , Albedo.a * 0.1);
|
||||
#endif
|
||||
}
|
@ -21,16 +21,33 @@ const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
||||
vec2(-7.,-1.)/8.,
|
||||
vec2(3,7.)/8.,
|
||||
vec2(7.,-7.)/8.);
|
||||
|
||||
|
||||
#define diagonal3(m) vec3((m)[0].x, (m)[1].y, m[2].z)
|
||||
#define projMAD(m, v) (diagonal3(m) * (v) + (m)[3].xyz)
|
||||
vec4 toClipSpace3(vec3 viewSpacePosition) {
|
||||
return vec4(projMAD(gl_ProjectionMatrix, viewSpacePosition),-viewSpacePosition.z);
|
||||
}
|
||||
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
uniform sampler2D colortex4;
|
||||
flat varying float exposure;
|
||||
|
||||
void main() {
|
||||
|
||||
gl_Position = ftransform();
|
||||
|
||||
#if defined ENCHANT_GLINT || defined SPIDER_EYES
|
||||
exposure = texelFetch2D(colortex4,ivec2(10,37),0).r;
|
||||
|
||||
vec3 position = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz;
|
||||
gl_Position = toClipSpace3(position);
|
||||
#else
|
||||
gl_Position = ftransform();
|
||||
#endif
|
||||
|
||||
texcoord = (gl_MultiTexCoord0).xy;
|
||||
#ifdef ENCHANT_GLINT
|
||||
|
@ -1018,7 +1018,6 @@ void main() {
|
||||
}
|
||||
#endif
|
||||
|
||||
// gl_FragData[0].rgb = vec3(1) ;
|
||||
|
||||
|
||||
/* DRAWBUFFERS:3 */
|
||||
|
@ -7,6 +7,7 @@ flat varying vec2 TAA_Offset;
|
||||
uniform sampler2D noisetex;
|
||||
uniform sampler2D depthtex0;
|
||||
uniform sampler2D depthtex1;
|
||||
uniform sampler2D depthtex2;
|
||||
uniform sampler2D colortex0;
|
||||
uniform sampler2D colortex1;
|
||||
uniform sampler2D colortex2;
|
||||
@ -17,12 +18,14 @@ uniform sampler2D colortex6;
|
||||
uniform sampler2D colortex7;
|
||||
uniform sampler2D colortex8;
|
||||
uniform sampler2D colortex9;
|
||||
uniform sampler2D colortex10;
|
||||
uniform sampler2D colortex11;
|
||||
uniform sampler2D colortex13;
|
||||
uniform sampler2D colortex15;
|
||||
uniform vec2 texelSize;
|
||||
|
||||
flat varying vec3 noooormal;
|
||||
|
||||
|
||||
flat varying vec4 lightCol; //main light source color (rgb),used light source(1=sun,-1=moon)
|
||||
flat varying vec3 WsunVec;
|
||||
|
||||
@ -262,6 +265,7 @@ void main() {
|
||||
|
||||
color = color*(1.0-TranslucentShader.a) + TranslucentShader.rgb;
|
||||
|
||||
|
||||
#ifdef BorderFog
|
||||
if(z < 1.0 && isEyeInWater == 0) color.rgb = mix(color.rgb, sky, fog);
|
||||
#endif
|
||||
@ -344,4 +348,5 @@ void main() {
|
||||
gl_FragData[0].r = vl.a * bloomyFogMult; // pass fog alpha so bloom can do bloomy fog
|
||||
|
||||
gl_FragData[1].rgb = clamp(color.rgb, 0.0,68000.0);
|
||||
|
||||
}
|
@ -3,6 +3,7 @@ varying vec2 texcoord;
|
||||
flat varying vec3 zMults;
|
||||
uniform float far;
|
||||
uniform float near;
|
||||
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
@ -10,6 +11,7 @@ uniform float near;
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
void main() {
|
||||
|
||||
zMults = vec3(1.0/(far * near),far+near,far-near);
|
||||
gl_Position = ftransform();
|
||||
texcoord = gl_MultiTexCoord0.xy;
|
||||
|
Reference in New Issue
Block a user