View Single Post
Old 7th June 2008, 11:16   #38
Flexi
wellspring of milk
Major Dude
 
Flexi's Avatar
 
Join Date: Apr 2007
Location: 54.089866,12.11168,18.75
Posts: 2,058
Send a message via ICQ to Flexi
thanks for shortening the code! wicked math

Quote:
redi jedi:
Where you rendering 4 shapes with a different number of sides while also doing complex warps and or composites? because recreating a single shape by it self is trivial, its running it with say a fractal in the background that its feeding off of...
again, see the ferny ernie preset:
PHP Code:
// warp shader code:
float1 s,c,m;

shader_body
{
float2 uv_limb 0.5 + (uv-0.5)*float2(1.18,1.2) + float2(0,1)*0.08;
float1 limb tex2D(sampler_fc_mainuv_limb).x;

float2 uv_l = (uv 0.5)*float2(1,-1)*aspect.xy;
float2 uv_r uv_l;
float2 uv_ll uv_l float2(0.105,-0.015);
float2 uv_rr uv_l float2(0.105,+0.015);

_qb.x;
_qb.y;
uv_l 0.5 3.5*float2s*uv_l.c*uv_l.yc*uv_l.s*uv_l.y)*aspect.yx float2(+0.45,-0.67);

_qb.z;
_qb.w;
uv_r 0.5 3.5*float2s*uv_r.c*uv_r.yc*uv_r.s*uv_r.y)*aspect.yx float2(-0.45,-0.67);

_qc.x;
_qc.y;
uv_ll 0.5 1.8*float2s*uv_ll.c*uv_ll.yc*uv_ll.s*uv_ll.y)*aspect.yx*float2(0.85,1) + float2(0.05,-0.06);

_qc.z;
_qc.w;
uv_rr 0.5 1.8*float2s*uv_rr.c*uv_rr.yc*uv_rr.s*uv_rr.y)*aspect.yx*float2(0.85,1) + float2(-0.05,-0.06);

float1 l tex2D(sampler_fc_mainuv_l).x;
float1 r tex2D(sampler_fc_mainuv_r).x;
float1 ll max(tex2D(sampler_fc_mainuv_ll).x,tex2D(sampler_fc_mainuv_ll).y);
float1 rr max(tex2D(sampler_fc_mainuv_rr).x,tex2D(sampler_fc_mainuv_rr).z);
ret.max(limb,max(l,r));
ret.ll;
ret.rr;
ret ret*1.2 0.01;

this code composes a fractal by 5 copies of itself including the drawing in background effect. well, i didn't limit the faked shapes by borders. But for example see how ret.y and ret.z are feeded by the red channel (have a closer look at the rr = max(...) expression)


@Phat:
if you can point me to a 1.05beta preset, which uses mirrored shapes, i would really love to reinterprete it with MD2.
Flexi is offline   Reply With Quote