Search Unity

Camera with Orthographic Projection using ECS?

Discussion in 'Entity Component System' started by The-Exceptional-Bruce, Feb 27, 2019.

  1. The-Exceptional-Bruce

    The-Exceptional-Bruce

    Joined:
    May 10, 2015
    Posts:
    29
    Anyone know why my ECS meshes won't render if my camera has an Orthographic projection?

    The HellowSpawnACube from the ECS Sample is an easy way to see this. Change the camera projection to Orthographic and it disappears. I tried the same with a "classic" GameObject and it renders fine.

    Any ideas?
     
  2. NoDumbQuestion

    NoDumbQuestion

    Joined:
    Nov 10, 2017
    Posts:
    186
    Somewhere in HybridRender package, there is culling script that say Orthographic camera is not implemented.

    You can try find and fix it.
     
    The-Exceptional-Bruce likes this.
  3. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    On line 561 of
    ../Library/PackageCache/com.unity.rendering.hybrid@0.0.1-preview.4/Unity.Rendering.Hybrid/InstancedRenderMeshBatchGroup.cs
    replace the exception
    Code (CSharp):
    1. if (lodParams.isOrtho)
    2.     throw new System.NotImplementedException(); // <-- Remove this
    3.     return new JobHandle();                     // <-- Add this
    This worked for me and so far so good but I can't vouch whether it's safe or not. It's just a temp solution.
     
    The-Exceptional-Bruce likes this.
  4. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
    it disables culling
     
    The-Exceptional-Bruce likes this.
  5. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Yes, sorry I assumed that was given knowledge but should probably have specified it.
     
    The-Exceptional-Bruce likes this.
  6. MunteanuStefan

    MunteanuStefan

    Joined:
    Jul 10, 2015
    Posts:
    1
    This topic is still for interest, has anyone solved this issue ?