FragM multiple object transparency with user defined depth

  • 2 Replies
  • 92 Views

0 Members and 1 Guest are viewing this topic.

Offline kosalos

  • *
  • Fractal Friar
  • *
  • Posts: 118
« on: October 27, 2019, 01:22:20 AM »
DE-Raytracer-Layers.frag has been designed to allow for up to 9 ray-marched fractal 'layers' to be blended together.
The new widget group "Layers" has been added, where you specify the opacity of each layer,
and, if "useActualDepth" is unchecked, the stacking order of the fractal objects.

In the attached example frag collection: "WhippedEgg" is the parent frag.
The parent frag contains the #preset section.
All the other frags are child frags containing only their DE() function.

Notes on usage (refer to WhippedEgg)
line #1:  #version 120    is required only because Starburst defines structured data.
line #8:  uniform float time;  because all frags in this example have animated features
line #36: float timeOffset;  the water frag is called twice, with these variables setting the difference between the 2 calls.
line #40: include the child frags in the order you want their widget groups to display.
line #87: call init() routines for all frags.
line #144:  the one and only DE() routine called by DE-Raytracer-Layers.frag.
   The Raytracer calls DE() with global integer 'layerIndex' advancing from 0 to 8.
   call the parent frag and all the children, and then return "NO_MORE_LAYERS" to terminate session.

Note: set <Camera><Stereo> to 2 for cross-eyed stereo, the adjust <EyeSeparation> for best effect.


Linkback: https://fractalforums.org/code-snippets-fragments/74/fragm-multiple-object-transparency-with-user-defined-depth/3162/

Offline 3DickUlus

  • *
  • 3f
  • ******
  • Posts: 1518
    • Digilantism
« Reply #1 on: October 27, 2019, 05:42:04 AM »
some interesting stuff going on there  :thumbs:
« Last Edit: October 27, 2019, 05:57:58 AM by 3DickUlus »

Offline SCORPION

  • *
  • Fractal Phenom
  • ****
  • Posts: 59
« Reply #2 on: October 27, 2019, 07:56:26 AM »
Great idea!
 :yes: :thumbs:


clip
FragM Transparency experiment

Started by kosalos on Code Snippets (fragments)

7 Replies
145 Views
Last post October 26, 2019, 10:54:07 PM
by 3DickUlus
xx
math not defined in scripting environment

Started by claude on Fragmentarium

1 Replies
146 Views
Last post January 04, 2019, 03:50:47 AM
by 3DickUlus
clip
Sectionally defined Julia sets

Started by marcm200 on Image Threads

5 Replies
365 Views
Last post August 20, 2019, 03:17:11 PM
by marcm200
xx
Looking at a 3D object from 4D

Started by marcm200 on Off Topic

7 Replies
272 Views
Last post February 22, 2020, 01:01:23 PM
by marcm200
xx
Amazing Underwater Object tutorial

Started by timemit on Fractal Image Gallery

0 Replies
238 Views
Last post October 29, 2017, 01:20:20 PM
by timemit