Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line2 dash scale problem on perspective camera #29924

Open
eXponenta opened this issue Nov 19, 2024 · 0 comments
Open

Line2 dash scale problem on perspective camera #29924

eXponenta opened this issue Nov 19, 2024 · 0 comments
Labels

Comments

@eXponenta
Copy link
Contributor

eXponenta commented Nov 19, 2024

Description

Dash scale will change when line out of camera's near plane.

This is because shader trim vertices position, but keep line Distance same.

if ( perspective ) {

Possible solution:
We should trim line distance too ( see sample ):

Reproduction steps

  1. Build Line2 with long segment that will has one of point out of camera near space ( -100, 100 by Z for example )
  2. Enable dash in LineMaterial
  3. Fly around line

Code

///

Live example

https://codesandbox.io/p/sandbox/rn458y

Video:
https://drive.google.com/file/d/1znYC56d1LTgS-0T9wuHUw3rRETozCyNX/view?usp=drive_link

note: green is fixed material instance, purple is original.

Screenshots

image

Version

any

Device

No response

Browser

No response

OS

No response

@Mugen87 Mugen87 added the Addons label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants