SHADER模块整理,初始化代码移至main

This commit is contained in:
MrZ626
2020-11-16 09:21:22 +08:00
parent ba486b5de7
commit f1f2eb583f
19 changed files with 55 additions and 59 deletions

View File

@@ -0,0 +1,8 @@
extern float w,h;
extern float level;
vec4 effect(vec4 color,Image text,vec2 pos,vec2 scr_pos){
float dx=abs(scr_pos.x/w-0.5);
float dy=abs(scr_pos.y/h-0.5);
float a=(max(dx*2.6,dy*1.8)-.626)*level;
return vec4(1.,0.,0.,a);
}