-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Why __dirty* is needed? #2079
Comments
Or, more specifically: Why not just say Or something like that? |
Real-time computer graphics is all about performance. Whenever you see something weird, chances are it's there to squeeze out more performance somewhere. In this case, changes to geometry are expensive (while rendering static geometry is cheap, even if it's huge), so we try to limit changes to absolute necessary minimum. And here changes are not atomic on geometry (geometries have multiple components). For example you may want to update just some attributes (position, normal, color, uvs, etc), not all of them at once - this is often the bottleneck, so if you can update just one attribute instead of two, voila, you just doubled the performance. And "dirty" flags are a common technique (and name) for signaling that something has changed. BTW since some time we don't call them anymore "dirty", partly as initiative to make it more newbie friendly (see #697). |
Thank you... BUT I understand what you said. I read the additional note. I converted: And it does not work. It only works with dirty And why is there not a similar change for normals? |
Maybe you are using some old version of the lib? It should work, examples using it work. Read here about exact syntax for all attributes: https://github.com/mrdoob/three.js/wiki/Updates |
Hi all,
I recently asked about modifying a line. Someone helped (thank you). In the process I learned that I must also declare:
May I ask why this happens? I do it, it is fine, I can close the book and move on.
But I am left with an uneasy feeling that there is something not truly fixed.
It is a feeling that this works only because it is a kludge.
Maybe I get this feeling because I am not from the world of computer graphics (my area is mechanical engineering).
But when I see "tricks" like this, I get concerned that I am not learning this correctly, or that three.js is not comprehensive.
I am not asking for someone to explain the specifics of why the above two lines work (I can intuit that that mean "my work got mess and dirty so please revisit this Mr. GPU" or something like that)
But why do you all seem so comfortable with things like this?
The text was updated successfully, but these errors were encountered: