mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-22 17:47:34 +08:00
fixed focus laser, improved F1 TAA behaviour
This commit is contained in:
parent
b001f98071
commit
26c35b59b0
@ -65,6 +65,7 @@ uniform mat4 shadowProjection;
|
|||||||
uniform mat4 gbufferModelView;
|
uniform mat4 gbufferModelView;
|
||||||
// uniform float viewWidth;
|
// uniform float viewWidth;
|
||||||
// uniform float viewHeight;
|
// uniform float viewHeight;
|
||||||
|
uniform int hideGUI;
|
||||||
uniform float aspectRatio;
|
uniform float aspectRatio;
|
||||||
uniform vec2 texelSize;
|
uniform vec2 texelSize;
|
||||||
uniform vec3 cameraPosition;
|
uniform vec3 cameraPosition;
|
||||||
@ -1176,6 +1177,31 @@ void main() {
|
|||||||
// gl_FragData[0].rgb = vec3(1.0);
|
// gl_FragData[0].rgb = vec3(1.0);
|
||||||
// if(z < 1) gl_FragData[0].rgb = Custom_GGX(normal, -np3, WsunVec, SpecularTex.r, SpecularTex.g) * vec3(1.0);
|
// if(z < 1) gl_FragData[0].rgb = Custom_GGX(normal, -np3, WsunVec, SpecularTex.r, SpecularTex.g) * vec3(1.0);
|
||||||
|
|
||||||
|
#ifdef DOF_JITTER
|
||||||
|
vec3 laserColor;
|
||||||
|
#if FOCUS_LASER_COLOR == 0 // Red
|
||||||
|
laserColor = vec3(25, 0, 0);
|
||||||
|
#elif FOCUS_LASER_COLOR == 1 // Green
|
||||||
|
laserColor = vec3(0, 25, 0);
|
||||||
|
#elif FOCUS_LASER_COLOR == 2 // Blue
|
||||||
|
laserColor = vec3(0, 0, 25);
|
||||||
|
#elif FOCUS_LASER_COLOR == 3 // Pink
|
||||||
|
laserColor = vec3(25, 10, 15);
|
||||||
|
#elif FOCUS_LASER_COLOR == 4 // Yellow
|
||||||
|
laserColor = vec3(25, 25, 0);
|
||||||
|
#elif FOCUS_LASER_COLOR == 5 // White
|
||||||
|
laserColor = vec3(25);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if DOF_JITTER_FOCUS < 0
|
||||||
|
float focusDist = mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
|
||||||
|
#else
|
||||||
|
float focusDist = DOF_JITTER_FOCUS;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if( hideGUI < 1.0) gl_FragData[0].rgb += laserColor * pow( clamp( 1.0-abs(focusDist-abs(fragpos.z)) ,0,1),25) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* DRAWBUFFERS:3 */
|
/* DRAWBUFFERS:3 */
|
||||||
}
|
}
|
@ -40,7 +40,6 @@ uniform float near;
|
|||||||
uniform int frameCounter;
|
uniform int frameCounter;
|
||||||
uniform float aspectRatio;
|
uniform float aspectRatio;
|
||||||
uniform float screenBrightness;
|
uniform float screenBrightness;
|
||||||
uniform float hideGUI;
|
|
||||||
uniform float rainStrength;
|
uniform float rainStrength;
|
||||||
uniform float sunElevation;
|
uniform float sunElevation;
|
||||||
uniform ivec2 eyeBrightnessSmooth;
|
uniform ivec2 eyeBrightnessSmooth;
|
||||||
@ -234,31 +233,6 @@ void main() {
|
|||||||
|
|
||||||
waterVolumetrics(vl, vec3(0.0), fragpos, estEyeDepth, estEyeDepth, length(fragpos), noise, totEpsilon, scatterCoef, (ambientUp*8./150./3.*0.5) , lightCol.rgb*8./150./3.0*(1.0-pow(1.0-sunElevation*lightCol.a,5.0)), dot(normalize(fragpos), normalize(sunVec) ));
|
waterVolumetrics(vl, vec3(0.0), fragpos, estEyeDepth, estEyeDepth, length(fragpos), noise, totEpsilon, scatterCoef, (ambientUp*8./150./3.*0.5) , lightCol.rgb*8./150./3.0*(1.0-pow(1.0-sunElevation*lightCol.a,5.0)), dot(normalize(fragpos), normalize(sunVec) ));
|
||||||
|
|
||||||
// #ifdef DOF_JITTER
|
|
||||||
// vec3 laserColor;
|
|
||||||
// #if FOCUS_LASER_COLOR == 0 // Red
|
|
||||||
// laserColor = vec3(25, 0, 0);
|
|
||||||
// #elif FOCUS_LASER_COLOR == 1 // Green
|
|
||||||
// laserColor = vec3(0, 25, 0);
|
|
||||||
// #elif FOCUS_LASER_COLOR == 2 // Blue
|
|
||||||
// laserColor = vec3(0, 0, 25);
|
|
||||||
// #elif FOCUS_LASER_COLOR == 3 // Pink
|
|
||||||
// laserColor = vec3(25, 10, 15);
|
|
||||||
// #elif FOCUS_LASER_COLOR == 4 // Yellow
|
|
||||||
// laserColor = vec3(25, 25, 0);
|
|
||||||
// #elif FOCUS_LASER_COLOR == 5 // White
|
|
||||||
// laserColor = vec3(25);
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
// #if DOF_JITTER_FOCUS < 0
|
|
||||||
// float focusDist = mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
|
|
||||||
// #else
|
|
||||||
// float focusDist = DOF_JITTER_FOCUS;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
// if( hideGUI < 1.0) gl_FragData[0].rgb += laserColor * pow( clamp( 1.0-abs(focusDist-abs(fragpos.z)) ,0,1),25) ;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
gl_FragData[0] = clamp(vec4(vl,1.0),0.000001,65000.);
|
gl_FragData[0] = clamp(vec4(vl,1.0),0.000001,65000.);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,7 @@ uniform vec2 texelSize;
|
|||||||
uniform float frameTimeCounter;
|
uniform float frameTimeCounter;
|
||||||
uniform float viewHeight;
|
uniform float viewHeight;
|
||||||
uniform float viewWidth;
|
uniform float viewWidth;
|
||||||
|
uniform int hideGUI;
|
||||||
uniform int frameCounter;
|
uniform int frameCounter;
|
||||||
uniform int framemod8;
|
uniform int framemod8;
|
||||||
uniform vec3 previousCameraPosition;
|
uniform vec3 previousCameraPosition;
|
||||||
@ -454,8 +455,12 @@ void main() {
|
|||||||
#ifndef SPLIT_RENDER
|
#ifndef SPLIT_RENDER
|
||||||
#ifdef SCREENSHOT_MODE
|
#ifdef SCREENSHOT_MODE
|
||||||
|
|
||||||
|
vec4 color;
|
||||||
vec4 color = TAA_hq_render();
|
if(hideGUI >= 1) {
|
||||||
|
color = TAA_hq_render();
|
||||||
|
} else {
|
||||||
|
color = vec4(clamp(fp10Dither(texture2D(colortex3,texcoord).rgb,triangularize(interleaved_gradientNoise())),0.,65000.), 0.0);
|
||||||
|
}
|
||||||
gl_FragData[0] = color;
|
gl_FragData[0] = color;
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ screen = \
|
|||||||
screen.JITTER_DOF = \
|
screen.JITTER_DOF = \
|
||||||
DOF_JITTER DOF_JITTER_SHADOW \
|
DOF_JITTER DOF_JITTER_SHADOW \
|
||||||
DOF_JITTER_FOCUS JITTER_STRENGTH \
|
DOF_JITTER_FOCUS JITTER_STRENGTH \
|
||||||
DOF_CAMERA_WIDTH aperture_stops
|
DOF_CAMERA_WIDTH FOCUS_LASER_COLOR \
|
||||||
|
|
||||||
######## LIGHTING
|
######## LIGHTING
|
||||||
### DIRECT LIGHT
|
### DIRECT LIGHT
|
||||||
|
Loading…
Reference in New Issue
Block a user