You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This values should result in 1 to 1 result for shader pass.
Run test and measure displayed by molehill engine texture color. In my test I have got the following result:
Test color: 0xd3d3d3;
Displayed color: 0xcacaca;
Obviously test and displayed color should be equal.
Similar test with directional light, ambient light and the following BitmapMaterial settings for test color 0xffffff:
var dirLight:DirectionalLight = new DirectionalLight(-1, -1, -1);
dirLight.color = 0xffffff;
dirLight.specular = 0.5;
dirLight.diffuse = 1;
var mat:BitmapMaterial = new BitmapMaterial(this._cubeTexture.bitmapData);
mat.lights = [dirLight];
mat.ambientColor = 0xffffff;
mat.ambient = 1;
gives 0xb2b2b2 displayed color (0xffffff was expected for face not lit by directional light and having only ambient contribution).
Another test run with point light and the following settings:
var pointLight:PointLight = new PointLight();
pointLight.color = 0xffffff;
pointLight.specular = 0.5;
pointLight.diffuse = 1;
pointLight.position = new Vector3D(5000, 5000, -5000);
var mat:BitmapMaterial = new BitmapMaterial(this._cubeTexture.bitmapData);
mat.lights = [pointLight];
mat.ambientColor = 0xffffff;
mat.ambient = 0.9;
mat.gloss = 30;
gives even more bizzarre result: faces are not lit according to light position changing light position to
pointLight.position = new Vector3D(-5000, 5000, -5000);
keeps this same faces lit on cube rotating in front of camera set at standard location.
Light on faces is strange as well as faces which should be visible to ambient light only have 0xffffff color, while faces lit by point light have 0xc5c5c5 color (expected is 0.9 * 0xff - for RGB in ambient light and 0xffffff for full point light).
Test: set texture with any test gray color. Create object with texture without DirectionLight and PointLight. Set material
properties mat.ambientColor = 0xffffff;
mat.ambient = 1;
This values should result in 1 to 1 result for shader pass.
Run test and measure displayed by molehill engine texture color. In my test I have got the following result:
Obviously test and displayed color should be equal.
Similar test with directional light, ambient light and the following BitmapMaterial settings for test color 0xffffff:
gives 0xb2b2b2 displayed color (0xffffff was expected for face not lit by directional light and having only ambient contribution).
Another test run with point light and the following settings:
gives even more bizzarre result: faces are not lit according to light position changing light position to
pointLight.position = new Vector3D(-5000, 5000, -5000);
keeps this same faces lit on cube rotating in front of camera set at standard location.
Light on faces is strange as well as faces which should be visible to ambient light only have 0xffffff color, while faces lit by point light have 0xc5c5c5 color (expected is 0.9 * 0xff - for RGB in ambient light and 0xffffff for full point light).
All tests were done with b2d76b2 commit.
The text was updated successfully, but these errors were encountered: