Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official Hybrid Renderer (0.11.0-preview.43) change list

Discussion in 'Graphics for ECS' started by SebastianAaltonen, May 27, 2021.

  1. SebastianAaltonen

    SebastianAaltonen

    Unity Technologies

    Joined:
    Feb 21, 2020
    Posts:
    112
    Last week we pushed a big bugfix update to the hybrid renderer. The new hybrid renderer package is live now. The URP package is in final test and shipping soon. HDRP package didn't need bug fixing.

    Hybrid Renderer is tested with 2020.3 LTS version. Please don't update yet to 2021 based Unity tech stream.

    Hybrid Renderer (0.11.0-preview.43):
    • Fixed a bug (stability): Memory leak with async fences in data upload
    • Fixed a bug (stability): Out of bounds access in renderer chunk metaentity query
    • Fixed a bug (stability): Renderer had structural changes outside StructuralChangePresentationSystemGroup
    • Fixed a bug: NaN inverse matrix when x/y/z scale is 0 -> NaN pixels rendered
    • Fixed a bug: MaterialColor wrong color (was in gamma color space)
    • Fixed a bug: RenderMeshUtility.AddComponents spawned entities have no ambient light (didn't add SH probe components)
    • Fixed a bug: Entities culled incorrectly at frustum edges
    • Fixed a bug: Entities not rendering past -32785 units on the X Axis
    • Missing bugfix note (stability): Out of bound access because of stale LOD bitfield
    • Missing bugfix note: LodRequirement component refactoring. Up to 2x perf improvement in LODRequirementSystem job

    URP (10.5.1):
    • Fixed a showstopper bug: URP/Lit shader incompatible with SRP Batcher (no rendering)
    • Fixed a bug: Environment reflection multiplier was not used (always full bright)
     
    AlanMattano, jashan, NotaNaN and 6 others like this.
  2. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    879
    • Fixed a bug: Entities not rendering past -32785 units on the X Axis
    I've downloaded .43 version, but FrustrumPlanes.cs still contains that constant:
    Code (CSharp):
    1.  // Populate the remaining planes with values that are always "in"
    2.             for (int i = cullingPlaneCount; i < 4 * packetCount; ++i)
    3.             {
    4.                 var p = planes[i >> 2];
    5.                 p.Xs[i & 3] = 1.0f;
    6.                 p.Ys[i & 3] = 0.0f;
    7.                 p.Zs[i & 3] = 0.0f;
    8.                 p.Distances[i & 3] = 32786.0f; //float.MaxValue;
    9.                 planes[i >> 2] = p;
    10.             }
    Or this is expected and changelog mention another bug?
     
  3. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,109
  4. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    350
    Upon investigating this a bit, it turns out that the fix to this X axis culling problem came in just a bit too late to make the release, but we are working on getting that fix public shortly.
     
  5. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    350
    I think this issue should be fixed with the description.
    • Fixed a bug (stability): Out of bounds access in renderer chunk metaentity query
    I just double checked, and a fresh download of hybrid.renderer 0.11.0-preview.43 should contain the fix for this issue. If the problem is still happening for you in the fixed version, then please let us know.
     
  6. SebastianAaltonen

    SebastianAaltonen

    Unity Technologies

    Joined:
    Feb 21, 2020
    Posts:
    112
    0.11.0-preview.44 is released! Includes the missing X axis culling fix.
     
  7. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    879
    That was quick! Thank you very much.
     
  8. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    Hmm, 0.11.0-preview.44 is spamming such error for me when I destroy entity with LODs:

    Code (CSharp):
    1.  
    2. IndexOutOfRangeException: Index 29 is out of range of '29' Length.
    3. Unity.Collections.NativeArray`1[T].FailOutOfRangeError (System.Int32 index) (at /Users/bokken/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:286)
    4. Unity.Collections.NativeArray`1[T].CheckElementReadAccess (System.Int32 index) (at /Users/bokken/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:129)
    5. Unity.Collections.NativeArray`1[T].get_Item (System.Int32 index) (at /Users/bokken/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:154)
    6. Unity.Rendering.SimpleCullingJob.Execute (Unity.Entities.ArchetypeChunk archetypeChunk, System.Int32 chunkIndex, System.Int32 firstEntityIndex) (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.44/Unity.Rendering.Hybrid/HybridV2Culling.cs:351)
    7. Unity.Entities.JobChunkExtensions+JobChunkProducer`1[T].ExecuteInternal (Unity.Entities.JobChunkExtensions+JobChunkWrapper`1[T]& jobWrapper, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/IJobChunk.cs:386)
    8. Unity.Entities.JobChunkExtensions+JobChunkProducer`1[T].Execute (Unity.Entities.JobChunkExtensions+JobChunkWrapper`1[T]& jobWrapper, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/IJobChunk.cs:353)
    9.  
    I think it was fixed in one of previous releases and now reappeared
     
  9. SebastianAaltonen

    SebastianAaltonen

    Unity Technologies

    Joined:
    Feb 21, 2020
    Posts:
    112
    I confirmed that the fix is still there in the preview.44 package.

    HybridV2RenderSystem.cs line 697 should be "bool lodRangeChange =". That's the first line of the fix.

    Thanks for the report. I just found another bug related to that. If the camera hasn't moved at all, the LOD bitfield can remain stale, because it will skip the whole LOD bitfield update job.
     
  10. SebastianAaltonen

    SebastianAaltonen

    Unity Technologies

    Joined:
    Feb 21, 2020
    Posts:
    112
    I did further investigation for the bug. The LOD bitfield getting stale when camera is not moving requires a bit more work. We will fix it to the next major package drop. Meanwhile, you should just ignore the logged error in the editor. When you move the camera for the next time, the error should disappear.
     
  11. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    @SebastianAaltonen This is not editor-only and is not triggered by camera moving/not-moving but rather by entity with LOD being destroyed. Additionally to spamming error in the console all other entities with LODs start to disappear and re-appear randomly so it is rather hard to ignore :) Mind that this does not happen in preview.42 and only started to happen in preview.43
     
  12. andreiagmu

    andreiagmu

    Joined:
    Feb 20, 2014
    Posts:
    175
    Is there any ETA for URP 10.5.1?
     
  13. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    I get this error when delete lod.
    Code (CSharp):
    1. IndexOutOfRangeException: Index 9 is out of range of '9' Length.
    2. Unity.Collections.NativeArray`1[T].FailOutOfRangeError (System.Int32 index) (at <fb9e9edf4fb847e79e36cf0fdffedf7f>:0)
    3. Unity.Collections.NativeArray`1[T].CheckElementReadAccess (System.Int32 index) (at <fb9e9edf4fb847e79e36cf0fdffedf7f>:0)
    4. Unity.Collections.NativeArray`1[T].get_Item (System.Int32 index) (at <fb9e9edf4fb847e79e36cf0fdffedf7f>:0)
    5. Unity.Rendering.SimpleCullingJob.Execute (Unity.Entities.ArchetypeChunk archetypeChunk, System.Int32 chunkIndex, System.Int32 firstEntityIndex) (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.44/Unity.Rendering.Hybrid/HybridV2Culling.cs:351)
    6. Unity.Entities.JobChunkExtensions+JobChunkProducer`1[T].ExecuteInternal (Unity.Entities.JobChunkExtensions+JobChunkWrapper`1[T]& jobWrapper, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/IJobChunk.cs:386)
    7. Unity.Entities.JobChunkExtensions+JobChunkProducer`1[T].Execute (Unity.Entities.JobChunkExtensions+JobChunkWrapper`1[T]& jobWrapper, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/IJobChunk.cs:353)
    8. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    9.  
     
  14. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    @linfuqing It seems that it is the same one I pasted few comments above
     
  15. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    This bug has not been fixed in preview.44:-(
     
  16. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    Hello,when will this problem be fixed?
     
  17. Dimetrock

    Dimetrock

    Joined:
    Dec 9, 2012
    Posts:
    37
    Any news on LOD fix?
     
  18. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    Or any temporary solutions?@SebastianAaltonen
     
  19. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    Yeah, HLOD issues is really annoying and I didn't manage to find any workarounds. It should also be fairly easy to reproduce. They should add some HLOD example with a spawner spawning some HLODed prefabs and not only static scenes. Below is a GIF showing the issue. The cause is obviously not camera being stationary and it also happens in standalone builds:
     
  20. apkdev

    apkdev

    Joined:
    Dec 12, 2015
    Posts:
    277
    Hey, I'm at all not certain whether we're dealing with the same issue here, but I've had LOD issues that I ended up hacking away by changing the camera FOV slightly (+-0.0001f) each frame. It's the ugliest code I wrote all year, but works like magic.
     
  21. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    @apkdev This works like a charm, thank you very much :)
     
    apkdev likes this.