Shader noob looking for help (alpha blending and masking)

Hi guys, for my new endless runner game I wanted to make a glow around the player that
This is what I’ve got currently, the background offsets with the camera. I’d like the glow to fill in the lines of the pattern and to get fainter further from the player.
I know I can just make a lit texture of said lines and set the alpha, but the problem is knowing where the player is. I considered using a stencil buffer but that only allows for on or off. I also looked into multiple passes and subshaders but I ran into the same issue of not knowing where the player is.
Are there any other means of communicating between shaders? To only render a certain texture in an area where a different sprite exists?
All the solutions with setting blending seemed to be outdated.
My current fragment shader, should it help (I know I could have done the offset/scale in script but I felt it more appropriate here in case I needed the values for the glow effect):

float _XPos;        //Comes from script, unsure how to get it from shader
fixed2 _Scale;     //Not used, didn't know how to format a float2 in the Properties section
float _ScaleX;
float _ScaleY;

fixed4 frag (v2f i) : SV_Target
{
    //texture is scaled to compensate for how the sprite was scaled by the script (to account for different screen sizes)
    float postScale = 0.7;    //For scaling after compensation       
    fixed4 mainOut = tex2D(_MainTex, float2((i.uvMain.x * _ScaleX * postScale) + (_XPos * postScale), i.uvMain.y * _ScaleY * postScale));    //the xPos is also added (scaled to fit)
    return mainOut;
}

Any help, other ideas on how I could achieve this effect, or even just an indication of where relevant information might be found is much appreciated. Thank you.

I’m not sure to understand what you are trying to do but what about a StructuredBuffer ?
With that you send anything to your shader.

A quick view:

Shader side:

struct MyStruct
{
   float3      position;
};

StructuredBuffer<MyStruct> awesomebuffer;

struct VS_INPUT
{
   uint vertexID : SV_VertexID;
};

PS_INPUT VertexShader( in VS_INPUT v )
{
   uint vertexID= v.vertexID;
  
   PS_INPUT output;
 
   // You can use vertexID to retrieve awesomebuffer datas if the mesh vertex count match the buffer length
   float3 position = awesomebuffer[0].position;
   // Forward position in PS_INPUT to use it in fragment
 
   return output;
}

C#:

struct myStruct
{
   public Vector3      position;
}

private  ComputeBuffer gpuBuffer;
private myStruct[] cpuBuffer;

private void InitComputeBuffer()
{
   myStruct s = new myStruct();
   int size = Marshal.SizeOf(s);

   cpuBuffer = new myStruct[1];
   gpuBuffer = new ComputeBuffer(1, size);
}

private void UpdateGPUBuffer()
{
    cpuBuffer[0].position = transform.position;
    gpuBuffer.SetData(cpuBuffer);
}

private void LoadBufferToGPU()
{
  material.SetPass(0);
  material.SetBuffer("awesomebuffer",  gpuBuffer);
}