Hi, yeah the fog method was working before hand. Here is the stack trace
Error: Error #3613: The native shader compilation failed.
at flash.display3D::Program3D/upload()
at away3d.core.managers::AGALProgram3DCache/setProgram3D()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\core\managers\AGALProgram3DCache.as:98]
at away3d.materials.passes::MaterialPassBase/updateProgram()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\materials\passes\MaterialPassBase.as:366]
at away3d.materials.passes::DefaultScreenPass/updateProgram()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\materials\passes\DefaultScreenPass.as:659]
at away3d.materials.passes::MaterialPassBase/activate()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\materials\passes\MaterialPassBase.as:261]
at away3d.materials.passes::DefaultScreenPass/activate()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\materials\passes\DefaultScreenPass.as:515]
at away3d.materials::MaterialBase/activatePass()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\materials\MaterialBase.as:350]
at away3d.core.render::DefaultRenderer/drawRenderables()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\core\render\DefaultRenderer.as:153]
at away3d.core.render::DefaultRenderer/draw()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\core\render\DefaultRenderer.as:102]
at away3d.core.render::RendererBase/executeRender()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\core\render\RendererBase.as:276]
at away3d.core.render::DefaultRenderer/executeRender()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\core\render\DefaultRenderer.as:62]
at away3d.core.render::RendererBase/render()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\core\render\RendererBase.as:240]
at away3d.containers::View3D/render()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\lib_3rd_party\away3d\containers\View3D.as:611]
at nzta.speedracer.game.view.game3d::Game3DView/update()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\src\nzta\speedracer\game\view\game3d\Game3DView.as:184]
at nzta.speedracer.game.view::GameView/update()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\src\nzta\speedracer\game\view\GameView.as:52]
at nzta.speedracer.game::GameMain/onEnterFrame()[C:\dev\workspace\NZTA_SpeedRacer_awayGold\build\flash\src\nzta\speedracer\game\GameMain.as:150]
The following code causes the error in Away3D 4.0 Gold:
var testMaterial:TextureMaterial = new TextureMaterial(new BitmapTexture(new BitmapData(16, 16, false, 0xff0000)));
testMaterial.addMethod(new FogMethod(0,500));
var testCube:Mesh = new Mesh(new CubeGeometry(1, 1, 1), testMaterial);
scene.addChild(testCube);