Nautilus shader from shaderToy

Hi,

I’m trying to implemenent the Nautilus shader from shaderToy website. It compile without problem but I can only see weird glitch effect on the renderer and I have no idea where to look at but I feel it’s like a camera or point of view problem.

If you can help me here is the code :

float4x4 tW: WORLD;
float4x4 tV: VIEW;
float4x4 tP: PROJECTION;
float4x4 tWVP: WORLDVIEWPROJECTION;

texture Tex <string uiname="Texture";>;
sampler Samp = sampler_state  
{
    Texture   = (Tex);
    MipFilter = LINEAR;
    MinFilter = LINEAR;
    MagFilter = LINEAR;
};

float4x4 tTex: TEXTUREMATRIX <string uiname="Texture Transform";>;
float time <string uiname="Time";>;
float2 res <string uiname="resolution";>;

float e(float3 c)
{
	c = cos(float3(cos(c.r+time/6.0)*c.r-cos(c.g*3.0+time/5.0)*c.g, cos(time/4.0)*c.b/3.0*c.r-cos(time/7.0)*c.g, c.r+c.g+c.b+time));
	return dot(c*c, float3(1.0, 1.0, 1.0))-1.0;
}

struct vs2ps
{
    float4 Pos  : POSITION;
    float2 TexCd : TEXCOORD0;
};

vs2ps VS(
    float4 PosO  : POSITION,
    float4 TexCd : TEXCOORD0)
{

    vs2ps Out;
    Out.Pos = mul(PosO, tWVP);
    Out.TexCd = mul(TexCd, tTex);
    return Out;
}

float4 PS(vs2ps In): COLOR
{
	float2 c= -1.0+2.0*In.TexCd/res.xy;
	float3 o= float3(c.r,c.g, 0.0), g= float3(c.r,c.g,1.0)/64.0, v = float3(0.1, 0.1, 0.1);
	float m = -0.5;
	
	for (int r=0; r<100; r++)
	{
		float h = e (o)-m;
		if (h<0.0) break;
		o+=h*10.0*g;
		v+=h*0.02;
	}
	
	v+=e(o+0.1)*float3(0.7, 0.7, 1.0);
	
	float a = 0.0;
	for (int q=0; q<100; q++)
	{
		float l = e(o+0.5*float3(cos(1.1*float (q)), cos(1.6*float (q)), cos(1.4*float (q))))-m;
		a+=clamp(4.0*l, 0.0, 1.0);
	}
	//v*=a/100.0;
	v*=a/100.0;
	return float4 (v,1.0);
	
}

technique TSimpleShader
{
    pass P0
    {
        VertexShader = compile vs_1_1 VS();
        PixelShader  = compile ps_3_0 PS();
    }
}

Did you make other test of translating shadertoy into vvvv?
I saw a very nice one this week https://www.shadertoy.com/view/4df3DS which use voronoi functions to create a virtual city.

Is there other example to follow to convert Shadertoy into vvvv?

… no text …

Nautilus 1k by Weyland Yutani (2.1 kB)

wow :)

thx m4d. pretty cool Normal source!

@lecloneur: sorry, was in kind of a hurry yesterday so i didn’t answer properly. since i couldn’t find any obvious mistake in the shader posted my first guess would be that it had something to do with the resolution input pin.

@gegenlicht: nice! :)

@m4d: cool thanks

@gegenlicht: how did you do that? you’ve used the nautilus to create this?

@psylion
You can create this effect by using the nautilus Shader Renderer as a texture source. You can take the Nautilus texture, use the Normal Texturefilter Node and use it with a shader which has Normal- or Bumpmap features. This example is on a standart Sphere and a phong shader.

In this case i used a girlpower example shader from the mre.mdmod.2-pack by @microdee

The are a lot of shaders with Bump & Normal Mapping features around, you could also try fractal or voronoi shaderes etc for some nice Normals :)

thx for the nautilus shader!!! anybody capable of porting this volcanic shader from shadertoy?
https://www.shadertoy.com/view/XsX3RB

+1 raymarching