POV-Ray : Newsgroups : povray.off-topic : WebGL : Re: WebGL Server Time
28 Jul 2024 04:17:11 EDT (-0400)
  Re: WebGL  
From: Orchid Win7 v1
Date: 12 Jun 2016 08:02:44
Message: <575d4f64$1@news.povray.org>
On 10/06/2016 08:24 AM, Orchid Win7 v1 wrote:

> Still trying to work out how you "average over several frames".
> ShaderToy is great fun, but so *utterly* undocumented... it's quite hard
> to figure out how to do anything.

OK, I think I've cracked it:

If you click the "new tab" button, it gives you another shader, that 
renders to Buffer A. If you then set iChannel0 to be Buffer A, you can 
do a texture2D(iChannel0, coords) to read the previous frame's pixel value.

Now you just need to set the main image shader to be a texture2D() 
lookup on Buffer A, and you're golden.

Not what you'd call "obvious"...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.