Drawing one texture with different Color fps issue
I'm trying to change texture color by aplying mask, which is exactly the same texture but with changed color and alpha < 150. I'm doing smth like this:
spriteBatch.Begin();
spriteBatch.Draw(pic, Vector2.Zero, Color.White);
spriteBatch.Draw(pic, Vector2.Zero, newColor); //for exmaple (150,150,150,50)
spriteBatch.End();
The problem is with fps, it drops from 30 to 25, when i'm trying to do this with 3 different textures at the same time.
if i change this line
spriteBatch.Draw(pic, Vector2.Zero, newColor);
on
spriteBatch.Draw(whiteBlankPicture, new Rectangle(0,0, pic.Width, pic.Height), newColor); //whiteBlankPicture texture 1x1 pixel
fps dont drops and stay normal. What is the problem?
I'm trying to change texture color by aplying mask, which is exactly the same texture but with changed color and alpha < 150. I'm doing smth like this:
spriteBatch.Begin();
spriteBatch.Draw(pic, Vector2.Zero, Color.White);
spriteBatch.Draw(pic, Vector2.Zero, newColor); //for exmaple (150,150,150,50)
spriteBatch.End();
The problem is with fps, it drops from 30 to 25, when i'm trying to do this with 3 different textures at the same time.
if i change this line
spriteBatch.Draw(pic, Vector2.Zero, newColor);
on
spriteBatch.Draw(whiteBlankPicture, new Rectangle(0,0, pic.Width, pic.Height), newColor); //whiteBlankPicture texture 1x1 pixel
fps dont drops and stay normal. What is the problem?
No comments:
Post a Comment