thcmedia / papervision3d

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

FlatShadeMaterial mesh appears black when out of light source #137

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create new FlatShadeMaterial, apply to an object with light source
2. Objects outside of "spotlight" appear black.

What is the expected output? What do you see instead?
Should keep color of specular color, not black

What version of the product are you using? On what operating system?
Papervision3D Public Beta 2.0 - Great White (20.08.08) in Flash 9, checked
latest build and it still appears to be there.

Please provide any additional information below.
Fix:

org.papervision3d.materials.shadematerials.FlatShadeMaterial
at function drawTriangle:

add:
if(zAngle<1))zAngle=1;

OR add a strength parameter to constructor:

strength:Number = 1 (where strength is 0 for no light and 1 for full light)
_strength = Math.round(strength*254)+1;

and then in drawTriangle:
if(zAngle<(256-_strength))zAngle=(256-_strength);

Original issue reported on code.google.com by e...@eric-decker.com on 25 Nov 2008 at 5:54

Attachments:

GoogleCodeExporter commented 8 years ago
If an object recieves no light, it shouldn't be lit, right ? 

Original comment by r.hauw...@gmail.com on 26 Nov 2008 at 9:05

GoogleCodeExporter commented 8 years ago
I'm sorry, but this seems to be incorrect. Closing until further notification.

Original comment by r.hauw...@gmail.com on 1 Dec 2008 at 4:04