mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-27 02:32:39 +08:00
tweaks to subsurface scattering, improve SSS in the distance. make screenspace shadows have consistent step length across all window resolutions. tweak torch lighting (make it slightly brighter and a warmer color). tweak TAA handling of the hand. tweak specular reflection handling of the hand to be slightly more stable. make the shader use moonPosition instead of inverted sunPosition for moon related code. add support for Caelium moon positions. improve water parallax. remove some unused code improve specular handling of translucent entities with inside faces (slimes). add settings for refraction effects. re-enable block breaking effect and glass tint (it was off accidentally lol)
This commit is contained in:
@ -12,9 +12,11 @@
|
||||
|
||||
|
||||
flat varying vec3 WsunVec;
|
||||
flat varying vec3 WmoonVec;
|
||||
flat varying vec3 unsigned_WsunVec;
|
||||
flat varying vec3 averageSkyCol_Clouds;
|
||||
flat varying vec4 lightCol;
|
||||
flat varying vec3 moonCol;
|
||||
|
||||
flat varying float exposure;
|
||||
|
||||
@ -27,6 +29,8 @@ uniform float near;
|
||||
|
||||
uniform mat4 gbufferModelViewInverse;
|
||||
uniform vec3 sunPosition;
|
||||
uniform vec3 moonPosition;
|
||||
|
||||
uniform float rainStrength;
|
||||
uniform float sunElevation;
|
||||
uniform int frameCounter;
|
||||
@ -52,10 +56,20 @@ void main() {
|
||||
lightCol.rgb = texelFetch2D(colortex4,ivec2(6,37),0).rgb;
|
||||
lightCol.a = float(sunElevation > 1e-5)*2.0 - 1.0;
|
||||
|
||||
moonCol = texelFetch2D(colortex4,ivec2(9,37),0).rgb;
|
||||
|
||||
averageSkyCol_Clouds = texelFetch2D(colortex4,ivec2(0,37),0).rgb;
|
||||
|
||||
unsigned_WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition);
|
||||
WsunVec = lightCol.a*unsigned_WsunVec;
|
||||
|
||||
vec3 moonVec = normalize(mat3(gbufferModelViewInverse) * moonPosition);
|
||||
|
||||
WmoonVec = moonVec;
|
||||
|
||||
if(dot(-moonVec, unsigned_WsunVec) < 0.9999) WmoonVec = -moonVec;
|
||||
|
||||
WsunVec = mix(WmoonVec, unsigned_WsunVec, clamp(lightCol.a,0,1));
|
||||
|
||||
|
||||
exposure = texelFetch2D(colortex4,ivec2(10,37),0).r;
|
||||
|
||||
|
Reference in New Issue
Block a user