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

[E2 - EGP] Shape fail on rectangular EGP screen #3068

Open
PM6176 opened this issue May 15, 2024 · 3 comments
Open

[E2 - EGP] Shape fail on rectangular EGP screen #3068

PM6176 opened this issue May 15, 2024 · 3 comments

Comments

@PM6176
Copy link

PM6176 commented May 15, 2024

Describe the bug
When utilizing a rectangular EGP screen, any shape represented appears distorted (e.g., a circle becomes oval). I attempted to apply :egpResolution() to manually scale the screen, but when rotating the circle, distortion still occurs.

To Reproduce
Steps to reproduce the behavior:

  1. Place an rectangular EGP screen (Note: im currently use an addon who provide extra models for the EGP, so at 99% the scale is not correct with another one);
  2. Paste and save the following code:
@name EGP Shape fail
@inputs Main:wirelink

if(first()|duped()|dupefinished()){
    Main:egpClear()
    Main:egpResolution(vec2(0,0),vec2(512,388))
    Main:egpWedge(1,vec2(158,100),vec2(124,72))
    Main:egpSize(1,20)
    Main:egpAngle(1,0) #CHANGE ME
    Main:egpColor(1,vec4(250,255,250,255))

}
  1. Link the EGP to the E2 then refresh the E2;
  2. Now you can see the circle is quite correct;
  3. After notice that, edit the E2 code and change the value of the "Main:egpAngle()" to 45;
  4. Now you can see the problem.

Expected behavior
I expect the shape to maintain its scale during rotation using the :egpAngle() function.

Screenshots
img 1
img 2

@deltamolfar
Copy link
Contributor

Seems like resolution issue, and not screen itself issue.

@PM6176
Copy link
Author

PM6176 commented May 30, 2024

The problem is only for rectangular screens, the resolution is used for keep the aspect of square type, (so if for example I want a square I simply put the same vectors vec2(50,50)).
The problem is that: If I not apply the resolution scale, I need to adjust the single EGP objects, and in any case if I try to apply an angle, I get the same problem.

At this point my question is: How I can keep the shape when I try to rotate the object?
In logical term once I set the resolution and the object dimention, the EGP need to keep that scale in every position, but this dosen't work.

@Denneisk
Copy link
Member

Would be nice if scaling was handled by the screen renderer rather than individually on each object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants