mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-27 02:32:39 +08:00
do bilateral upsample on volumetrics to fix pixel gaps around geometry edges. quickly add lava cauldron a lightsource
This commit is contained in:
@ -343,20 +343,16 @@ void main() {
|
||||
float noise = R2_dither();
|
||||
vec2 texcoord = gl_FragCoord.xy*texelSize;
|
||||
|
||||
float z = texture(depthtex1,texcoord).x;
|
||||
// float z = texelFetch2D(depthtex1,ivec2(gl_FragCoord.xy),0).x;
|
||||
float z = texelFetch2D(depthtex0,ivec2(gl_FragCoord.xy),0).x;
|
||||
|
||||
#ifdef DISTANT_HORIZONS
|
||||
float DH_depth1 = texture2D(dhDepthTex1,texcoord).x;
|
||||
float DH_depth1 = texelFetch2D(dhDepthTex1,ivec2(gl_FragCoord.xy),0).x;
|
||||
float swappedDepth = z >= 1.0 ? DH_depth1 : z;
|
||||
#else
|
||||
float DH_depth1 = 1.0;
|
||||
float swappedDepth = z;
|
||||
#endif
|
||||
|
||||
|
||||
vec4 SHADOWDATA = vec4(0.0);
|
||||
|
||||
vec4 data = texelFetch2D(colortex1,ivec2(gl_FragCoord.xy),0);
|
||||
vec4 dataUnpacked0 = vec4(decodeVec2(data.x),decodeVec2(data.y));
|
||||
vec4 dataUnpacked1 = vec4(decodeVec2(data.z),decodeVec2(data.w));
|
||||
@ -364,7 +360,7 @@ void main() {
|
||||
vec2 lightmap = dataUnpacked1.yz;
|
||||
|
||||
|
||||
gl_FragData[1] = vec4(0.0,0.0,0.0, texture2D(colortex14,floor(gl_FragCoord.xy)/VL_RENDER_RESOLUTION*texelSize+0.5*texelSize).a);
|
||||
gl_FragData[1] = vec4(0.0,0.0,0.0, texelFetch2D(colortex14,ivec2((floor(gl_FragCoord.xy)/VL_RENDER_RESOLUTION*texelSize+0.5*texelSize)/texelSize),0).a);
|
||||
|
||||
|
||||
// bool lightningBolt = abs(dataUnpacked1.w-0.5) <0.01;
|
||||
|
Reference in New Issue
Block a user