• April 19, 2021, 02:52:46 AM

0 Members and 1 Guest are viewing this topic.

#### kosalos

• Fractal Friar
• Posts: 142
« on: June 27, 2020, 06:42:31 AM »
1. calculate your fractal as usual, storing to a texture.

Here's an Apple Metal shader, but you get the idea...
--------------------------------------------------------------

(
constant Control &control [[buffer(0)]],                       // merely holds the size of the texture
{
if(p.x > uint(control.xSize)) return; // screen size not evenly divisible by threadGroups
if(p.y > uint(control.ySize)) return;

if(p.x > 1 && p.y > 1) {

{
uint2 p2 = p;
p2.x -= 1;
if(v.x < vx.x || v.y < vx.y) shadow = true;
}

{
uint2 p2 = p;
p2.y -= 1;
if(v.x < vx.x || v.y < vx.y) shadow = true;
}

{
uint2 p2 = p;
p2.x -= 1;
p2.y -= 1;
if(v.x < vx.x || v.y < vx.y) shadow = true;
}

v.x /= 4;
v.y /= 4;
v.z /= 4;
}
}

dst.write(v,p);
}

There are no comments for this topic. Do you want to be the first?

### Similar Topics

###### Menger sponge with raytraced shadow

Started by Nintendokater on Fractal Image Gallery

2 Replies
406 Views
August 18, 2019, 10:56:42 PM
by ThunderboltPagoda
###### Silver lines

Started by Etymos on Fractal Image Gallery

0 Replies
132 Views
August 31, 2018, 09:38:59 PM
by Etymos
###### Menger sponge out of frames in less than 20 lines + renders

Started by kronpano on StructureSynth & BrowserSynth

0 Replies
100 Views
September 25, 2020, 11:36:41 AM
by kronpano
###### Nazca lines - A Mandelbrot zoom to 2.7E359

Started by Fluoroantimonic_Acid on Fractal movie gallery

3 Replies
539 Views
October 28, 2020, 05:27:10 AM
by 3DickUlus