-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential bug: Wrong value stuck in Ogre2GpuRays #521
Labels
Comments
darksylinc
added a commit
to darksylinc/ign-rendering
that referenced
this issue
Dec 26, 2021
There were multiple bugs that had to be fixed: - Objects which had no laser_retro set (or an invalid one) would be rendered using regular lighting PBS shaders; causing the retro value to contain garbage instead of the intended default value of 0 - Performance regression in 993bb0b: When ported to Ogre 2.2, ignition would render the scene 4 times instead of 2 (twice for objects, twice for particles). Depth buffer data was created through a 2nd redundant pass. This is inefficient as the depth buffer data is already available from the 1st pass - Bug regression in 993bb0b: In the pass for normal objects, ignition would first use IGN_VISIBILITY_ALL flags for colour, but it would use 0x01000000 for depth. This creates the wrong mix of data because an occluder that had visibility set to 0x01000000 would use the correct depth but the retro value of the object behind it. This bug is implicitly fixed by the previous item (colour and depth data are now obtained from the same pass instead of using multi pass) - PFG_R8_UNORM is nowhere enough to contain all possible laser retro values and would quantize too much. Increased precision to PFG_R16_UNORM - Affects gazebosim#521. The problem is fixed for Fortress by always overriding setCustomParameter, but likely the fix should be backported to previous versions. Signed-off-by: Matias N. Goldberg <[email protected]>
7 tasks
iche033
added a commit
that referenced
this issue
Jan 5, 2022
There were multiple bugs that had to be fixed: - Objects which had no laser_retro set (or an invalid one) would be rendered using regular lighting PBS shaders; causing the retro value to contain garbage instead of the intended default value of 0 - Performance regression in 993bb0b: When ported to Ogre 2.2, ignition would render the scene 4 times instead of 2 (twice for objects, twice for particles). Depth buffer data was created through a 2nd redundant pass. This is inefficient as the depth buffer data is already available from the 1st pass - Bug regression in 993bb0b: In the pass for normal objects, ignition would first use IGN_VISIBILITY_ALL flags for colour, but it would use 0x01000000 for depth. This creates the wrong mix of data because an occluder that had visibility set to 0x01000000 would use the correct depth but the retro value of the object behind it. This bug is implicitly fixed by the previous item (colour and depth data are now obtained from the same pass instead of using multi pass) - PFG_R8_UNORM is nowhere enough to contain all possible laser retro values and would quantize too much. Increased precision to PFG_R16_UNORM - Affects #521. The problem is fixed for Fortress by always overriding setCustomParameter, but likely the fix should be backported to previous versions. Signed-off-by: Matias N. Goldberg <[email protected]> Co-authored-by: Ian Chen <[email protected]>
7 tasks
This bug is fixed in Fortress & Garden on Ogre2. I don't know if the bug exists in Ogre1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
main 5e19061 but I think it affects all of them
Description
I noticed
Ogre2LaserRetroMaterialSwitcher
performs the following:Basically: "If we haven't set the retroValue yet, set it".
However I see two potential issues with this:
customParamIdx = 10u;
which is also shared with the thermal camera (same value). As a result, if an object is both in the Thermal Camera and in GpuRays, then the Thermal Camera will override the retroValue (because ThermalCamera never checkshasCustomParameter( ... )
) and laterGpuRays
will not try to override anything.I see two possible solutions:
customParamIdx = 10u;
to one of the camera implementations (not recommended, this problem will reappear)if (!subItem->hasCustomParameter(this->customParamIdx))
check. It's no performance improvement, and this fix will get rid of the problem and any future clash.Steps to reproduce
This was found through manual examination, but I suppose it should be possible to repro by using GpuRays and Thermal Camera at the same time on the same object
Other
It's possible both Ogre2 and Ogre1 backends are affected. I think the fix should be trivial to propagate to all branches without breaking ABI.
The text was updated successfully, but these errors were encountered: