April 13, 2021, 10:28 (GMT) |
Cycles: make megakernel execution work again After addition of more kernels the logic didn't work well anymore, for example shade_light was holding up all paths going to the intersect_closest state. Rather than trying to get all paths to the intersect_closest state, make the megakernel support paths in different states. This seems to help viewport rendering by about 10% here. I also tweaked the threshold to what gave me best performance, but hard to say in general what this value should be. I noticed get_num_active_paths() used for adding more work tiles is not correct since it's double counting some paths. Not fixing it as part of this patch, only adding a comment about it. |
April 10, 2021, 21:10 (GMT) |
Cycles: Tweaks to the resolution divider - Base initial resolution divider on a pixel size. Using hardcoded low resolution provides rather annoying blobby viewport on first enter of rendered viewport. Set the divider in this case to 8 of the native pixel sizes. A bit of heuristic, which seems to give more appealing pixel size, and kind of matches what is possible to setup as fastest preview with the pixel size setting. - Fix miscalculation of how long viewport number of samples will take. Need to properly take number of samples during update into account. Seems to make Junk Shop more interactive on home PC. Although, it was already feeling much better than master. - Always render 4 samples for highest resolution divider. Before it was clamped to the number of samples. There is an explanation in the code but the idea is that this is not slower and does bring extra information during navigation. |
April 10, 2021, 20:24 (GMT) |
Fix fireflies in barbershop due to self intersection With the new handling of lights as regular intersections, float precision could lead to self-intersection, causing the light to be counted many times over and leading to fireflies. This could be generalized to work for all primitives instead of just lights, but that's more involved and could be done later. For now this is a simple isolated change. |
April 10, 2021, 20:23 (GMT) |
Cleanup: remove line of code that has been replaced |
April 10, 2021, 19:05 (GMT) |
Cycles: Suppress adaptive sampling logs when adaptive sampling is not used This way nobody gets confused why there are some calculations about adaptive sampling when adaptive sampling is not used. |
April 10, 2021, 18:44 (GMT) |
Cleanup: remove some unnecessary includes from kernel API Only needed for implementation. |
April 10, 2021, 17:34 (GMT) |
Cycles: Fix compilation error after merge There is no more kernel_globals.h, those are in the kernel/device now. The state of the file did not include this header, so assuming it is safe to remove: it works on my macOS, but the PC is currently busy compiling master's CUDA kernels, so can't easily verify GPU. |
April 10, 2021, 16:50 (GMT) |
Merge branch 'master' into cycles-x |
April 10, 2021, 12:45 (GMT) |
Cycles: Correction to previous commit Committing directly because those are rather trivial fixes for something what got broken rather badly. - Fix compilation error in debug mode. - Fix non-combined passes in viewport. - Fix adaptive sampling for final rendering. |
April 10, 2021, 12:08 (GMT) |
Cycles: Move use adaptive sampling flag to integrator Makes it closer to the rest of the adaptive sampling settings and allows access from Scene. The current downside is that rendering does need an extra integrator synchronize call which will be removed by a followup development. There should be no functional changes. |
April 10, 2021, 12:08 (GMT) |
Cycles: Add idea of automatically created passes Those are the opposite of the ones which are configured by users in the interface. Currently unused, preparing for taking over of automatically creating adaptive sampling passes. |
April 10, 2021, 12:08 (GMT) |
Cycles: Use early output and avoid over-commenting |
April 10, 2021, 12:08 (GMT) |
Cycles: Shorten function name It is inside of viewport parameters, no need to repeat this in the function name. |
April 10, 2021, 12:08 (GMT) |
Cycles: Remove passes from BufferParams Now it is the Scene which is the source of truth for passes. The RenderBuffers will store pre-calculated offsets and strides which are set once when the passes are known. There are few things which are good: - Data is no longer duplicated, is clear where passes are to be accessed from. - Code which sues BufferParams can access offsets and strides directly, without re-calculating anything. - DenoiserBuferParams are removed, since it does not bring any new functionality. Some downsides: - Construction of new RenderBuffers is to be done with a bit more care now. - Passes needs to be passed to `get_pass_rect`. A bit annoying, and almost like the RenderBuffers is the wrong place for this function. - `set_pass_rect` is disabled for now. Is unclear whether it will be needed in the future, and what would it final placement be. |
April 10, 2021, 12:08 (GMT) |
Cycles: Remove baking tile reading code The baking needs to be brought back in a better shape. Removing the code which is to be re-written to simplify some upcoming development. |
April 10, 2021, 12:08 (GMT) |
Cycles: Automatically create adaptive sampling and viewport passes Fixes non-working adaptive sampling in the viewport: the missing passes was the only reason for that. Now the synchronization code is supposed to store passes in Scene and never provide them via BufferParams. The passes are assigned to the BufferParams when dopin session reset. This way the rendering code has access to proper stride information. In the future we can remove passes from BufferParams and pre-compute strides and offsets before passing the BufferParams down the road. Had to explicitly remove the passes: can not rely on the fact that the synchronization code overrides passes in scene as this is not the case for viewport rendering. |
April 10, 2021, 12:08 (GMT) |
Cycles: Simplify delayed reset API Avoids passing arguments around. Currently no functional changes, just simplifies some things in the future in the terms of naming. |
April 10, 2021, 12:08 (GMT) |
Cycles: Use range based loop |
April 10, 2021, 12:08 (GMT) |
Cycles: Clarity comment in integrator synchronization |
April 9, 2021, 15:41 (GMT) |
Fix multi-device (for denoising) crash with background shader evaluation And prepare code a bit support multi-devices in the future, by filling the buffers through a callback per device. |
|