Question about custom Post processing aa

  • Kleio420
  • Topic Author
More
8 years 2 months ago #1 by Kleio420 Question about custom Post processing aa was created by Kleio420
Im very new to programing shaders , this is a big request but if anyone has some free time and doesn't mind could someone outline some basics of ideas behind doing a post aa on a basic level showing the concepts of how one could and should work so i can look at it and learn from it using it as a base

Please Log in or Create an account to join the conversation.

  • kingeric1992
More
8 years 2 months ago - 8 years 2 months ago #2 by kingeric1992 Replied by kingeric1992 on topic Question about custom Post processing aa
I guess the general idea is to find edges --> by searching patterns, normals .etc and blur --> custom weighting on different size and scale accordingly.
(both can also take temporal and subpixel into account)

the goal is, for example
0.00|0.00|1.00|1.00|1.00
------------------------
1.00|1.00|1.00|1.00|1.00

to

0.00|0.25|0.50|0.75|1.00
------------------------
1.00|1.00|1.00|1.00|1.00
Last edit: 8 years 2 months ago by kingeric1992.

Please Log in or Create an account to join the conversation.

  • Kleio420
  • Topic Author
More
8 years 2 months ago #3 by Kleio420 Replied by Kleio420 on topic Question about custom Post processing aa

kingeric1992 wrote: I guess the general idea is to find edges --> by searching patterns and blur --> custom weighting accordingly.
(both can also take temporal and subpixel into account)

the goal is, for example

0.00|0.00|1.00|1.00|1.00
------------------------
1.00|1.00|1.00|1.00|1.00

to

0.00|0.25|0.50|0.75|1.00
------------------------
1.00|1.00|1.00|1.00|1.00

could if you don't mind helping me something im really interested into post aa in particular , give me a basic example based on reshades format so i can compare the dev explanation file with what u have then i can google what i dont know,I appreciate any help given

Please Log in or Create an account to join the conversation.

  • kingeric1992
More
8 years 2 months ago - 8 years 2 months ago #4 by kingeric1992 Replied by kingeric1992 on topic Question about custom Post processing aa
take this for example
0.00|0.00|0.00|0.00|0.00
------------------------
0.00|0.00|1.00|1.00|1.00
------------------------
1.00|1.00|1.00|1.00|1.00
if say (pseudo code)
scale = 2;
edgedirection.y = abs(right - middle);
edgedirection.x = abs(top - middle); //kinda like anisotropic bluring
edgerange = length(edgedirection);

color  = tex2d(texturein, middlecoord);
for(i=1; i<=scale , i++){
color += tex2d(texturein, middlecoord + edgerange * i * pixelsize * edgedirection);
color += tex2d(texturein, middlecoord - edgerange * i * pixelsize * edgedirection);
}
color /= scale*2 + 1;
return color;

you would get (assume sampling in clamp mode)
0.00|0.00|0.00|0.00|0.00
------------------------
0.00|0.40|0.60|0.80|1.00
------------------------
1.00|1.00|1.00|1.00|1.00
ofc the actual edge finding & weighting (using 1 here) would have more restrictions and depend on more terms, but you get the idea.
and since SMAA or FXAA are provided in framework, you can check their algorithm for details on how they sample and weight.
Last edit: 8 years 2 months ago by kingeric1992.
The following user(s) said Thank You: Kleio420

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.