Commit Graph

33 Commits

Author SHA1 Message Date
Romain Guy
2e22a26ca5 Fix filamat build (#1005)
Filamat public headers were including a private header. This PR fixes
this problem. It also forces filamat to always be compiled to avoid
breaking filamat without noticing. The flag `-l` is not available
anymore in build.sh as a result.
2019-03-18 18:40:48 -07:00
Ben Doherty
54fe2a6f2e Add additional documentation on filamat flag for material builder sample (#1004) 2019-03-19 04:20:32 +09:00
Romain Guy
8a6881544f Fix Android samples (#993)
Fixes issue #992
2019-03-15 09:09:00 -07:00
Ben Doherty
2378e64153 Add material-builder Android sample (#884) 2019-02-25 14:46:05 -08:00
Romain Guy
a141abd212 Fix Kotlin compilation error 2019-01-29 09:39:00 -08:00
Romain Guy
12aba0f1b7 Code cleanup 2019-01-29 09:36:18 -08:00
Philip Rideout
2f35f26148 VertexBuffer builder normalized now accepts "false". 2019-01-17 06:09:17 -08:00
Romain Guy
cebc83e8fa Fix the Android filamesh file loader (#709)
* Fix the Android filamesh file loader

The loader was not updated to support the SNORM16 format now sometimes
used to encode UV sets in filamesh files.

Fixes #708

* Update android/samples/image-based-lighting/app/src/main/java/com/google/android/filament/ibl/MeshLoader.kt
2019-01-15 16:11:34 -08:00
Romain Guy
ff5a2a7a99 Peek the right dimensions for the IBL in Android samples (#704)
Fixes #701
2019-01-15 09:47:41 -08:00
Romain Guy
c4989da047 Upgrade sample projects to Android Studio 3.3 (#700) 2019-01-14 11:50:44 -08:00
Romain Guy
4901f6f72a Fix FXAA computations in mediump (#643)
* Fix FXAA computations in mediump

UV coordinates computed in highp should be passed to the FXAA function
in highp as well. This change also fixes a potential division by 0 which
was causing dir1 to have components set to inifinity, thus breaking the
texture sampling calls below. We fix this with an early exit when a
potential division by 0 is detected. The original code contained a bias
to try to avoid this problem but that bias was not always enough. It
was frequent in mediump to cancel out the bias.

* Update shaders/src/fxaa.fs

Co-Authored-By: romainguy <romainguy@curious-creature.com>
2018-12-14 22:48:26 -08:00
Romain Guy
eaf790aaa7 Improve rendering to TextureView (#635)
* Improve rendering to TextureView

UiHelper wasn't calling the resize callback at init time when attaching
to a TextureView, but it was for a SurfaceView. This makes both code
paths consistent and fixes the standard samples if they are modified to
render to a TextureView.

This change also adds a new sample app that shows how to render into
a TextureView.

* Suppress warning

* Suppress another warning
2018-12-13 15:57:15 -08:00
Romain Guy
380e3fa690 Simplify UiHelper API, add transparent rendering sample (#629)
* Simplify UiHelper API, add transparent rendering sample

* Rename the app

* Address review comments

Also use the proper package name
2018-12-13 09:09:09 -08:00
Romain Guy
a38c40cf11 Turn on shaders optimization by default (#614)
* Turn on shaders optimization by default

Release builds of Filament only work well with optimize shaders,
turning optimizations on by default will help avoid mismatches.

This change also adds -g to disable all optimizations, for debug
builds.

* Use -g on debug builds

* Use -g on debug builds

* Update tutorial_redball.md to remove matc's -O

* Update tutorial_suzanne.md to remove matc's -O

* Use -g in debug builds
2018-12-11 09:36:37 -08:00
Romain Guy
55dd612c64 Add screenshots to Android samples' README (#513)
This change also optimizes the size of existing images using squoosh.app.
This should make the main README a lot lighter and faster to load (it saves
several MiBs).
2018-11-21 14:16:21 -08:00
Romain Guy
31b9801f17 Move textures to nodpi to avoid upscales (#437) 2018-10-29 17:40:34 -07:00
Romain Guy
3a9f3a1984 Update to Kotlin 1.3 (#436) 2018-10-29 17:37:21 -07:00
Romain Guy
c581b755fd Add helper to upload Android bitmaps to textures (#382)
* WIP Add helper to upload Android bitmaps to textures

* Add missing file

* Pass custom constants for bitmap formats

* Add sample app for texturing

* Update the README for samples

* Rename variable from callback to autoBitmap
2018-10-16 14:24:18 -07:00
Romain Guy
7cb01929a3 Clean up Kotlin samples (#380)
* Clean up Kotlin samples

* Further code cleanup
2018-10-15 15:28:39 -07:00
Romain Guy
89982e6e97 Improve APIs for Kotlin usage (#361) 2018-10-10 10:13:07 -07:00
Philip Rideout
c6cef9ff9c NEW API: add RGBM flag to Texture.
This change will allow the skybox use a compressed texture format.

For now, the old internal format "RGBM" is still honored, but in a
forthcoming change we will replace the enum with UNUSED.
2018-10-08 11:33:06 -07:00
Romain Guy
57d4a5d47b Update projects for Android Studio 3.2 (#298) 2018-09-24 11:25:44 -07:00
Romain Guy
5559d71fdc Update samples to Kotlin 1.2.70 (#280) 2018-09-20 15:51:31 -07:00
Romain Guy
23c9f8609f Update README 2018-09-19 18:41:46 -07:00
Romain Guy
7ada9b6470 Kotlinify our Kotlin code (#233) 2018-09-10 18:33:14 -07:00
Romain Guy
f8a935e028 Cleanup Android sample code
- Free IBL textures
- Refactor loading code to be easier to read/follow
- Simplify some code originally ported from Java
2018-08-31 21:52:31 -07:00
Romain Guy
c20b452a74 Add new Android sample: IBL and meshes (#192) 2018-08-31 18:13:22 -07:00
Romain Guy
0df72a736f Destroy entities properly 2018-08-31 14:35:13 -07:00
Romain Guy
af0cac72e5 Position the camera in a less confusing spot 2018-08-31 14:29:19 -07:00
Romain Guy
a6722c1f12 Add new Android sample app (#190)
This sample app shows a lit, rotating cube
2018-08-31 14:20:57 -07:00
Romain Guy
f14ff58a89 Add Engine.destroyEntity (#189)
To match the C++ APIs
2018-08-31 10:37:51 -07:00
Romain Guy
0097fc404e Automatically rebuild materials from Gradle (#183)
* Automatically rebuild materials from Gradle

* Share Gradle tasks
2018-08-30 10:36:54 -07:00
Romain Guy
34c170d4da Add Android sample app (#181)
* Add Android sample app

It’s a simple rotating triangle but provides a good overview of how to use Filament on Android

* Remove unnecessary files
2018-08-29 09:01:28 -07:00