Question about custom Post processing aa
- Kleio420
- Topic Author
Less
More
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
Less
More
8 years 1 month ago - 8 years 1 month 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
(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 1 month ago by kingeric1992.
Please Log in or Create an account to join the conversation.
- Kleio420
- Topic Author
Less
More
8 years 1 month ago #3
by Kleio420
Replied by Kleio420 on topic Question about custom Post processing aa
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 givenkingeric1992 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 example0.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
Please Log in or Create an account to join the conversation.
- kingeric1992
Less
More
8 years 1 month ago - 8 years 1 month ago #4
by kingeric1992
Replied by kingeric1992 on topic Question about custom Post processing aa
take this for exampleif say (pseudo code)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.
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
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
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 1 month ago by kingeric1992.
The following user(s) said Thank You: Kleio420
Please Log in or Create an account to join the conversation.