imclover07 / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

Rendering material with NormalMap crashes if more than 3 lights affect the material #179

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Create a BitmapMaterial with a normalMap texture and assign to its lights 
property an array with four PointLight objects.

When rendered it throws the following exception:
Error: Register overflow!
    at RegisterPool/requestFreeVectorReg()[away3d_4.0\src\away3d\materials\utils\RegisterPool.as:46]
    at away3d.materials.utils::ShaderRegisterCache/getFreeVarying()[away3d_4.0\src\away3d\materials\utils\ShaderRegisterCache.as:114]
    at away3d.lights::PointLight/getVertexCode()[away3d_4.0\src\away3d\lights\PointLight.as:173]
    at away3d.materials.passes::DefaultScreenPass/compileLightDirCode()[away3d_4.0\src\away3d\materials\passes\DefaultScreenPass.as:820]
    at away3d.materials.passes::DefaultScreenPass/compile()[away3d_4.0\src\away3d\materials\passes\DefaultScreenPass.as:538]
    at away3d.materials.passes::DefaultScreenPass/reset()[away3d_4.0\src\away3d\materials\passes\DefaultScreenPass.as:501]
    at away3d.materials.passes::DefaultScreenPass/updateProgram()[away3d_4.0\src\away3d\materials\passes\DefaultScreenPass.as:450]
    at away3d.materials.passes::MaterialPassBase/activate()[away3d_4.0\src\away3d\materials\passes\MaterialPassBase.as:244]
    at away3d.materials.passes::DefaultScreenPass/activate()[away3d_4.0\src\away3d\materials\passes\DefaultScreenPass.as:331]
    at away3d.materials::MaterialBase/activatePass()[away3d_4.0\src\away3d\materials\MaterialBase.as:309]
    at away3d.core.render::DefaultRenderer/drawRenderables()[away3d_4.0\src\away3d\core\render\DefaultRenderer.as:167]
    at away3d.core.render::DefaultRenderer/draw()[away3d_4.0\src\away3d\core\render\DefaultRenderer.as:100]
    at away3d.core.render::RendererBase/executeRender()[away3d_4.0\src\away3d\core\render\RendererBase.as:318]
    at away3d.core.render::RendererBase/render()[away3d_4.0\src\away3d\core\render\RendererBase.as:299]
    at away3d.core.render::DefaultRenderer/render()[away3d_4.0\src\away3d\core\render\DefaultRenderer.as:79]
    at away3d.containers::View3D/render()[away3d_4.0\src\away3d\containers\View3D.as:334]

There seems to be a limit of three lights because it worked with 3 or less 
lights.

What version of the product are you using? On what operating system?
Away3D 4.0 [broomstick]

Original issue reported on code.google.com by rag...@gmail.com on 26 Apr 2011 at 1:58

GoogleCodeExporter commented 9 years ago
Noticed this issue just this morning.

Original comment by trentste...@gmail.com on 29 Apr 2011 at 11:04

GoogleCodeExporter commented 9 years ago
A material without normalmaps can have 5 lights before running into the same 
error. 

Original comment by trentste...@gmail.com on 30 Apr 2011 at 11:20