wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

view_3D: use a sensible default for depth scale

Open dkondor opened this issue 3 years ago • 2 comments

Fixes #1359

This is a workaround that avoids a segfault if output is null by using a default value for "size". I'm assuming that a view without an output will not be rendered, so the actual value does not really matters.

Notice: Wayfire's development is temporarily happening in the stabilize-api branch. If you open a pull request for the master branch, it will likely not be merged before the stabilize-api branch is itself merged into master.

dkondor avatar Dec 30 '21 16:12 dkondor

Looking at this again, I have the feeling we must be doing something wrong, but I don't know what :/ This seems more like a hack to get it working, not a real solution (the current state of the code isn't any better)

ammen99 avatar May 26 '22 08:05 ammen99

My intuition is that the correct value for the depth scale should depend on the relation between the distance the user's eyes are from the screen and the physical size of the display. But since the output is 2D content, there is likely a broader range of values that look reasonably well, so maybe any dependence on screen size could be avoided?

dkondor avatar May 26 '22 21:05 dkondor

I submitted a slightly better fix in #1883, thanks for this PR nonetheless :)

ammen99 avatar Sep 03 '23 05:09 ammen99