If you have an email ending in @hotmail.com, @live.com or @outlook.com (or any other Microsoft-related domain), please consider changing it to another email provider; Microsoft decided to instantly block the server's IP, so emails can't be sent to these addresses.
If you use an @yahoo.com email or any related Yahoo services, they have blocked us also due to "user complaints"
-UE

GLSL doesn't allow recursion.

BeeBee
edited 2011-06-07 19:34:05 in General
Dammit, forked lightning texture would be so frigging easy if I could do it recursively, but now I have to do it iterative.

Do you have any idea how much code it takes to iterate a fractal?

I'd try to cheese it and alternate two identical functions, but it only takes bottom-up function hierarchy and doesn't let you prototype either  >=[

Comments

  • We Played Some Open Chords and Rejoiced, For the Earth Had Circled the Sun Yet Another Year
    I dearly, dearly wish I knew what you were saying, @Bee...
  • alternate two identical functions

    I almost understood this

    but wouldn't identical functions be

    identical
  • Eh, recursion does not make sense on a gpu anyway. I think it depends on the fractal and how it recurses to figure out how much code it takes to do it non recursively.
  • BeeBee
    edited 2011-06-07 19:58:46
    It's just forked lightning down to about depth 4.  I'd call recursion a couple extra times if it needs to UV tile, but it's nothing stack-blowing.  So I get to hardcode four layers of for-loops and keep track of four layers worth of iterative parameters.  Joy.

    snowbull: that's the cheap workaround if it doesn't allow strict recursion, yeah :P

    It doesn't let you call f(x) = stuff with f(x), so my next idea was f(x) = stuff with g(x), g(x) = same stuff with f(x).  But since it doesn't allow prototyping either, only one of those functions is low enough on the page to know the other exists.
  • recursive functions are the work of the devil

    maybe they realized that
  • butbutbut...fractals to arbitrary depth and easy UV tiling :(
Sign In or Register to comment.