To give it the feel of a real beam project, I created a shader using a RawShaderMaterial that shows the blur coming in from the edges.

However, I’m getting diagonal lines in each corner, and I’m having trouble getting it to work.

Can anyone help me modify my code to make it work correctly? Or if you have any other ideas to implement the blur shader naturally, please let me know.

This is a result of the Mach effect. It is an optical illusion – i.e. there is no such line, but the human brain works in a way that amplifies areas where continuity is broken.

My suggestion is to round the blur, so that it is more continuous:

Both tables have horizontal and vertical headers from 0 to 1. Each internal cell combines the corresponding values from both headers.

The left table combines with the function MIN and it is prone to the Mach effect. The right table uses multiplication, so it is a standard multiplication table.

The same concept is used for spline surfaces, you have one spline curve along one dimension, and another spline curve along another dimension, they their multiplication defines a spline surface in both dimensions.