Made a start on a SS Ambient Obscurance pass…

Software: Away3D 4.x

Mr Margaret Scratcher, Sr. Member
Posted: 01 April 2014 11:38 PM   Total Posts: 344

...admittedly I think for a first project in AGAL/away3d it was probably a little ambitious, and so predictably it does not work red face

Buuuut, hopefully I’ve helped someone buy doing a lot of the work converting the code here:
http://blog.bwhiting.co.uk/?p=383

to work in away3d

Anyways, here it is:


http://www.margaretscratcher.co.uk/projects/SSAmbOccPass.as

I’m getting lots of “Temporary register read without being written to for source operand 2 at token 6 of fragment program.” type errors, butI think the actual fragment shader bit, apart from the tokens which are left commented out, should be all good, it’s just plumbing everything else into/out of it.

I’m hoping someone who knows a bit more (pretty much anything smile )about AGAL can take over where I’ve got to and get it working. cool smile

 

   

Avatar
theMightyAtom, Sr. Member
Posted: 02 April 2014 08:05 PM   Total Posts: 669   [ # 1 ]

I managed to debug the code that’s there, so it runs without error, though without a visible result.
It’s missing one vital ingredient. It needs to be fed the DepthMapPass as a texture in order to run, and so far I haven’t been able to get hold of that.
I can render the depthMapPass to screen, but I can’t figure out how to render it to a usable texture inside the SSAmbOccPass.

http://www.videometry.net/away3d/SSAO/SSAmbOccPass.as

http://www.videometry.net/away3d/SSAO/SSAmbMaterial.as

I put the loop back in, so it makes 8 samples.

Anybody know how to get hold of the DepthMapPass to use as a texture in another pass?

Cheers!

   

Avatar
theMightyAtom, Sr. Member
Posted: 03 April 2014 05:56 PM   Total Posts: 669   [ # 2 ]

UPDATE

First off ignore the above. This can’t be implemented as a material pass, it needs to be a filter3D, as it operates on the entire scene (duh!)

I’ll attempt to convert it.

Cheers!

   

Mr Margaret Scratcher, Sr. Member
Posted: 03 April 2014 07:14 PM   Total Posts: 344   [ # 3 ]

Of course!

I did think this, but could not find any instructions on how 3d filters were made..

Intrigued to see how it comes out!

   

Avatar
theMightyAtom, Sr. Member
Posted: 03 April 2014 07:37 PM   Total Posts: 669   [ # 4 ]

You’re welcome to keep trying as well smile

I’m getting some help with it on the Stage3D group on facebook. You should join if you haven’t already. Friendly bunch, plenty of activity, and as long as no one mentions how “flash is dead” it’s a lot of fun smile

https://www.facebook.com/groups/stage3d/

   

John Brookes, Moderator
Posted: 04 April 2014 10:41 AM   Total Posts: 732   [ # 5 ]

YAY for secret communities requiring login :/

   

Avatar
theMightyAtom, Sr. Member
Posted: 04 April 2014 11:14 AM   Total Posts: 669   [ # 6 ]

Like this one John smile

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X