Search Issue Tracker

Fixed in 5.0.1

Votes

0

Found in [Package]

4.0.1

Issue ID

1292637

Regression

No

Debug Lines are not drawn inside the screen when using Pixel Perfect Camera Component

Package: 2D Pixel Perfect

-

Reproduction steps:
1. Open user attached project
2. Open SCENEPATH scene
3. Press Play
4. Run to the left wall
5. Enable and disable the Pixel Perfect Component on the Camera

Expected result: Debug Lines are drawn around the character with Pixel Perfect Component enabled
Actual result: Debug Lines are only drawn outside the screen with an offset

Reproducible with: 3.0.1 (2020.1.17f1), 4.0.1 (2020.2.3f1, 2021.1.0b4, 2021.2.0a3)
Could not test with: 2018.4, 2019.4 (Compiler errors)

  1. Resolution Note (fix version 5.0.1):

    Fixed in: 2022.1.0a6

  2. Resolution Note (fix version 5.0.1):

    Fixed in: 2021.2.0b8

  3. Resolution Note (fix version 5.0.1):

    Fixed in: 2021.1.18f1

Comments (1)

  1. marrobin

    Feb 19, 2021 10:41

    I raised the same issue with Freya Holmér, since her Unity Store Asset "Shapes" was displaying the same issue. This was her response:
    ~~~
    this is likely an issue with the way the pixel perfect camera works - so it seems to be a Unity bug yeah :c

    it seems to:
    • cache the buffer at ResolveColor
    • then Shapes draws (Shapes Draw Command)
    • then it reapplies the old ResolveColor state in Camera.ImageEffects.DrawDynamic, so anything that was drawn in between gets discarded.

    I imagine GL.Lines has the same issue because it happens between these steps too :(

    Edit: Actually, this is a specific issue when called at the camera event BeforeImageEffects, if you instead use AfterForwardAlpha it seems to work :)

    using( Draw.Command( cam, CameraEvent.AfterForwardAlpha ) ) {
    // ...
    }

    (this is still a Unity bug though, before image effects should absolutely work, but it doesn't)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.