mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 00:37:35 +08:00
improve fog upsampler and filtered effects upsampler. improve metals in specular reflections. fix end and nether not compiling, and fix SSAO making them black. redo water shader. added water caustics strength misc setting. add 2 new post process types "xonk tonemapp" and "full reinhard". create overdraw prevention for DH shadowmap. fix SSS with dh shadowmap. tweak screenspace shadow SSS to be better in the distance. add fog behind glass. move water fog to be done in the fog behind glass pass.
This commit is contained in:
71
shaders/dimensions/fogBehindTranslucent_pass.vsh
Normal file
71
shaders/dimensions/fogBehindTranslucent_pass.vsh
Normal file
@ -0,0 +1,71 @@
|
||||
#include "/lib/settings.glsl"
|
||||
#include "/lib/util.glsl"
|
||||
#include "/lib/res_params.glsl"
|
||||
|
||||
flat varying vec4 lightCol;
|
||||
flat varying vec3 averageSkyCol;
|
||||
flat varying vec3 averageSkyCol_Clouds;
|
||||
|
||||
flat varying vec3 WsunVec;
|
||||
flat varying vec3 refractedSunVec;
|
||||
|
||||
flat varying float tempOffsets;
|
||||
|
||||
uniform sampler2D colortex4;
|
||||
|
||||
uniform float sunElevation;
|
||||
uniform vec2 texelSize;
|
||||
uniform vec3 sunPosition;
|
||||
uniform mat4 gbufferModelViewInverse;
|
||||
uniform int frameCounter;
|
||||
|
||||
|
||||
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
|
||||
uniform float frameTimeCounter;
|
||||
#include "/lib/Shadow_Params.glsl"
|
||||
#include "/lib/sky_gradient.glsl"
|
||||
|
||||
void main() {
|
||||
gl_Position = ftransform();
|
||||
|
||||
// gl_Position.xy = (gl_Position.xy*0.5+0.5)*0.51*2.0-1.0;
|
||||
gl_Position.xy = (gl_Position.xy*0.5+0.5)*(0.01+VL_RENDER_RESOLUTION)*2.0-1.0;
|
||||
|
||||
#ifdef TAA
|
||||
tempOffsets = HaltonSeq2(frameCounter%10000);
|
||||
#else
|
||||
tempOffsets = 0.0;
|
||||
#endif
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
lightCol.rgb = texelFetch2D(colortex4,ivec2(6,37),0).rgb;
|
||||
averageSkyCol = texelFetch2D(colortex4,ivec2(1,37),0).rgb;
|
||||
averageSkyCol_Clouds = texelFetch2D(colortex4,ivec2(0,37),0).rgb;
|
||||
#endif
|
||||
|
||||
#ifdef NETHER_SHADER
|
||||
lightCol.rgb = vec3(0.0);
|
||||
averageSkyCol = vec3(0.0);
|
||||
averageSkyCol_Clouds = vec3(2.0, 1.0, 0.5) * 30.0;
|
||||
#endif
|
||||
|
||||
#ifdef END_SHADER
|
||||
lightCol.rgb = vec3(0.0);
|
||||
averageSkyCol = vec3(0.0);
|
||||
averageSkyCol_Clouds = vec3(5.0);
|
||||
#endif
|
||||
|
||||
|
||||
lightCol.a = float(sunElevation > 1e-5)*2.0 - 1.0;
|
||||
WsunVec = lightCol.a * normalize(mat3(gbufferModelViewInverse) * sunPosition);
|
||||
// WsunVec = normalize(LightDir);
|
||||
|
||||
refractedSunVec = refract(WsunVec, -vec3(0.0,1.0,0.0), 1.0/1.33333);
|
||||
}
|
Reference in New Issue
Block a user