AGAL get angle in fragment shader?

Software: Away3D 4.x

3dNewb, Sr. Member
Posted: 12 April 2012 07:49 PM   Total Posts: 105

I’ve now made some basic shaders and I understand the general functioning of shaders within away3d. It’s actually quite smart in how it is constructed.

Does anybody know if it is possible to get the angle of the face in the fragment shader?

My intention is to change the color of the face depening on the horizontal angle. Not sure if this is possible at all…

   

3dNewb, Sr. Member
Posted: 14 April 2012 10:33 AM   Total Posts: 105   [ # 1 ]

Fixed it! smile

Obviously I had to use the normalsRegister, which does exactly what I needed.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X