I'm creating application in XNA 4.0 and am trying to create a specialized background. I'm familiar with the creation of a parallax scrolling background but I'd like to create a background image that appears to be draining into a hole. The issue is that I'd like the drain/black hole to exist in a variable location on the screen so it would be nice to be able to adjust the location of the background. Is using a background for this even a good idea? Maybe it'd be easier another way? Is there a term for this sort of background or is it just a modified version of parallax? Thanks!
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
|
Not sure what you are asking, if you could find a video or picture of something similar that would be great. However, I'm assuming you want something to this.
The easiest way to do this would be with post processing. You could create a shader that would you could pass a point each draw call. It would make any pixel within a certain distance black. I would then suggest a range in which the shader would "pull" the sampling from the original texture towards the point towards the point causing the texture to stretch as if its being sucked in. Out side of the outside edge of that range the shader wouldn't effect anything. Edit to add in info from comments on how to implement the above idea: |
|||||||||||||||
|

