I want to mask out portion of the screen,that will not be affected by motion blur image effect.
Theres a screenshot from Blackprophecy attached.
So the mid-bottom portion of the screen is masked out and has no blur on it. I beleive I could use alpha texture combined with some sort of a shader to get such effect.
Unfortunately I dont have any shader writing experience
If you are using Unity Pro, you might be able to do this without writing a script, depending on what you are doing.
You can set a camera to render objects selective by layer using the culling mask (see the Camera manual page for more details). You could set the main camera to render with motion blur, but set its culling mask so as not to render the ship. Then, have another camera at the same position with culling set to render only the ship (and set this camera’s clear flags to Depth Only). This camera will render the ship without the image effect that is applied to the background.
However, it is possible that this technique is not suitable for your game (or else you aren’t using Unity Pro). If so, can you give any more detail about what you are doing?
The game Im working on is a prototype similar to game seen on the screenshot. Exact camera setup and two additional cameras for the planet on the background with scattering shaders. So the planet stays at the same place but rotation that is in sync with the main cam.
Now after reading your post here, Ive added additional camera with culling flags and it works just like I want it to be.
But theres one more question after all
Like I said theres 4 cameras it total all packed with post image effects.
One planet cam for the terrain and clouds. Second for the ground scattering and ring scattering around the planet. Third is for the scene with motion blur on. And the last one is just for the ship.
Now see another image attached.
The problem is that Im getting desync when rotating cameras fast. My guess would be to render all cameras to textures and blit everything together manually in a script. This way I belive I would get more controll over the post image effects and get rid of the cameras desync. What I mean is, for example, I dont want the planet cameras to be affected by motion blur from the third camera.
I have never tried this technique and not exactly sure about performance impact. Sync to VBL doesnt solve desync. And I have no idea where to start with this.
Please corrent me if Im wrong, and would be nice to get some link to a reference where to start with blitting rendertextures to screen output.
Split scene to layers is good solve, but problem is, that effect is applicate on all layers under layer with effect So I have 3 camera and 3 layers, first with glow, second with blur and third without effect. But Glow is on every layer and Blur on second and third.