Search Unity

anti aliasing game view verse scene view

Discussion in 'General Graphics' started by kdarius43, Aug 16, 2018.

  1. kdarius43

    kdarius43

    Joined:
    Mar 16, 2015
    Posts:
    170
    I notice in my game view in editor my scene seams to have better anti aliasing then my game view. I was wondering if anyone had any ideas on what this could be from?
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Is your Game View set to "Free Aspect" or did you set a specific aspect ratio or resolution? It could be that you are rendering your Game View in a target resolution, and the rendered result gets resized to fit your Game View window.

    There are anti-aliasing settings on your cameras and in your project's quality settings. You can also add an anti-aliasing post process effect using the free Unity Post Processing Stack asset from the asset store.
     
  3. kdarius43

    kdarius43

    Joined:
    Mar 16, 2015
    Posts:
    170
    Hu good point about the resolution. Mine is set to 1920x1080 for the game because I know this is the rez it will be played at. The issue I am having with the quality setting and the aa scripts. Is it's making my textmeshpro text not as crisp. Plus the videos I play look not as crip because of the aa
     
  4. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    Try building and running the game and see if you have the same issue at full resolution. Like I said, if you're running a target resolution in your game window, your game will output a texture at that resolution and scale it down to fit in your game window. This scaling down causes general loss of quality, including objects appearing squished and straight lines appearing jagged.

    If your AA is making some things look strange, you could have an extra camera with AA turned off specifically for those objects. I think UI objects that use a Canvas Renderer will not be affected by AA if you want to run a video on a UI.RawImage or something, but I'm not 100% sure.
     
  5. kdarius43

    kdarius43

    Joined:
    Mar 16, 2015
    Posts:
    170
    Very interesting thoughts. Does world space canvas unaffected by aa
     
  6. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    Currently it seems that in all my projects in 2018.2 the Scene View has no AA in forward rendering.
     
    Ony likes this.
  7. Scoobaru

    Scoobaru

    Joined:
    Aug 29, 2013
    Posts:
    7
    I am seeing the same problem no matter what quality setting I use. Previously in v5 this worked ok.
    In the Nvidia control panel "Override app setting" has no effect.
    Version 2018.2.14f1
     
  8. Mehrdad995

    Mehrdad995

    Joined:
    Jul 17, 2013
    Posts:
    46
    Affirmative, my 2018.2.13f1doesn't have AA in the scene view no mather of what
     
  9. TooManyNames

    TooManyNames

    Joined:
    Mar 9, 2018
    Posts:
    2
    here's something. . .

    BEFORE:
    AA_off.JPG

    AFTER:
    AA_on.JPG

    you need the "legacy image effects":
    https://assetstore.unity.com/packages/essentials/legacy-image-effects-83913

    & a script that "JohnMcPineapple" wrote:
    https://www.reddit.com/r/Unity3D/co...th/cqaoub7/?utm_source=share&utm_medium=web2x

    put these in your project's assets folder & you have AA in the scene view:
    (you only seem to need a few assets from "legacy image effects")
    AA_Folder.JPG

    you can change the "aa.mode" at the bottom of JohnMcPineapple's script:
    (the "DLAA" shader looked best for my setup)
    AA_Mode.JPG




    unitypackage:
     

    Attached Files:

    Last edited: Mar 31, 2019
    Lars-Steenhoff and Ony like this.
  10. blackcoatman

    blackcoatman

    Joined:
    Jul 7, 2014
    Posts:
    1
    Sorry for resurrecting this, but I had the same issue and found a better solution. After I became dissapointed with the results of the above solution, I decided to try the modern Post-Processing volume + layer from Package Manager. It seems that once you setup PP properly, this fixes it without having to enable ANY effects, not even AA itself...
     
  11. TooManyNames

    TooManyNames

    Joined:
    Mar 9, 2018
    Posts:
    2
    Just to really spell things out, for the solution @coat^ has stated, you need to:
    - download the "Post Processing" package under the "Unity Registry" in the "Package Manager" window
    - add the "Post-process Volume" & "Post-process Layer" components to your scene's main camera
    - & that's it! you can switch Anti-aliasing Modes in the "Post-process Layer" component

    With the original solution I posted, the "Scene_View_Antialiasing.unitypackage", you need to:
    - download the "Scene_View_Antialiasing.unitypackage" file & import it into your project

    - that's it! you can switch Anti-aliasing Modes by changing this line of code:
    -- aa.mode = AAMode.FXAA1PresetB; in the "ViewportAA" script to
    --- any of the modes in the "Antialiasing" script:
    public enum AAMode
    {
    FXAA2 = 0,
    FXAA3Console = 1,
    FXAA1PresetA = 2,
    FXAA1PresetB = 3,
    NFAA = 4,
    SSAA = 5,
    DLAA = 6,
    }
    I use the "FXAA1PresetB" mode now.

    A couple differences between the two anti-aliasing solutions:
    - "Post Processing" lowers my FPS more than the ".unitypackage" solution
    - "Post Processing" requires a scene camera w/ "Post Processing" components
    - ".unitypackage" just adds a folder to your project assets folder
    - ".unitypackage" only adds anti-aliasing to the scene view
    - "Post Processing" effects both the game & scene view

    & they can be stacked! so I'm actually using both now.
    & you don't Have to pick an Anti-Aliasing Mode
    in the Post-processing Layer component,
    at all, for Anti-Aliasing to happen.
    Thanks @coatcoat^! :)
     
    Lars-Steenhoff likes this.
  12. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    so you guys want to get rid of anti aliasing? or add it? not clear lol. but ive found setting filter mode to "point (no filter)" will remove ALL anti aliasing and it will look pixel perfect.

    thouigh I cant work out how to do this on a sprite even this doesnt work

    Code (CSharp):
    1. spriteRenderer.sprite.texture.filterMode = FilterMode.Point;
    spriteRenderer.sprite.texture.filterMode = FilterMode.Point;
     
    Last edited: Mar 16, 2022