Moved stuff
This commit is contained in:
parent
a4dd76a186
commit
5377458895
234 changed files with 12 additions and 1 deletions
15
src/assets/shaders/sdf.frag
Normal file
15
src/assets/shaders/sdf.frag
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#version 120
|
||||
|
||||
varying vec2 fragTexCoord;
|
||||
varying vec4 fragColor;
|
||||
|
||||
uniform sampler2D texture0;
|
||||
uniform vec4 colDiffuse;
|
||||
|
||||
const float smoothing = 1.0/16.0;
|
||||
|
||||
void main() {
|
||||
float distance = texture2D(texture0, fragTexCoord).a;
|
||||
float alpha = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance);
|
||||
gl_FragColor = vec4(fragColor.rgb, fragColor.a * alpha);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue