This is in reference to : https://github.com/away3d/away3d-examples-fp11/blob/dev/src/Intermediate_Globe.as
As seen here: http://www.infiniteturtles.co.uk/blog/away3d-with-flash-11-2-mouse-locking-all-over-the-world
It’s a great example of using custom shaders on diffuse bitmaps for sphereGeometry.
However, while using the LATEST dev git checkout, I have encountered 1 problem. To my understanding the upcoming GOLD 4.0 release will derive from the dev branch. So that is why I’m using it, as well as for testing purposes.
Line #365 in the example:
var viewDirFragmentReg:ShaderRegisterElement = atmosphereDiffuseMethod.viewDirFragmentReg;
As you can see it’s a variable declaration that is assigned the ‘viewDirFragmentReg’. This is apparently now PROTECTED by arcane.
override arcane function get viewDirFragmentReg() : ShaderRegisterElement
{
return _viewDirFragmentReg;
}
So it’s impossible to get the example running without modifying the materials.methods.CompositeDiffuseMethod with custom getter to return it (as well as the normalFragmentReg). Not difficult, but surely doing such is not intended by away3d?
I was wondering what the reason for protecting this by arcane might be, and also what is the PROPER way to resolve this issue? Clearly it was protected by arcane for a reason, like many internals to the engine itself. ?