Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

stats window triangle count and normal calculation bug?

Discussion in '2017.3 Beta' started by laurentlavigne, Dec 8, 2017.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,751
    Back in the days, if I import a sphere and set the import normal smoothing angle to 0 to turn it into a faceted sphere, I'd get double the number of triangles because internally, unity would duplicate edges.
    what I'm seeing now is that if I set the smoothing angle to 180 or 0 won't change the polycount of the scene.
    Is this a bug in the stats window or a new way unity handles normal angle at import?
     
  2. markvi

    markvi

    Unity Technologies

    Joined:
    Oct 31, 2016
    Posts:
    117
    Do you still get a faceted sphere? Because if not, this sounds suspiciously like a bug and should be logged. :)

    But if you still get a faceted sphere, all is good. Vertex count should increase, but not triangle count.
     
    laurentlavigne likes this.
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,751
    I was looking at polycount, thanks! yes vertex quadruple.
     
  4. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,751
    While I have your attention, I want to do flat shaded but without the vertex cost. In the past I've used the nointerpolation keyword writing a very simple CG shader but now I need to use surface shader what's the keyword in that?

    Code (CSharp):
    1.             struct v2f
    2.             {
    3.                 float2 uv : TEXCOORD0;
    4.                 SHADOW_COORDS(1)
    5.                 nointerpolation fixed3 diff : COLOR0;
    6.                 nointerpolation fixed3 ambient : COLOR1;
    7.                 float4 pos : SV_POSITION;
    8.             };
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Please restrict posting in beta forums for beta issues, this is clearly spelled out in the rules. If we don't enforce some sanity, everyone else will do it.

    Hopefully someone can reply to your issue anyway.