Hi guys
Is there a simple way of doing some rain effect/blur action on already drawn things? I came up with two solutions: modifing drawing methods of all entities and somehow managing to check drawn pixels and then redraw thing with modified values, but neither of them satisfies me
Is there a better way?
Rain effect based on what's already on screen
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Rain effect based on what's already on screen
When you say rain effect, are you talking about water droplets on camera lens? If so, you could try creating a method in the Graphics class that after everything is done drawing, you call this method. The method would read from the system buffer, and modify the pixels on the back buffer. If you just want to blur each object as a mist is bouncing off each object, then you could render an object, then blur the resulting image before pasting to the back buffer.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: Rain effect based on what's already on screen
I actually meant water droplets on camera and bouncing off the ground So I think I'll try modifing pixels on the back buffer for both of them. Time for deep dive into Graphics class, Thanks!
Re: Rain effect based on what's already on screen
Yeah, some simple solution to blurring involve re-using the contents of previous frames i think.
This is something I was playing with in 2012.
This is something I was playing with in 2012.
- Attachments
-
- Noisy Balls.zip
- (79.21 KiB) Downloaded 154 times
Chili