Open zengzhining opened 2 years ago
I use ImageMaskTransition but the background color is not black.
I think the problem is in PreRender method, it should add Clear method? I add it and it works.
public override void PreRender(Batcher batcher) { Core.GraphicsDevice.SetRenderTarget(_maskRenderTarget); // Core.GraphicsDevice.Clear( Color.Black ); batcher.Begin(BlendState.AlphaBlend, Core.DefaultSamplerState, DepthStencilState.None, null); batcher.Draw(_maskTexture, _maskPosition, null, Color.White, _renderRotation, _maskOrigin, _renderScale, SpriteEffects.None, 0); batcher.End(); Core.GraphicsDevice.SetRenderTarget(null); }
I use ImageMaskTransition but the background color is not black.![屏幕截图 2022-05-06 095427](https://user-images.githubusercontent.com/8537988/167054109-e6bbfd92-ceed-41ed-afde-afb5f9dae0a6.png)
I think the problem is in PreRender method, it should add Clear method? I add it and it works.