Here is the SVG filter I am using:
<svg style="visibility: hidden; height: 0; width: 0;">
<filter id="rgbShift">
<feOffset in="SourceGraphic" dx="1" dy="-1" result="text1" />
<feFlood flood-color="#FF0000" result="redColor" />
<feComposite in="redColor" in2="text1" operator="arithmetic" k1="1" result="red" />
<feOffset in="SourceGraphic" dx="-1" dy="2" result="text2" />
<feFlood flood-color="#00FF00" result="greenColor" />
<feComposite in="greenColor" in2="text2" operator="arithmetic" k1="1" result="green" />
<feOffset in="SourceGraphic" dx="-2" dy="1" result="text3" />
<feFlood flood-color="#0000FF" result="blueColor" />
<feComposite in="blueColor" in2="text3" operator="arithmetic" k1="1" result="blue" />
<feComposite in="red" in2="green" operator="lighter" result="rb" />
<feComposite in="rb" in2="blue" operator="lighter" />
</filter>
</svg>
I have implemented this filter on my menu screen for a game project. However, when I try to apply the same filter to the game itself, it slows down significantly due to constant movement of elements on the page. Is there a way to optimize the filter for better performance?