branch | v_0 |
changeset 16 | 0883358bc11d |
parent 15 | 1eb7cfefbeea |
child 18 | c4384f43c739 |
15:1eb7cfefbeea | 16:0883358bc11d |
---|---|
1 #version 330 core |
|
2 |
|
3 uniform sampler2D uTexture; |
|
4 in vec2 vTextureXY; |
|
5 out vec4 fColor; |
|
6 |
|
7 void main(){ |
|
8 fColor = texture(uTexture, vTextureXY).rgba; |
|
9 |
|
10 float width = 0.01; |
|
11 fColor.a *= smoothstep(0., 0.+width, vTextureXY.x); |
|
12 fColor.a *= smoothstep(1., 1.-width, vTextureXY.x); |
|
13 fColor.a *= smoothstep(0., 0.+width, vTextureXY.y); |
|
14 fColor.a *= smoothstep(1., 1.-width, vTextureXY.y); |
|
15 } |