« first day (3767 days earlier)      last day (1243 days later) » 

user92578
11:25 AM
Ever since having to manually unroll for loops into while loops in Scala I've not trusted JIT to be able to do anything performance critical :/
 
nwp
12:11 PM
And here I am, not having needed performance for anything ever :D
 
 
2 hours later…
2:16 PM
Just buy a better computer, right?
 
2:30 PM
Looks like it's going to be a quiet day today...
 
@Vaillancourt I'd love to, but I can't buy parts that they don't stock.
 
Yeah, that's an annoyance.
We need logitech products with our software, and we run into similar issues...
Logitech will make sure shelves are empty of their "old product" before introducing the new one.
 
Yes, and I need to remind myself that in my case it's only an annoyance.
@Vaillancourt That's lame. I've thoroughly enjoyed the few Logitech bits of gear I've owned, but that would really chafe in a work situation.
 
2:48 PM
Yeah. It all sums up to: "Depending on a 3rd party tech company that doesn't care about you sucks."
 
nwp
3:12 PM
@Vaillancourt Nah, just realize that existing computers are insanely fast. Also not trying to do crazy things like raytracing helps.
 
@nwp Yeah. It helps too ;)
 
nwp
I remain baffled that gamedevs run into performance issues constantly and I don't.
 
I suppose those folks always want to push it a bit more over the limits...
 
nwp
The few times I did run into performance issues it was caused by obvious Shlehmil algorithms.
 
We have issues with performance with physics because I implemented the ECS and "it worked fine" when I finished the infrastructure but we had no content yet. On the todo list was to "revisit it", but we never did.
 
nwp
3:28 PM
I guess trying to put millions of things into the ECS will also bring down modern computers.
 
Yes. We don't have that.
It's just that, for now, the components that own the physics objects are not well organized. The Physics engine has ways to "partition space" for optimal processing, but the ECS sees each component individually, and has no way, for now, to organize them as a whole.
Same with our graphics nodes.
We also like to abuse physics as much as we can.
 
nwp
Newton, Einstein and Schödinger will haunt you in your dreams.
 
Haha
 
 
6 hours later…
9:14 PM
1
Q: How would I optimize that piece of code using Unity?

Ahmed SalehI'm doing filtering on a depth image and I would like to convert that piece of code into job system of unity, because it's so slow. The image update is called each frame public unsafe void DRSFilter( byte * src, byte * dst, uint data_delta, uint history_scan_depth) { if (history_...

In that question
what If source is Texture2D
how would I call Filter on Texture2D instead of render to texture
 
user92578
9:29 PM
I have no idea what you are trying to do, but have you tried converting the Texture2D into a RenderTexture?
 
Yes but I need _historyPages[i] = new RenderTexture(source);
as @DMGregory wrote
 
user92578
Alternatively have you just tried replacing the correct RenderTextures with Texture2D?
 
yes but at that line
which source should I give ?
 
user92578
I'm not sure but _historyPages to me seems like it's read only? Wouldn't that mean that it could just be an array of Texture2Ds? I know nothing about Unity but that's what I'm assuming from the naming
 
            _historyPages[i] = new Texture2D(width, height);
                filterMaterialAssetLeft.SetTexture(_historyIDs[i], _historyPages[i]);
yes I replaced them
but at first frame they are empty textures
 
user92578
9:32 PM
Instead of having me work & guess up to the actual code you are using, could you perhaps share your updated code?
 
user92578
Couldn't you just start by assigning source to each of the history pages?
 
user92578
I fail to see a reason why they all could not reference the same image
 
With blit ?
 
user92578
No, by _historyPages[i] = source;
 
9:34 PM
aha
 
user92578
All though I'm not sure if the inout-parameterness of source affects things
 
user92578
There is also Graphics.CopyTexture
 
9:59 PM
Thanks so much for your help
I implemented the temporal gaussian
just needs some work
to fix it
right now I get loop unrolling error
for (dx = _MainTex_TexelSize.x, x = -r, p.x = 0.5 + (pos.x * 0.5) + (x * dx); x <= r; x++, p.x += dx) {
xx = x * x;
for (dy = _MainTex_TexelSize.y, y = -r, p.y = 0.5 + (pos.y * 0.5) + (y * dy); y <= r; y++, p.y += dy) {
_MainTex_TexelSize is 1/ width
: unable to unroll loop, loop does not appear to terminate in a timely manner (1024 iterations) at line 83 (on d3d11)
 
user92578
Is float++ even legal?
 
I guess in GLSL it is
 
user92578
It might not be able to unroll since the amount of iterations depends on _blurRadius?
 
it's 5
 
user92578
It might also not appreciate the floating point arithmetic, have you tried with integers?
 
10:06 PM
will try
 
user92578
I also don't get why dx and dy are assigned in the loop initializer when they do not change
 

« first day (3767 days earlier)      last day (1243 days later) »