mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fixed the "edge" effect in the Shader sample
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1275 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
4c9f2e18cd
commit
fb543957ee
@ -21,7 +21,8 @@ void main()
|
||||
texture2D(texture, gl_TexCoord[0].xy + offx - offy) * 1.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy + offx + offy) * -1.0;
|
||||
|
||||
float edge = sqrt(hEdge.rgb * hEdge.rgb + vEdge.rgb * vEdge.rgb);
|
||||
vec3 result = sqrt(hEdge.rgb * hEdge.rgb + vEdge.rgb * vEdge.rgb);
|
||||
float edge = length(result);
|
||||
if (edge > threshold)
|
||||
gl_FragColor.rgb = vec3(0, 0, 0);
|
||||
else
|
||||
|
@ -163,7 +163,7 @@ int main()
|
||||
{
|
||||
// Download a file from server
|
||||
std::string filename, directory;
|
||||
std::cout << "filename of the file to download (relative to current directory): ";
|
||||
std::cout << "Filename of the file to download (relative to current directory): ";
|
||||
std::cin >> filename;
|
||||
std::cout << "Directory to download the file to: ";
|
||||
std::cin >> directory;
|
||||
|
Loading…
Reference in New Issue
Block a user