Shader errors changing to DesktopGL

This shader is being used with sprite batch right ?

Hold on ill make a test project and make sure it runs im pretty sure the line here
and the use of it is screwing up your shader.

sampler s0; 

try the following really quick

// sampler s0; // comment it out.

// in all the lines below change out the s0 to the SpriteTextureSampler
// as below

color += tex2D(SpriteTextureSampler, input.TextureCoordinates + float2(blurScaledAmount, 0.00f));

I think there is some extra do’s for spritebatch to use the texture you send in thru draw directly to set that up in the sampler state itself lemme go look. brb

Edit

here is a snippet from a very simple example project below.

float percent;

sampler2D TextureSampler : register(s0)
{
    Texture = (Texture);
};

float4 MainPS(float4 position : SV_Position, float4 color : COLOR0, float2 TextureCoordinates : TEXCOORD0) : COLOR0
{
    float4 col = tex2D(TextureSampler, TextureCoordinates)* color;
    col.rgb = (col.r + col.g + col.b) / 3.0f * percent; // grey scale and darken
    return col;
}

the : register(s0) should still work with spritebatch directly as shown here.
to link your defined sampler to register s0 which spritebatch is setting the texture t0 to match if i have that right.

1 Like