DrawingContext does not support ShaderEffect.
Using DrawingContext in OnRender() method of adorner, we can Push effect using PushEffect() method. But the strange thing is that DrawingContext.PushEffect() does not support ShaderEffect. All it supports is BitmapEffect :(. It seems to be a missing piece of functionality of conversion of all shaders to ShaderEffect.
So if you don't want to use BitmapEffect as it is obsolete now then DrawingContext wouldn't be of much use to you. There seems to be no other option though, e.g. we want to push effect to adorner, the only option available is to push BitmapEffect. Even PushEffect is decorated with ObsoleteAttribute in DrawingContext class.
I have discussed about adorners here:
If you want to study about ShaderEffect, you can refer this post:
Now you must be wondering why we are so much interested in having ShaderEffect with DrawingContext. The reason is the performance benefits with ShaderEffect compared to BitmapEffect. ShaderEffect uses pixel shaders in graphics processor (GPU). So it pushes the work outside the regular CPU. BitmapEffect provides a software solution to provide similar effects but it does not use new features of graphics processor.