@Pixelnicks wrote:
I'm attempting to use the xBR upscaling filter in MonoGame. I have converted this StackExchange answer from XNA to Monogame.
This involved the following changes in the game:
// Original: this.xbrEffect.Parameters["textureSize"] .SetValue(new float[] { renderBounds.Width, renderBounds.Height }); // Changed to: this.xbrEffect.Parameters["textureSize"] .SetValue(new Vector2( renderBounds.Width, renderBounds.Height ));
And in the shader:
// Original: VertexShader = compile vs_3_0 main_vertex(); PixelShader = compile ps_3_0 main_fragment(); // Changed to: VertexShader = compile vs_4_0_level_9_3 main_vertex(); PixelShader = compile ps_4_0_level_9_3 main_fragment();
The result is a white screen with intermittent flickering of the expected image. The flickering image does not have the filter applied correctly. My knowledge of shaders is incredibly limited. I can only write very simple ones, with the help of examples. Where is this going wrong?
You can download the Visual Studio Solution from here, if it helps.
Posts: 15
Participants: 4