Timeline for DirectX shader - how to spread raytracer computation over multiple frames?
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 2, 2017 at 15:01 | comment | added | 3Dave | @Twodordan Welcome back. I wasn't saying to use two render targets - just one that's half the width and height of your window. Then, draw the render target scaled 2x to a screen-aligned quad. In the fragment shader, check your pixel coordinates and discard even or odd pixels. You'll save the cost of lighting 3/4 of window, and get the effect you're looking for. | |
| Dec 31, 2016 at 9:42 | vote | accept | Spectraljump | ||
| Dec 31, 2016 at 9:30 | comment | added | Spectraljump | Sorry for the late reply (was on vacation). Thanks a heap for the explanation. I don't think you can get the effect of rendering every other pixel every frame by using two 0.5x res render textures. The best I can do this way is split the screen into many small-ish quads but that would look patchy. So I think I have to do it with a compute shader, where my fullscreen texture is a 2D shared buffer, and the x available compute threads write to it at every other index. | |
| Dec 16, 2016 at 15:08 | comment | added | Stormwind | Otoh, one could imagine that if consistently doing every 2nd pixel on all threads, the total should be faster? Then again, my impression is that if the code segment you early-exit holds for example a tex2D later on, the sampler will execute and consume time in any case? Splitting into smaller homogenous pieces sounds right. And ofc one might still be able to trick each halve into actually representing a fullscreen, with 1 px offset in between. With some mambojambo :-). But reading from those two into every other px in the result sounds ... hmmm | |
| Dec 15, 2016 at 18:58 | history | edited | 3Dave | CC BY-SA 3.0 |
removed extraneous word.
|
| Dec 15, 2016 at 18:42 | history | edited | 3Dave | CC BY-SA 3.0 |
text correction
|
| Dec 15, 2016 at 18:36 | history | edited | 3Dave | CC BY-SA 3.0 |
added 588 characters in body
|
| Dec 15, 2016 at 18:29 | history | answered | 3Dave | CC BY-SA 3.0 |