mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-30 11:42:51 +08:00
merged my changes
- Moved rotate() to bokeh.glsl - Reduced sample array size from 1024 to 64 - Added jitter to particles
This commit is contained in:
@ -805,10 +805,6 @@ void GriAndEminShadowFix(
|
||||
WorldPos += Bias;
|
||||
}
|
||||
}
|
||||
|
||||
mat2 rotate(float angle){
|
||||
return mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
|
||||
}
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
@ -843,9 +839,10 @@ void main() {
|
||||
|
||||
|
||||
#ifdef DOF_JITTER
|
||||
vec2 jitter = jitter_offsets[1024 - (frameCounter % 1024)];
|
||||
jitter = rotate(frameTimeCounter) * jitter;
|
||||
vec2 jitter = clamp(jitter_offsets[frameCounter % 64], -1.0, 1.0);
|
||||
jitter = rotate(frameCounter) * jitter;
|
||||
jitter.y *= aspectRatio;
|
||||
jitter.x *= DOF_ANAMORPHIC_RATIO;
|
||||
jitter.xy *= 0.004 * JITTER_STRENGTH;
|
||||
|
||||
vec3 fragpos_DOF = toScreenSpace(vec3((texcoord + jitter)/RENDER_SCALE-vec2(tempOffset)*texelSize*0.5,z));
|
||||
|
Reference in New Issue
Block a user