mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 08:42:50 +08:00
fixed + integrated jitter dof
This commit is contained in:
@ -159,16 +159,18 @@ void main() {
|
||||
|
||||
WsunVec = lightCol.a*normalize(mat3(gbufferModelViewInverse) *sunPosition);
|
||||
|
||||
#ifdef DOF_JITTER
|
||||
#if DOF_QUALITY == 5
|
||||
vec2 jitter = clamp(jitter_offsets[frameCounter % 64], -1.0, 1.0);
|
||||
jitter = rotate(radians(float(frameCounter))) * jitter;
|
||||
jitter.y *= aspectRatio;
|
||||
jitter.x *= DOF_ANAMORPHIC_RATIO;
|
||||
|
||||
#if DOF_JITTER_FOCUS < 0
|
||||
#if MANUAL_FOCUS == -2
|
||||
float focusMul = 0;
|
||||
#elif MANUAL_FOCUS == -1
|
||||
float focusMul = gl_Position.z - mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
|
||||
#else
|
||||
float focusMul = gl_Position.z - DOF_JITTER_FOCUS;
|
||||
float focusMul = gl_Position.z - MANUAL_FOCUS;
|
||||
#endif
|
||||
|
||||
vec2 totalOffset = (jitter * JITTER_STRENGTH) * focusMul * 1e-2;
|
||||
|
Reference in New Issue
Block a user