mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 08:42:50 +08:00
Merge branch 'main' of https://github.com/X0nk/Bliss-Shader
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
//#extension GL_EXT_gpu_shader4 : disable
|
||||
#include "/lib/settings.glsl"
|
||||
#include "/lib/res_params.glsl"
|
||||
#include "/lib/bokeh.glsl"
|
||||
|
||||
/*
|
||||
!! DO NOT REMOVE !!
|
||||
@ -60,6 +61,14 @@ flat varying float HELD_ITEM_BRIGHTNESS;
|
||||
flat varying int PHYSICSMOD_SNOW;
|
||||
flat varying int NameTags;
|
||||
|
||||
uniform int frameCounter;
|
||||
uniform float far;
|
||||
uniform float aspectRatio;
|
||||
uniform float viewHeight;
|
||||
uniform float viewWidth;
|
||||
uniform int hideGUI;
|
||||
uniform float screenBrightness;
|
||||
|
||||
flat varying float SSSAMOUNT;
|
||||
flat varying float EMISSIVE;
|
||||
flat varying int LIGHTNING;
|
||||
@ -370,4 +379,20 @@ void main() {
|
||||
gl_Position.xy += offsets[framemod8] * gl_Position.w * texelSize;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DOF_JITTER
|
||||
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
|
||||
float focusMul = gl_Position.z - mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
|
||||
#else
|
||||
float focusMul = gl_Position.z - DOF_JITTER_FOCUS;
|
||||
#endif
|
||||
|
||||
vec2 totalOffset = (jitter * JITTER_STRENGTH) * focusMul * 1e-2;
|
||||
gl_Position.xy += hideGUI >= 1 ? totalOffset : vec2(0);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user