HLSL shader effect question

I want to create a repeat effect of a Texture in HLSL which let me decide the number of repetition, the scaling, the angle and the position similiar to the attached picture.

Is that possible to do it with HLSL? May somebody have a hint how to do the repeating and scaling in HLSL? I tried to understand the kaleidoscope code, but it isn’t so easy to understand. I also gave a look at the blur shaders, but I didn’t understand till now how to create only stripes of the texture.

Thank you in advance! :)

that effect is more easy with texture transforms and spreads… if you connect the same transformation to the object and the texture transformation, you will have seamless image. then you can add some additional offset transformations to the texture transformations. that should give similar effects.

Thank you tonfilm for your answer!

I know that way using texture transform like Joreg did in the “Stripes” node. I wanted to know if it is possible to do it in a shader for saving CPU calculations…

Maybe Unc’s Mosaic fx is a starting point.

Hello, I very bad speak in English, sorry for that(Google translate helps :) )
I have question - how do repeat texture on hlsl?

texture transform pin, use scale 2 or higher

Excuse me, but i bad understand, where write scale :(

matrix worldMatrix;
matrix viewMatrix;
matrix projectionMatrix;
Texture2D shaderTexture;

SamplerState SampleType
{
    Filter = MIN_MAG_MIP_LINEAR;
    AddressU = Wrap;
    AddressV = Wrap;
};

struct VertexInputType
{
    float4 position : POSITION;
    float2 tex : TEXCOORD0;
};

struct PixelInputType
{
    float4 position : SV_POSITION;
    float2 tex : TEXCOORD0;
};



PixelInputType TextureVertexShader(VertexInputType input)
{
    PixelInputType output;
    
    input.position.w = 1.0f;

    output.position = mul(input.position, worldMatrix);
    output.position = mul(output.position, viewMatrix);
    output.position = mul(output.position, projectionMatrix);

    output.tex = input.tex;
    
	return output;
}


float4 TexturePixelShader(PixelInputType input) : SV_Target
{
	float4 textureColor;

	textureColor = shaderTexture.Sample(SampleType, input.tex);

    return textureColor;
}

technique10 TextureTechnique
{
    pass pass0
    {
        SetVertexShader(CompileShader(vs_4_0, TextureVertexShader()));
        SetPixelShader(CompileShader(ps_4_0, TexturePixelShader()));
        SetGeometryShader(NULL);
    }
}