Commit Graph

6 Commits

Author SHA1 Message Date
Philip Rideout
57fffab7b6 Improve SurfaceOrientation robustness when using UVs. (#1161)
Fix #1158
2019-05-03 08:18:13 -07:00
Romain Guy
7b87662db0 Don't flip the normals (#1060)
* Don't flip the normals

* Fix the ubershader as well
2019-04-01 12:04:27 -07:00
Philip Rideout
ce50ea17c0 Avoid NaN when normal is colinear with fake axis.
I reproduced the issue by hacking our redball demo and visually
verified the fix.

cc @AdrianAtGoogle
2019-03-12 14:30:25 -07:00
Philip Rideout
13cd77bc9a SurfaceOrientation now supports uint32 indices. 2019-03-01 07:27:03 -08:00
Philip Rideout
ace38eff24 SurfaceOrientation cleanup per code review. 2019-02-27 08:47:24 -08:00
Philip Rideout
6d1e0ed6f4 Introduce SurfaceOrientation helper class.
This moves our existing VertexBuffer utility into a new "geometry"
library and adds new functionality for computing tangents based on UV's.
The UV-based method comes from Eric Lengyel.

We considered mikktspace (which thankfully has a zlib-style license) but
it would require re-indexing via meshoptimizer and is therefore a bit
heavyweight.

The new library has no dependencies and will add only 7 KB to Filament's
Android aar file.

Fixes #858 and preps for #528.
2019-02-27 08:47:24 -08:00