From The Depths - Forum

Full Version: Multithreading Rendering
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I don't have access to tools atm, but I gave few min to read about possible multithreading and rendering.

I found following discussion
How to render a visual on another thread
http://stackoverflow.com/questions/25945...her-thread

Discussion provides some code examples, how this could be done.

My thought is, if multicameras would be possible to render on separate threads, then they could be overlapped.
Anything what is up close, would be on one camera, anything which is further, on next and so on.
This could be done with setting near-far view distance, for each camera.

As this sounds great in terms of improving rendering performance, I have no Idea, if that can be feasible, in c ase of FtD.

Perhaps Nick's comments would be welcome here.
Profile first to find out what is really taking all the time and optimize that area.

Seriously, profile first.
Nick has stated not so long ago that rendering takes major part of CPU processing.
Hence, I have posted this topic.
Multithreading is very hard to get working if not done properly it WILL backfire and increase load on the machine. In that specific link the question is about rendering in a different thread but the answer is for rendering in the same thread, just async.
This might be more useful:
http://www.gdcvault.com/play/1022186/Par...Dog-Engine
(2016-05-19, 01:25 PM)Antypodish Wrote: [ -> ]Nick has stated not so long ago that rendering takes major part of CPU processing.
Hence, I have posted this topic.

Shouldn't the GPU do the render stuff?
I may be wrong, but I think that multithreading strictly for rendering, is not that critical if is async, or not. Ass long it can be done on separate thread. And yes, toward last response, presented code is converted to async. I need find some time evening, to watch provided video in full. However I have seen similar before I think.

Worth discussing/investigating.
(2016-05-19, 02:50 PM)Le Sir Wrote: [ -> ]
(2016-05-19, 01:25 PM)Antypodish Wrote: [ -> ]Nick has stated not so long ago that rendering takes major part of CPU processing.
Hence, I have posted this topic.

Shouldn't the GPU do the render stuff?

GPU can take care for fancy graphics effects and shadders, but basic rendering calculations are done by CPU. And here we got lot of them here (FtD). As the result lagging with many blocks. That how I understand.
I'm just gonna leave this here
[Image: CPUvsGPU21.jpg]
Profiled the benchmark

Might be worthwhile
So this indicates further that rendering is major bottle neck.
If we can find good solution to that matter, we all would benefit.

Thx for an input.
Keep bringing in.
Pages: 1 2