Hi,
I’m new to shaders and having trouble with one that I’m sure must be quite simple. I want a texture that grows from the center continually, half my problem is I don’t know what to call this, so it’s hard to google it.
Here’s a video of a similar the effect, only difference is I want it to go outwards.
This is what I was trying, but this just zooms out, I expected % to make it loop, but clearly I was wrong
float4 color = tex2D(TextureSampler, input.TexCoords) * input.Color;
float2 center = float2(.5, .5);
Zoom = (AutoZoom * Time);
float2 deltaCenter = center - input.TexCoords;
float2 patternCoords = float2((center.x + (deltaCenter.x * Zoom)) % 1, (center.y + (deltaCenter.y * Zoom)) % 1);
float4 color2 = tex2D(PatternTextureSampler, patternCoords);
color2 *= color.a;
color += color2 * Intensity;
return color;
Any guidance would be greatly appreciated.