changes since 1.0:
• v1.2 - added fog calculation to mask AO. Some minor fixes.
• v1.1 - replaced rings sampling with new spiral sampling method. Taken from HERE
Hi, may I ask you some questions about your algorithm? What does it mean on
1. #define DL 2.399963229728653", // PI * ( 3.0 - sqrt( 5.0 ) ) I have no idea why you use parameter 3, 5.
2. cameraCoef / ( cameraFarPlusNear - unpackDepth( texture2D( tDepth, coord ) ) * cameraFarMinusNear ); I understand unpackDepth( texture2D( tDepth, coord ) ) * cameraFarMinusNear would compute the world-view depth value, because clip space depth value is from 0.0 to 1.0 by starting from near plane to far plane. but I have no idea you need to use cameraCoef and cameraFarPlusNear.
Hey, 1. that part nicely calculates spiral alignment of samples. Made by far wiser people than myself. Got it from here (look in Spirals section): http://web.archive.org/web/20120421191837/http://www.cgafaq.info/wiki/Evenly_distributed_points_on_sphere
2. I am linearizing an exponential depth value there. I guess that is what unpackDepth thingy does. reference: http://www.ozone3d.net/blogs/lab/20090206/how-to-linearize-the-depth-value/
He martin, i want to tell you that none of your download link is working, and it is the same case in all of your download links you provide, please reprovide them and help me, please
hey man looks awesome, keep up the good work!! the only problem I have is it also put ao on my skybox...
ReplyDeleteHi, may I ask you some questions about your algorithm? What does it mean on
ReplyDelete1. #define DL 2.399963229728653", // PI * ( 3.0 - sqrt( 5.0 ) )
I have no idea why you use parameter 3, 5.
2. cameraCoef / ( cameraFarPlusNear - unpackDepth( texture2D( tDepth, coord ) ) * cameraFarMinusNear );
I understand unpackDepth( texture2D( tDepth, coord ) ) * cameraFarMinusNear would compute the world-view depth value, because clip space depth value is from 0.0 to 1.0 by starting from near plane to far plane. but I have no idea you need to use cameraCoef and cameraFarPlusNear.
Thanks
Hey,
Delete1. that part nicely calculates spiral alignment of samples. Made by far wiser people than myself. Got it from here (look in Spirals section):
http://web.archive.org/web/20120421191837/http://www.cgafaq.info/wiki/Evenly_distributed_points_on_sphere
2. I am linearizing an exponential depth value there. I guess that is what unpackDepth thingy does.
reference:
http://www.ozone3d.net/blogs/lab/20090206/how-to-linearize-the-depth-value/
Thanks for your sharing, Martins.
DeleteI understand it totally. You are so great, you really do a nice job.
Can you please re-upload the file?
ReplyDeleteI am unable to download it
I'd like to download it too. Would you be so kind to put it online?
ReplyDeleteHe martin, i want to tell you that none of your download link is working, and it is the same case in all of your download links you provide, please reprovide them and help me, please
ReplyDeletePlease help me brother
ReplyDelete