As Raph is mentioning in a side thread, there are lots of assumptions! (Some of them similar to the randomized assumptions behind alpha, generally).
[1] http://graphics.stanford.edu/~boulos/papers/prefilter_rt08.p...
31–37 of 37 posts
As Raph is mentioning in a side thread, there are lots of assumptions! (Some of them similar to the randomized assumptions behind alpha, generally).
[1] http://graphics.stanford.edu/~boulos/papers/prefilter_rt08.p...
On my Mediatek device, each demo worked great... Until I scrolled up the screen and then suddenly I saw a "Chrome error icon" in the demo... I refreshed the page and the demos were replaced with white boxes. I killed and restarted chrome and now the demos appeared to work till you interacted with them and they became black boxes.
Had to restart the phone to regain full functionality.
Earlier quoted context omitted.
The parent is saying that you can simply do the hard shadow algorithm but n times, starting from n random points uniformly sampled from a disk around the original point light source, then averaging the result. The bigger the disk the softer the shadow. This is how soft shadows are often achieved in ray tracing.
Ah, thanks for clarifying! I think someone already called this out above, but the benefit of the approach I describe is that you only need one sample per pixel. Four samples per pixel starts to feel pretty slow on my machine, and I suspect you'd need more than that to make the averaging approach look good.
This reminded me of a shadow casting engine for the Pico-8 ( https://medium.com/hackernoon/pico-8-lighting-part-1-thin-da... ). Despite the limitations of the "console" the result is quite impressive: https://miro.medium.com/max/384/1*xgIPZgLgcJGBnRhFeJIJLQ.gif
Uncaught Error: Failed to get uniform location for name O get graphics.ts:822 value graphics.ts:950 value graphics.ts:1234 value graphics.ts:493 value renderer.ts:355 value renderer.ts:471 onFrame app.ts:631 t app.ts:501 QCba index.ts:4 QCba index.ts:3 f src.515687e2.js:1 parcelRequire src.515687e2.js:1 src.515687e2.js:1 graphics.ts:822:14 firefox, ubuntu 20.04
Thanks! I just pushed a fix. Does it work now?
Uncaught Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "https://ray-marching-talk.netlify.app/src.c9ac1cf4.js", lineNumber: 20, columnNumber: 0, data: null, stack: "k@https://ray-marching-talk.netlify.app/src.c9ac1cf4.js:20:425... } canvas-scene.ts:1
Uncaught Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "https://ray-marching-talk.netlify.app/src.c9ac1cf4.js", lineNumber: 20, columnNumber: 0, data: null, stack: "k@https://ray-marching-talk.netlify.app/src.c9ac1cf4.js:20:425... } canvas-scene.ts:1
Uncaught Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "https://ray-marching-talk.netlify.app/src.c9ac1cf4.js", lineNumber: 20, columnNumber: 0, data: null, stack: "k@https://ray-marching-talk.netlify.app/src.c9ac1cf4.js:20:425... } canvas-scene.ts:1
Uncaught Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "https://ray-marching-talk.netlify.app/src.c9ac1cf4.js", lineNumber: 20, columnNumber: 0, data: null, stack: "k@https://ray-marching-talk.netlify.app/src.c9ac1cf4.js:20:425... } canvas-scene.ts:1
Uncaught Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "https://ray-marching-talk.netlify.app/src.c9ac1cf4.js", lineNumber: 28, columnNumber: 0, data: null, stack: "t@https://ray-marching-talk.netlify.app/src.c9ac1cf4.js:28:748... } app.ts:269
The algorithm discussed here reminds me very much of the "Line of Sight" problem. Line of Sight is calculated on a 2-d topographical map, where each 2d point is a height-map. The question is: does location "X" have a line-of-sight to location "Y" ?? You solve this question by marching rays from X towards Y, and seeing if any intermediate 2d point has a height that would block the sight. I bring this up because line-o…