Hi,
First: sorry for my bad English^^
Here is my problem: I would like to enable antialiasing on renderTexture. It seems to be impossible. So, Laurent Gomila say me to use shaders.
But they don't work...
I test with that shader:
uniform sampler2D texture;
uniform float blink_alpha;
void main()
{
vec4 pixel = gl_Color;
pixel.a = blink_alpha;
gl_FragColor = pixel;
}
And here is my shader loading:
public static Shader FXAA;
if (!Shader.isAvailable()) {
Log.OutError("Impossible de prendre en charge les shader...");
}
FXAA = new Shader();
Path ShaderPath = FileSystems.getDefault().getPath("blink.frag");
FXAA.loadFromFile(ShaderPath, Shader.Type.FRAGMENT);
FXAA.setParameter("blink_alpha", 125);
RenderTexture.draw(obj, new RenderStates(FXAA));
But i get a black screen. Without shader, all is fine.
If I use the shader test of jsfml :
void main()
{
//Compute level of gray
float gray = dot(gl_Color.rgb, vec3(0.299, 0.587, 0.114));
//Write destination color
gl_FragColor = vec4(gray, gray, gray, gl_Color.a);
}
I get this: All is good, but not the text:
Really thanks to you to help me...