W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2010

[whatwg] Offscreen canvas (or canvas for web workers).

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 24 Feb 2010 01:47:33 -0800
Message-ID: <63df84f1002240147t3a8996e3ta5947098b8920e4@mail.gmail.com>
On Wed, Feb 24, 2010 at 1:35 AM, Jonas Sicking <jonas at sicking.cc> wrote:
> On Wed, Feb 24, 2010 at 12:14 AM, Maciej Stachowiak <mjs at apple.com> wrote:
>>
>> On Feb 24, 2010, at 12:09 AM, Maciej Stachowiak wrote:
>>
>> On Feb 23, 2010, at 10:04 PM, Jonas Sicking wrote:
>>
>> On Tue, Feb 23, 2010 at 9:57 PM, Maciej Stachowiak <mjs at apple.com> wrote:
>>
>> - Raytracing a complex scene at high resolution.
>>
>> - Drawing a highly zoomed in high resolution portion of the Mandelbrot set.
>>
>> To be fair though, you could compute the pixels for those with just math,
>>
>> there is no need to have a graphics context type abstraction.
>>
>> http://people.mozilla.com/~sicking/webgl/ray.html
>>
>> I did not think it was possible to write a proper raytracer for arbitrary
>> content all as a shader program, but I do not know enough about 3D graphics
>> to know if that demo is correct or if that is possible in general. Point
>> conceded though.
>
> The big thing that GLSL is lacking is a stack, making it impossible to
> recurse properly. This isn't a huge problem to work around, though can
> result in ugly code. Especially if you want to support transparent
> objects, in which case you'll essentially have to unroll recursion
> manually by copying code.
>
> This of course makes it impossible to recurse to arbitrary levels,
> though that is something you generally don't want to do anyway in a
> ray tracer since it costs a lot of CPU (or in this case GPU) cycles
> for very little visual gain.

Oh, but the math is definitely correct, so GLSL ray tracing is quite possible.

/ Jonas
Received on Wednesday, 24 February 2010 01:47:33 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:21 UTC