SHADER模块整理,初始化代码移至main
This commit is contained in:
10
parts/shaders/grad2.glsl
Normal file
10
parts/shaders/grad2.glsl
Normal file
@@ -0,0 +1,10 @@
|
||||
extern float t,h;
|
||||
vec4 effect(vec4 color,Image text,vec2 pos,vec2 scr_pos){
|
||||
float y=scr_pos.y/h;
|
||||
return vec4(
|
||||
.8-y*.6,
|
||||
.2+y*.4,
|
||||
.3+.1*sin(t),
|
||||
1.
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user