Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
PointMaterial's sizeAttenuation blows up near origin with Orthographic Camera #7517
Revision #: r73
The two sets of points should be drawn at roughly the same size, with the blue points being slightly smaller (as they are further from the camera). That or
I'm no Open/WebGL wizard but I suspect that something odd is happening with the math in the points vertexShader somewhere around here.
Yes and no. Yes in that they are uniformly sized. No in that the result doesn't match expectations given the documentation:
I guess I have two expectations:
In my case, I was rendering points in a line based on some data (like a line graph) when I came across this. They ended up filling the viewport and it took a while to figure out that the
I understand the purpose of the feature on a perspective camera but it feels like it makes less sense on an orthographic one. As I understand it, the purpose of that setting is to make Points feel like they make more sense in Perspective views by faking the foreshortening. It doesn't really make sense for orthographic.
If this sticks around for Orthographic I'd like to know what to expect, I guess. What are the sizes going to look like at different distances? I.e. where is the midpoint where the drawn size is 1:1 with the
But maybe I just need to study up more on my 3D math ;)
Would it be possible to switch the default to false? I mean a point is a point is a point. Personally, I would expect points to render as pixels unless I changed their
What do lines do? Their width doesn't dynamically change based on distance, right? Even in perspective cameras?
It is still somewhat surprising that "points" do not have the
At the very least, there does appear to be some math that determines the scaling based on the distance to the camera. There is currently no way to get a decent expectation of what's going to happen when you place a point at a specific distance without some kind of trial and error (especially since size attenuation in an orthographic camera is all fakery). Could something at the very least be done there?