brlrt / away3d

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

Broomstick - Material passes side effecting each other. #162

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Build and run the primitives test, note the normal mapped cube renders fine.
2. Uncomment the two lines that create spheres that use ColorMaterial.
3. Re-run.

What is the expected output? What do you see instead?
You should see all three meshes.  Instead you only see the spheres.

What version of the product are you using? On what operating system?
Latest trunk.

Please provide any additional information below.

In my own application I can see the normal mapped entity, but my spheres lose 
their lighting and color.  But I'm sure it's the same issue.

If I modify MaterialPassBase::activate, to *always* updateProgram each pass, 
things work fine. So something is getting goofed up.

This only occurs when normal maps are used, if only a diffuse map is used all 
is well.  Hopefully that is a clue.

Original issue reported on code.google.com by corey.lu...@gmail.com on 25 Mar 2011 at 12:47

Attachments:

GoogleCodeExporter commented 8 years ago
If you simply change the order that the materials are first created in, that 
is, if you move the green and red material creation before the BitmapMaterial 
in the constructor, you'll see that now the ColorMaterial based sphere is 
rendering incorrectly.  See attached.

Original comment by corey.lu...@gmail.com on 30 Mar 2011 at 4:03

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by david.le...@gmail.com on 12 Apr 2011 at 11:39