2023-01-13 04:00:14 +08:00
|
|
|
#version 120
|
2023-07-07 20:56:38 +08:00
|
|
|
#include "/lib/settings.glsl"
|
|
|
|
#include "/lib/res_params.glsl"
|
2023-04-17 04:18:26 +08:00
|
|
|
uniform float viewWidth;
|
|
|
|
uniform float viewHeight;
|
2023-01-13 04:00:14 +08:00
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
|
|
|
|
void main() {
|
2023-04-17 04:18:26 +08:00
|
|
|
//Improves performances and makes sure bloom radius stays the same at high resolution (>1080p)
|
|
|
|
vec2 clampedRes = max(vec2(viewWidth,viewHeight),vec2(1920.0,1080.));
|
2023-01-13 04:00:14 +08:00
|
|
|
gl_Position = ftransform();
|
2023-04-17 04:18:26 +08:00
|
|
|
//*0.51 to avoid errors when sampling outside since clearing is disabled
|
|
|
|
gl_Position.xy = (gl_Position.xy*0.5+0.5)*0.26*BLOOM_QUALITY/clampedRes*vec2(1920.0,1080.)*2-1.0;
|
2023-01-13 04:00:14 +08:00
|
|
|
}
|