Vux Shader Phoenix Julia DX11 Version?

Dear VVVV’s

I was wondering if anyone has ported this shader to DX11:

vux shaders list
Julia phoenix fractal shader (based on tonfilm fractal shader). Need VS 1.1 and PS 3.0

I know there is a Mandelbrot Shader but ive built some installation built around this Version as its base texture.

Ive been trying to port this and have been meaning to learn some shader magick for some time now but didn’t quite find a good starting point. If anyone could point out a good Book for DX11 Shader’s in VVVV please point me into the right direction. :)

cheerio

//Phoenix Julia Shader
//Based of tonfilm's fractal shader

// --------------------------------------------------------------------------------------------------
// PARAMETERS:
// --------------------------------------------------------------------------------------------------

//transforms
float4x4 tW: WORLD;        //the models world matrix
float4x4 tV: VIEW;         //view matrix as set via Renderer (EX9)
float4x4 tP: PROJECTION;
float4x4 tWVP: WORLDVIEWPROJECTION;

//texture
texture Tex <string uiname="Color Palette";>;
sampler Samp = sampler_state    //sampler for doing the texture-lookup
{
    Texture   = (Tex);          //apply a texture to the sampler
    MipFilter = LINEAR;         //sampler states
    MinFilter = LINEAR;
    MagFilter = LINEAR;
};


//texture transformation marked with semantic TEXTUREMATRIX to achieve symmetric transformations
float4x4 tTex: TEXTUREMATRIX <string uiname="Texture Transform";>;

//the data structure: "vertexshader to pixelshader"
//used as output data with the VS function
//and as input data with the PS function
struct vs2ps
{
    float4 Pos  : POSITION;
    float2 TexCd : TEXCOORD0;
};


//User parameters

float2 scale = 1;
float power1 = 2;
float power2 = 0;
float2 center;
float2 offset;
float2 induct;
int iter = 10;


- include "Complex.fxh"

// --------------------------------------------------------------------------------------------------
// VERTEXSHADERS
// --------------------------------------------------------------------------------------------------
vs2ps VS(
    float4 PosO  : POSITION,
    float4 TexCd : TEXCOORD0)
{
    //inititalize all fields of output struct with 0
    vs2ps Out = (vs2ps)0;

    //transform position
    Out.Pos = mul(PosO, tWVP);
    
    //transform texturecoordinates
    Out.TexCd = mul(TexCd, tTex);

    return Out;
}



// --------------------------------------------------------------------------------------------------
// PIXELSHADERS:
// --------------------------------------------------------------------------------------------------
float4 PS_JuliaPhoenix(vs2ps In): COLOR
{
    float2 z, c;

    float2 y,newz;
    y = float2(0,0);
    newz = float2(0,0);
    


    z = (In.TexCd-0.5) * scale + offset;

    int i;
    c = z;
    bool stop = false;
    for(i=0; i<iter && !stop; i++)
    {      
        newz = Add(Power(z,power1),Multiply(y,induct));
        newz = Add(newz,Multiply(Power(z,power2),center));
        y = z;
        if((newz.x * newz.x + newz.y * newz.y) > 1e20) stop = true;
        z = newz;
    }

    float4 col = tex1D(Samp, (float)(i == iter ? 0 : i) / iter);
    return col;
}



// --------------------------------------------------------------------------------------------------
// TECHNIQUES:
// --------------------------------------------------------------------------------------------------
technique TPhoenixJulia
{
    pass P0
    {
        VertexShader = compile vs_1_1 VS();
        PixelShader = compile ps_3_0 PS_JuliaPhoenix();
    }
}




technique TFixedFunction
{
    pass P0
    {
        //transforms
        WorldTransform[0](0)   = (tW);
        ViewTransform       = (tV);
        ProjectionTransform = (tP);

        //texturing
        Sampler[0](0) = (Samp);
        TextureTransform[0](0) = (tTex);
        TexCoordIndex[0](0) = 0;
        TextureTransformFlags[0](0) = COUNT2;
        //Wrap0 = U;  // useful when mesh is round like a sphere
        
        Lighting       = FALSE;

        //shaders
        VertexShader = NULL;
        PixelShader  = NULL;
    }
}

“Complex.fxh”

//Complex functions on shaders (uses float2 as data structure)


//Modulus
float Modulus(float2 input)
{
     return sqrt(input.x * input.x + input.y * input.y);
}

//Complex to power (power as real)
float2 Power(float2 c, float power)
{
     float modulus =  pow(c.x * c.x + c.y * c.y, 0.5 * power);
     float a = atan2(c.y,c.x) * power;
     float2 result;
     result.x = modulus * cos(a);
     result.y = modulus * sin(a);
     return result;
}


//Multiplies two complex numbers
float2 Multiply(float2 c1, float2 c2)
{
	float2 result;
	result.x = (c1.x*c2.x - c1.y*c2.y);
	result.y = (c1.x*c2.y + c1.y*c2.x);
	return result;
}

//Add two complex numbers
float2 Add(float2 c1, float2 c2)
{
	float2 result;
	result.x = c1.x + c2.x;
	result.y = c1.y + c2.y;
	return result;
}

seems missing some assets

PhonixJulia.rar (2.1 kB)

thx a lot :)