- April 19, 2021, 05:08:09 PM
|
||||||
Gold algorithm | ||||||
![]() |
||||||
Previous Image | Next Image | ||||||
Description: Rendition of Gold algorithm presented here: https://www.shadertoy.com/view/XdGXRV If you enjoy Mandelbox, then be sure to try this out! It's like Mandelbox done right. CPU ------------------------------------ control.maxSteps = 20 control.cx = -0.29001915 control.cy = 0.099999756 control.cz = 1.0099993 control.cw = 1.3200002 control.dx = 0.35000002 control.dy = 1.3 control.dz = -1.1000001 GPU ------------------------------------ float DE(float3 p, device Control &control, thread float4 &orbitTrap) { p.xz = mod(p.xz + 1.0, 2.0) - 1.0; float4 q = float4(p, 1); float3 offset1 = float3(control.cx, control.cy, control.cz); float4 offset2 = float4(control.cw, control.dx, control.dy, control.dz); float3 ot; for(int n = 0; n < control.maxSteps; ++n) { q.xyz = abs(q.xyz) - offset1; q = 2.0*q/clamp(dot(q.xyz, q.xyz), 0.4, 1.0) - offset2; ot = q.xyz; orbitTrap = min(orbitTrap, float4(abs(ot), dot(ot,ot))); } return length(q.xyz)/q.w; } Stats: Views: 85 Total Favorities: 0 View Who Favorited Filesize: 3.49MB Height: 1344 Width: 2780 Keywords: stereo Posted by: kosalos ![]() Rating: ![]() ![]() ![]() ![]() Total Likes: 1 Image Linking Codes
|
||||||
0 Members and 1 Guest are viewing this picture. |
Powered by SMF Gallery Pro