Reproduced the issue by hacking the TexturedCube glTF file.
Verified the fix by viewing TexturedCube in ubershader mode, then
hacking the shader with matdbg in order to visualize texture
coordinates.
Fixes#2659
matdbg
- Materials are now sorted by name and the sha id is hidden.
- PostProcess materials now separated from Surface materials.
- PostProcess details now hide the non-existing properties.
- Larger default pane size for the material list.
- Use nicer font.
matinfo
- Print out the Material Domain.
filament
- get*Slow methods in FMaterial are now private.
- don't crash when a material doesn't have a name
- don't cache the program in PostProcessManager so we can do live
editing. Not needed anyways, because Material has a cache.
* Add transforms for ACEScct and enabling/disabling color grading in sample
* Add saturation and contrast adjustments
* Rename ACES to ACES_LEGACY and introduce ACES
ACES_LEGACY is ACES with a brightness boost to match our old
tone mapping operator.
* Add the ability to set a ColorGrading LUT per View
In this change, material_sandbox allows to change the tone mapping
operator at runtime.
* Add Mathematica notebook used to explore white balance
The implementation is meant to reproduce the temperature/tint sliders
founds in Adobe Lightroom. The temperature can be offset from 2,000K
to 50,000K using a slider between -100 and +100 (-1.0 to 1.0 in our
API). The range of tint was modelled after the range used for the
temperature.
* Fix various issues
- A refactoring wrongly remamed the color grading pass
- Setting a View's ColorGrading to null selects the
default color grading options
* Implement white balance in ColorGrading
When animation is applied to the master asset, all instances are
animated.
Instances can also be individually animated via the Animator in
FilamentInstance.
Fixes#1513.
This adds createInstancedAsset() to AssetLoader, which creates a master
asset and a set of slave instances. Vertex buffers, index buffers,
textures, and material instances are shared. Entities and components are
duplicated.
Instances have their own API object that is very simple. Light sources
and material instances are not instanced, so are not accessible through
the instance API object.
The master-slave ownership model lets us avoid complex shared ownership
semantics. The existing cache structures in AssetLoader allow the
implementation of this feature to be fairly simple.
The master asset exposes the union of all entities and allows clients to
modify all instances en masse if they wish. This design also works
naturally with ResourceLoader, which does not need to know about
instancing. For example, asynchronous loading is completely unchanged;
the dependency graph simply contains the union of entities across all
instances.
Support for animation is added in a subsequent commit.
Fixes#1513.
Vulkan complains if a pipeline declares an integer vec2 attribute but
the shader consumes it as "vec2" rather than "ivec2". gltfio was doing
this when supplying dummy texture coordinates.
This fixes one of the two bugs reported in #2573.
Since AO is computed at 1/4 resolution, it is necessary to upsample
the AO buffer. Until now this was done with a bilinear tap, which is
less than ideal as it can creates jaggies at edges.
High quality upsampling can now be enabled and uses a bilateral filter.
The cost is about 2.0 ms at 250MHz on Pixel 4. ES3.1 is required.
Since we are still on Vulkan 1.0, we cannot use SPIR-V 1.3.
If we try to do so, this error is generated:
Invalid SPIR-V binary version 1.3 for target environment SPIR-V 1.0
In non-optimized builds, we were already generating spirv 1.0, but
when we enabled the shader optimizer, we generated spirv 1.3.
This bug has actually been around forever, but we did not notice because
we were only invoking the optimizer in release builds, which does not
enable validation.
We cannot upgrade Vulkan 1.1 because the latest LunarG SDK for macOS
does not support it.
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.
These changes make it easier to test headless rendering in macOS.
I verified that this works using the frame_generator tool, however
it requires the fixes in PR #2529.
This is done for consistency with the Android samples. Tested with
gltf_viewer against Vulkan, Metal, and OpenGL. Dragged window between
high DPI and low DPI displays.
Since resizing does not trigger the "NSView has changed" handler in
PlatformCocoaGL, it now must to detect a resize in order to make the
required call to NSOpenGLContext::update() as per the following
documentation.
https://developer.apple.com/documentation/appkit/nsopenglcontext/1436135-updateFixes#2528
* debug option to track Entities
Set FILAMENT_UTILS_TRACK_ENTITIES to true when building libutils to
activate entity tracking. This adds two public methods:
getActiveEntities() and dumpActiveEntities() the later displays the
stack trace of where the remaining entities were allocated.
This is useful for tracking leaks.
* Update libs/utils/include/utils/EntityManager.h
Co-authored-by: Philip Rideout <philiprideout@gmail.com>
Co-authored-by: Philip Rideout <philiprideout@gmail.com>
To see proof that this works, use gltf_viewer with -u and examine the
node hierarchy. You will now see the correct material names instead of
the ubershader names.