Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge main branch into Ogre 2.2 and fixes (#359)
* Fix floating point precision bug handling alpha channel (#332) (#333) Fixes #332 Fixes #108 Signed-off-by: Matias N. Goldberg <[email protected]> * Test re-enabling depth camera integration test on mac (#335) * Fix floating point precision bug handling alpha channel (#332) Fixes #332 Fixes #108 Signed-off-by: Matias N. Goldberg <[email protected]> * test reenabling depth camera test on mac Signed-off-by: Ian Chen <[email protected]> Co-authored-by: Matias N. Goldberg <[email protected]> * Fix new [] / delete mismatch (#338) Using a custom deallocator to avoid breaking ABI Alternatively C++17 supports the following syntax, which was not used: `typedef std::shared_ptr<unsigned char[]> DataPtr;` Signed-off-by: Matias N. Goldberg <[email protected]> * Fix heap overflow when reading (#337) PF_RGB is 3 bytes. But later on Ogre2SelectionBuffer::OnSelectionClick will try to read 4 bytes from it. Fixed by ensuring it's always at least 4 bytes and zero-initializing those 4 bytes. Signed-off-by: Matias N. Goldberg <[email protected]> Co-authored-by: Ian Chen <[email protected]> * Fix floating point precision bug handling alpha channel (#332) (#333) Fixes #332 Fixes #108 Signed-off-by: Matias N. Goldberg <[email protected]> * Fix depth alpha (#316) * update test Signed-off-by: Ian Chen <[email protected]> * reenable macos test Signed-off-by: Ian Chen <[email protected]> * fix typo Signed-off-by: Ian Chen <[email protected]> * cherry pick f9f1820 and fix conflicts Signed-off-by: Ian Chen <[email protected]> * Fix FSAA in UI and lower VRAM consumption (#313) * Fix FSAA in UI and lower VRAM consumption FSAA was being requested however due to how the compositor was setup, this effect was not taking effect. Additionally, the Compositor setup was improved to lower memory consumption. Originally the setup was taken from Ogre samples which assume they will ultimately be rendering to a window. However this is not the case and thus IGN was creating 3 render targets (two for ping-ponging between postprocess FXs + one for storing the final result) This was optimized so that we only create 2 render targets: two for ping-ponging between postprocess FXs and we pick at runtime which one is storing the final result via the new variable renderTargetResultsIdx Further performance optimizations could be made in Ogre 2.2 to improve unnecessary MSAA resolving when doing postprocess, though considering there's currently only one postprocessing effect (the Gaussian filter) I doubt this optimization would make much of a difference Signed-off-by: Matias N. Goldberg <[email protected]> * Add Ogre2RenderTarget::RenderTarget back Signed-off-by: Matias N. Goldberg <[email protected]> * Rewrote the compositor changes to support RenderWindows As a bonus this new method breaks ABI far less. Fix leak: DestroyCompositor would often not be called Signed-off-by: Matias N. Goldberg <[email protected]> * Mantain ABI compatibility #Ogre2IsRenderWindowABI When merging to newer branches that can break the ABI, revert this commit Signed-off-by: Matias N. Goldberg <[email protected]> * Fix ABI problems I gave up on commit undoing It's clear that on the next release, Ogre2RenderTarget and Ogre2RenderTexture need to be merged together. Signed-off-by: Matias N. Goldberg <[email protected]> * Fix camel case convention Signed-off-by: Matias N. Goldberg <[email protected]> * Make Ogre2RenderTarget::RenderTarget pure virtual again Hopefully this will prevent ABI breakage Signed-off-by: Matias N. Goldberg <[email protected]> * Fix deprecation warnings during build Signed-off-by: Matias N. Goldberg <[email protected]> * Fix invalid write of size 8 This was causing heap corruption. At best it would crash. At worst it would manifeset in subtle weird behaviors Signed-off-by: Matias N. Goldberg <[email protected]> Co-authored-by: Ian Chen <[email protected]> * Backport memory fixes found by ASAN (#340) * Fix heap overflow when reading (#337) PF_RGB is 3 bytes. But later on Ogre2SelectionBuffer::OnSelectionClick will try to read 4 bytes from it. Fixed by ensuring it's always at least 4 bytes and zero-initializing those 4 bytes. Signed-off-by: Matias N. Goldberg <[email protected]> Co-authored-by: Ian Chen <[email protected]> * Fix new [] / delete mismatch (#338) Using a custom deallocator to avoid breaking ABI Alternatively C++17 supports the following syntax, which was not used: `typedef std::shared_ptr<unsigned char[]> DataPtr;` Signed-off-by: Matias N. Goldberg <[email protected]> Co-authored-by: darksylinc <[email protected]> * recreate node only when needed (#342) Signed-off-by: Ian Chen <[email protected]> * Fix custom shaders uniforms ign version number (#343) Signed-off-by: Ian Chen <[email protected]> * relax gaussian test tolerance (#344) Signed-off-by: Ian Chen <[email protected]> * Update light map tutorial (#346) * apply changes Signed-off-by: Ian Chen <[email protected]> * remove line Signed-off-by: Ian Chen <[email protected]> * add ifdef for apple in integration test Signed-off-by: Ian Chen <[email protected]> * 🎈 4.8.0 (#348) Signed-off-by: Louise Poubel <[email protected]> * update ign-rendering version in custom shaders uniform sample Signed-off-by: Ian Chen <[email protected]> * Remove problematic leftover files from 2.1 The mere presence of these files can cause incorrect shader generation or unknown visual bugs. IMPORTANT: The installation folder (i.e. CMAKE_INSTALL_PREFIX) must remove them as well. `make install` won't be enough because it won't remove files, only add new ones or update existing ones. This folder is usually installed in ign/install/share/ignition/ignition-rendering6/ogre2/media/Hlms Signed-off-by: Matias N. Goldberg <[email protected]> * Do not crash on shutdown - ogreRoot may be nullptr - Do not destroy textures already scheduled for destruction Signed-off-by: Matias N. Goldberg <[email protected]> * Restore FSAA support in 2.2 branch Signed-off-by: Matias N. Goldberg <[email protected]> * Fix changing background color not always taking immediate effect Changed pass_clear in favour of LoadAction::Clear which is more efficient on very modern GPUs and specially TBDR ones. Signed-off-by: Matias N. Goldberg <[email protected]> * Changed pass_clear in favour of LoadAction::Clear which is more efficient on very modern GPUs and specially TBDR ones. Signed-off-by: Matias N. Goldberg <[email protected]> * Missing public keyword Signed-off-by: Matias N. Goldberg <[email protected]> * Save VRAM when FSAA is used and no postprocessing There's an unused texture when these conditions are met (which are fairly common) This memory optimization could not be performed in Ogre 2.1, it needs Ogre 2.2+ Signed-off-by: Matias N. Goldberg <[email protected]> * Remove code deprecated in ign-rendering5 Syntax cosmetic changes for consistency Signed-off-by: Matias N. Goldberg <[email protected]> * Remove code deprecated in ign-rendering5 Signed-off-by: Matias N. Goldberg <[email protected]> * Code style fixes Signed-off-by: Matias N. Goldberg <[email protected]> * Undo VRAM saving optimization: It cannot be applied The "Final Composition" node requires both textures to be resident. Thus 2nd texture must always be resident. The optimization could still be applied if we create two Final Composition nodes (one for when 2 textures are needed, another for when only MSAA + 1 texture is needed) but this would: 1. Hurt code readability too much (i.e. what is going on?) 2. Increase debuggability difficulty too much because codepaths taken would differ depending on whether optimization was applied. Also certain bugs could remain hidden until compositors are toggled. This was causing ogre2_demo to fail. Signed-off-by: Matias N. Goldberg <[email protected]> Co-authored-by: Ian Chen <[email protected]> Co-authored-by: Louise Poubel <[email protected]>
- Loading branch information