If anyone has in-depth knowledge of the rendering pipeline, please help me with fixing the issue(s) with rendering. I have no experience with or knowledge about the rendering pipeline so any help is greatly appreciated.
The problem is not with rendering here but one of the function you changed is not behaving the same way. The rendering is just a symptom and we should mostly dig for the root cause.
I guess you need to test the functions themselves as anyway the change is really large and having tests would help getting confidence it won’t introduce any regressions. The rendering is only a symptom here.
Also the tests would be helpful to validate the perf impact as we could use them with some kind of load tests.
I agree. The reason I’m looking for a rendering pipeline expert is that there are around a hundred different functions. Testing each of them with all the values that could cause different results (e.g. 0, -1, 1) and a couple of other real numbers would result in 500+ tests. I think doing that many tests would be a waste of time since we could find the function(s) causing the issue by reviewing the code calling it. For now, I will start doing some manual tests.
I want to underline that this is my MAIN concern. i find the code you provided elegant but we already tried several attempts like this one in the past and we always had to rollback as the hit on the perf side was significant.
That being said, we need to test first of course. Maybe your approach is smarter and thus it will be a superb contribution.
You cannot assume that if len === 1 then you can return result because result will be zero most of the time. So the easy fix is to only return directly when len === 0 only.
I just finished working on unit tests for every Vector3 method/static. Thank you so much for finding that. I will add tests to the PR for future vector changes.
@Vortex before you fix it all and add lots of tests, you should validate that perf won t be an issue. It would be a shame to throw away all this great work if the perf were not recoverable. I agree the latest fixes could impact perf but I d guess the majority of the changes are in to validate your assumptions that it will be at least as fast.
Even if the standardization doesn’t work, the tests will still be useful. I’m writing them for the classes separately since Vector doesn’t care about the dimension of operands for many methods.
This is related to transparency. The background color of the canvas in the vis-test was recently set to greenyellow to force seeing changes when a transparent element is rendered. Feels like there is an issue with the way colors are parsed in these situations.
Is it possible that there is some conversion from color3 to color4 that sets the 4th value to 0 instead of 1?
I’ve changed Vector from having a vector property to instead extending Array and having the properties directly on the object. Using vector[i] instead of vector.vector[i] should speed up performance.
It is currently not working though, and fails on every test.
@Evgeni_Popov@Deltakosh
The tests are saying that the methods on Vector do not exist. I can’t think of any reason why these errors are occuring. What do you think?