but0n / Ashes

WebGL2.0 3D Engine - Global Illumination - RayTracing
https://codepen.io/but0n/pen/jddYoX
MIT License
328 stars 16 forks source link

Color of SimpleMaterial.gltf is incorrect #6

Closed cx20 closed 5 years ago

cx20 commented 5 years ago

I tried displaying SimpleMaterial.gltf in the latest version library. However, the color displayed is different from what you expected.

Ashes v0.0.18 + SimpleMaterial.gltf result: image

The following are assumed results. image

but0n commented 5 years ago

Thanks for your feedback!

This is caused by incorrect normal or tangent vector when normals are not specified. I will add normals calculation feature soon.

image

but0n commented 5 years ago

It is kind of tricky because the normals calculation function needs OES_standard_derivatives which requires #version 300 es that iOS doesn't support unless using WebGL 1.0 context.

but0n commented 5 years ago

image

I think it should be fixed in the latest version!

cx20 commented 5 years ago

I confirmed that it will be displayed in the latest version.

Ashes v0.2.2 + SimpleMaterial.gltf result: image