* Stop using members as globals between methods
* Multi-thread shaders generation with JobSystem
* Pass JobSystem to MaterialBuilder::build()
* Fix MeshAssimp to use the new API
* Allow the Java API to pass a job system via Engine
* Update docs
* Apply suggestions from code review
Co-authored-by: Philip Rideout <philiprideout@gmail.com>
This tool makes it easy to analyze the composition of Android
applications that use Filament.
- Filament materials are shown in the treemap if `resgen --json` was
used in the build.
- The input path can be a so file, folder, or zip archive (apk or aar).
- If the path is a zip or folder, helps you find the file to analyze.
- The generated web report is a self-contained HTML file.
- Reports the gzipped size of all Filament materials.
For example, from a mac, you can generate a self-contained HTML file by
typing this from the Filament repo root:
./tools/zbloat/zbloat.py ./android/filament-android
open index.html
This tool uses Python, `nm`, and `objdump`.
The `nm` tool works slightly differently between macOS and Linux, so a
`Dockerfile` is provided that installs dependencies inside a Linux
container. This is also convenient if you do not have both versions of
Python on your system.
The easy way to use docker is to invoke the helper bash script. Simply
type `zbloat.sh [args...]` instead of `zbloat.py [args...]`. The first
time you run it, it will be slow but subsequent times will be fast.
Many thanks to Evan Martin for his interactive treemap widget.
This option embeds a small JSON string inside the resgen blob that lists
all materials and their respective sizes. This is useful when analyzing
the footprint of the binary executable.
Block compression is currently only used when we invoke mipgen for the
suzanne demo. This PR makes it easy to disable.
Block compression is still enabled in our CMake build, but other build
systems can simply omit BlockCompression.{h,cpp} from imageio (as well
as the two third_party libs) and it will "just work".
The value we pass to spvContextCreate() is not SPV_ENV_UNIVERSAL_1_3,
which is what we use in GLSLPostProcessor.
Also add a call to spvValidateBinary(), which would have caught this
oversight.
this is intended to be temporary until we properly add support
for vulkan's subpasses. this PR just helps us activate
ext_framebuffer_fetch on select materials.
* fix compile error when vulkan
* matc:print shaders support
* fix link error
* ussage for matc print flag
Co-authored-by: brian.wang <brian.wang@noitom.com>
This adds a new "backend_headers" target because small changes to any
backend cpp file was resulting in a huge build, causing materials to be
rebuilt, etc. Note that filabridge only needs DriverEnums, nothing else.
* Add new tool cso-lut
This tool is for internal usage only. It computes a 3D lookup table
for cone/sphere occlusion computations. These can be used to implement
specular occlusion, directional ambient occlusion, etc.
* Improve generated comment
* Fix Windows build
The user can now choose amongst 3 specular AO methods:
- None, specAO is off
- Simple, specAO is inferred from roughness and diffuse AO
- Bent normals, specAO is computed accurately from cone intersections
The last method is more expensive but produces the best results.
This change also fixes a few issues:
- Rename materialRefraction() and materialRefractionType() for
consistency
- Fixes user time in shaders
This change adds new commands to matinfo to print dictionaries.
This feature is useful to debug dictionaries, and I just used
it to identify that using a shared dictionary would save ~12 KiB
in the Android build. The macOS build (GLSL + Metal) would go
down to 71 KiB from 136 KiB.
The SPIRV to Metal conversion leaves leading spaces and some
comments. This change also runs the shrinker on optimized Metal
shaders to further reduce the size of shaders.
We were conflating two concepts in our comments about the roughness
remapping, which was confusing. Also changed the remapping so it
matches a log2 mapping in our default configuration.
With KTX, we should simply create the specified output folder and put
the KTX file(s) in there. There is no need to create a subfolder of the
output folder.
This change also allows users to pick a custom name for their KTX file,
because we only use the "deployment" name when generating filenames.
Filament will now allow incomplete mipmap chains for the IBL and
map the roughness to the available chain.
This allows to create roughness cubemaps with a minim size for
roughness==1, instead of always mapping it to 1x1.
cmgen will now use 16x16 cubemaps for roughness==1, which
improves the quality of rough objects significantly.
The beauty of this is that there is no asset or API change. Old assets
will continue to work like before.