mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 00:37:35 +08:00
INTERNAL REWORK. testers are needed.
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
uniform float viewWidth;
|
||||
uniform float viewHeight;
|
||||
varying vec2 texcoord;
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
@ -8,11 +7,9 @@ varying vec2 texcoord;
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
void main() {
|
||||
vec2 clampedRes = max(vec2(viewWidth,viewHeight),vec2(1920.0,1080.0));
|
||||
//Improves performances and makes sure bloom radius stays the same at high resolution (>1080p)
|
||||
vec2 clampedRes = max(vec2(viewWidth,viewHeight),vec2(1920.0,1080.));
|
||||
gl_Position = ftransform();
|
||||
//0-0.25
|
||||
gl_Position.y = (gl_Position.y*0.5+0.5)*0.25/clampedRes.y*1080.0*2.0-1.0;
|
||||
//0-0.5
|
||||
gl_Position.x = (gl_Position.x*0.5+0.5)*0.5/clampedRes.x*1920.0*2.0-1.0;
|
||||
texcoord = gl_MultiTexCoord0.xy/clampedRes*vec2(1920.,1080.);
|
||||
//*0.51 to avoid errors when sampling outside since clearing is disabled
|
||||
gl_Position.xy = (gl_Position.xy*0.5+0.5)*0.51/clampedRes*vec2(1920.0,1080.)*2.0-1.0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user