1
General / Re: Understanding memory usage of my application
« on: November 14, 2015, 01:56:20 pm »
Hi! Thanks for all the suggestions. It will take me a while to give them a go. I will do and I'll get back with my findings.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
texture framebuffer
vec3 color
effect
{
// Get the value of the current screen pixel
vec4 pixel = framebuffer(_in);
// Compute its gray level
float gray = pixel.r * 0.39 + pixel.g * 0.50 + pixel.b * 0.11;
// Finally write the output pixel using 50% of the source pixel and 50% of its colored version
_out = vec4(gray * color, 1.0) * 0.5 + pixel * 0.5;
}
using SFML.Graphics;
namespace SFMLTest
{
class TestMain
{
static void Main()
{
PostFx fx = null;
if (PostFx.CanUsePostFX)
{
string filename = "fx/grey.sfx";
fx = new PostFx(filename);
}
}
}
}