Added lightly smoothed black frame around the screen.

This commit is contained in:
Filippo Scognamiglio
2014-11-11 14:51:24 +01:00
parent 5552bea525
commit 45ef5ee000
5 changed files with 22 additions and 30 deletions

View File

@@ -1,23 +0,0 @@
import QtQuick 2.2
ShaderEffect{
property variant source: framesource
property real screen_distorsion: shadersettings.screen_distortion
fragmentShader: "
uniform sampler2D source;
uniform highp float screen_distorsion;
varying highp vec2 qt_TexCoord0;
vec2 distortCoordinates(vec2 coords){
vec2 cc = coords - vec2(0.5);
float dist = dot(cc, cc) * screen_distorsion;
return (coords + cc * (1.0 + dist) * dist);
}
void main(){
vec2 coords = distortCoordinates(qt_TexCoord0);
float inside = texture2D(source, coords).a;
gl_FragColor = vec4(vec3(0.0), inside);
}"
}