thcmedia / papervision3d

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

"front" face drops out of flatshaded cube. #106

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. make a cube
2. make a flatshadematerial
3. assign the material

What is the expected output? What do you see instead?

flat shaded cube with different colored sides. 
it appears the "front" side of the cube is black. even if ambient color
isn't, even if doc bg color isnt.
this face dropout persists with an "all" materialList too although example
below creates different colors for each side.

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

INFO: Papervision3D Public Beta 2.0 - Great White (September 9th, 2008)

Please provide any additional information below.

 source code here: http://embed.mibbit.com/pb/aTHHhM

Original issue reported on code.google.com by ross.scl...@gmail.com on 22 Sep 2008 at 3:14

GoogleCodeExporter commented 8 years ago
I've just tracked down the issue and propose a fix for this:

It seems the method LightMaps.getFlatMapArray() doesn't actually draw the 
gradient in
the last pixel of the 1D lookup table.

Fix:

change this line:
s.graphics.drawRect(0,0,255,1);

into:
s.graphics.drawRect(0,0,256,1);

Also, it seems this method has extraneous "specularLevel" argument which isn't 
used...

Hth!

Original comment by toxmeister on 7 Oct 2008 at 10:33

GoogleCodeExporter commented 8 years ago
Fixed

Original comment by r.hauw...@gmail.com on 17 Nov 2008 at 12:08

GoogleCodeExporter commented 8 years ago

Original comment by r.hauw...@gmail.com on 17 Nov 2008 at 12:14