Normal texture for Filter3D

Software: Away3D 4.x

Avatar
GoroMatsumoto, Sr. Member
Posted: 20 November 2012 07:28 PM   Total Posts: 166

I want use NormalMap as texture in Filter3D.

I don’t want to modify Away3D code.
Could you add it as property of “activate” function?

   

Avatar
Alejandro Santander, Administrator
Posted: 21 November 2012 04:35 AM   Total Posts: 414   [ # 1 ]

Hey,

Could you provide a a sample of what you’re talking about? Perhaps including some code?

 

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 21 November 2012 10:52 AM   Total Posts: 166   [ # 2 ]

I am writing my own SSAO as Filter3D.

I want rotate the ray hemisphere by normal information.(like attached one.)
http://www.john-chapman.net/content.php?id=8
(“Normal-oriented Hemisphere” in this page.)

In Away3D, I think that can be provided by PositionRenderer.
But, in View3D source, I can’t find it.

I want use that like this, (in Filter3D)

override public function activate(stage3DProxy Stage3DProxycamera Camera3DdepthTexture TexturenormalTexture Texture) : void
  {
   
var context Context3D stage3DProxy._context3D;

   
stage3DProxy.setTextureAt(1depthTexture);
   
stage3DProxy.setTextureAt(2normalTexture);

   
stage3DProxy.context3D.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT0_fc01);
  

Thank you.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X