mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 08:42:50 +08:00
WIP nether shader
This commit is contained in:
@ -49,7 +49,6 @@ uniform ivec2 eyeBrightnessSmooth;
|
||||
|
||||
|
||||
#include "/lib/util.glsl"
|
||||
#include "/lib/ROBOBO_sky.glsl"
|
||||
|
||||
|
||||
vec3 toShadowSpaceProjected(vec3 p3){
|
||||
@ -70,6 +69,8 @@ float blueNoise(){
|
||||
vec4 lightCol = vec4(lightSourceColor, float(sunElevation > 1e-5)*2-1.);
|
||||
const float[17] Slightmap = float[17](14.0,17.,19.0,22.0,24.0,28.0,31.0,40.0,60.0,79.0,93.0,110.0,132.0,160.0,197.0,249.0,249.0);
|
||||
|
||||
#include "/lib/nether_fog.glsl"
|
||||
|
||||
void main() {
|
||||
/* DRAWBUFFERS:4 */
|
||||
|
||||
@ -81,12 +82,21 @@ if (gl_FragCoord.x > 18.+257. && gl_FragCoord.y > 1. && gl_FragCoord.x < 18+257+
|
||||
vec2 p = clamp(floor(gl_FragCoord.xy-vec2(18.+257,1.))/256.+tempOffsets/256.,0.0,1.0);
|
||||
vec3 viewVector = cartToSphere(p);
|
||||
|
||||
vec3 BackgroundColor = (gl_Fog.color.rgb / max(dot(gl_Fog.color.rgb,vec3(0.3333)),0.01)) * 3.0;
|
||||
BackgroundColor *= abs(viewVector.y+0.5);
|
||||
// vec3 BackgroundColor = (gl_Fog.color.rgb / max(dot(gl_Fog.color.rgb,vec3(0.3333)),0.01)) / 30.0;
|
||||
// BackgroundColor *= abs(viewVector.y+0.5);
|
||||
vec3 BackgroundColor = vec3(0.0);
|
||||
|
||||
vec4 VL_Fog = GetVolumetricFog(mat3(gbufferModelView)*viewVector*1024., fract(frameCounter/1.6180339887));
|
||||
BackgroundColor += VL_Fog.rgb/5;
|
||||
|
||||
gl_FragData[0] = vec4(BackgroundColor,1.0);
|
||||
}
|
||||
|
||||
//Temporally accumulate sky and light values
|
||||
vec3 temp = texelFetch2D(colortex4,ivec2(gl_FragCoord.xy),0).rgb;
|
||||
vec3 curr = gl_FragData[0].rgb*150.;
|
||||
gl_FragData[0].rgb = clamp(mix(temp,curr,0.07),0.0,65000.);
|
||||
|
||||
//Exposure values
|
||||
if (gl_FragCoord.x > 10. && gl_FragCoord.x < 11. && gl_FragCoord.y > 19.+18. && gl_FragCoord.y < 19.+18.+1 )
|
||||
gl_FragData[0] = vec4(exposure,avgBrightness,exposureF,1.0);
|
||||
|
Reference in New Issue
Block a user