AlternativaPlatform / Alternativa3D

Alternativa3D Flash GPU accelerated 3D engine
http://alternativaplatform.com/en/technologies/alternativa3d/
377 stars 126 forks source link

Extend VertexLightTextureMaterial to support cube environment texture. #64

Closed ChrisDenham closed 9 years ago

ChrisDenham commented 11 years ago

The current implementation of EnvironmentMaterial does not support lighting. This request merges some of the features of EnvironmentMaterial into VertexLightTextureMaterial. To use, just supply VertexLightTextureMaterial with diffuseMap that is a cube texture as you would to the environmentMap argument of EnvironmentMaterial.

makc commented 11 years ago

Shouldn't then EnvMaterial be replaced with VerLitTexMaterial subclass, too? Not in terms of request acceptance probability, but in terms of code duplication ;)

ChrisDenham commented 11 years ago

Yes, true. Though EnvironmentMaterial still has a lot of features that would need to be merged, e.g. light map, normal map, diffuse blend, normalmap, reflection map, fog, blah blah blah. I did wonder about trying to subclass EnvironmentMaterial extends VertexLightTextureMaterial, but it made my head hurt.