Amethyst: [BUG] Debug lines only appear with certain y values

Created on 8 Mar 2019  路  4Comments  路  Source: amethyst/amethyst

Description

When drawing debug line using add_direction or add_line under DebugLinesComponent, certain Y value of the starting point parameter will make the line not rendered on screen.

Reproduction Steps

Please see detail code in the following gist:
https://gist.github.com/Rhadow/693b0bd8fc782c64f9c72c21be365208

Modify the y value from 7.0 to any numbers in this sequence 2, 6, 10, 14, 18, 22, 26... at line 44 of main.rs should make the debug line appear on the screen.

What You Expected to Happen

Debug line should show up with any y values.

What Actually Happened

Debug line only shows up when y value is set to 2, 6, 10, 14, 18, 22, 26....

Your Environment

  1. Operating System: Windows
  2. Operating System Version: Windows 10
  3. Version of Amethyst: 0.10.0
normal low ready engine rendering bug

Most helpful comment

Confirmed it's fixed by rendy 馃憣.
Example PR: https://github.com/amethyst/amethyst/pull/1703
Video: https://imgur.com/ampnCrw

All 4 comments

Looks like the debug lines doesn't work properly with Orthographic projection, and still uses perspective. The special values are probably when the rounding is just right such that the computer decides to render the lines.

The following has the origin at the bottom left, with world coordinates going from 0 to 800 left to right, and 0 to 600 bottom to top.

debug_lines_ortho

You can see that the closer the vertical / horizontal lines are to the left / bottom, they become thicker.

The above is generated from this example. Without the + 2 to the y coordinate here, you can't actually see the horizontal lines, which is likely the same as the original issue.

This is likely fixed with new debug lines pass in amethyst_rendy. Need to port and test the reproduction.

Confirmed it's fixed by rendy 馃憣.
Example PR: https://github.com/amethyst/amethyst/pull/1703
Video: https://imgur.com/ampnCrw

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kvark picture kvark  路  5Comments

azriel91 picture azriel91  路  3Comments

aschuhardt picture aschuhardt  路  5Comments

Binero picture Binero  路  5Comments

Type1J picture Type1J  路  3Comments