1
\$\begingroup\$

I am currently using URP to add bloom to my particle systems. The problem I'm facing is that I can't pixelate the game. I have tried to implement several methods to post pixelate (via shaders and render texture) but none conserve the bloom on the particle system.

This is the effect I'm after (using pixel perfect camera and zooming the editor window) but I can't achieve this in build mode.

Any help on how I should pixelate the game so you can still see the character?

This is without 4x zoom: Without zoom

This is my current settings: Settings

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Zooming in in the game tab is probably not a good way to check things. If you want to zoom the camera in you should switch it to orthographic mode (it's probably already like that) and reduce the size to what you want. You should probably also not be using "Free Aspect" mode since it will always be different than your game view in build mode. If you need to pixelate your bloom effect, you might be able to achieve this with either a custom pass or using a vfx shader (I think this is still in beta). \$\endgroup\$ Oct 14, 2020 at 5:34
  • \$\begingroup\$ You cant change the size in pixel perfect camera. The problem I am facing is that I want to add bloom zoom and pixelate at the same time. All methods I have tried via rendertexture and shader dosent conserve the bloom effect but you can zoom. The video was just what I wanted it too look like. \$\endgroup\$ Oct 15, 2020 at 14:54
  • \$\begingroup\$ Which render pipeline are you using? A render texture "should" save post processing but I'm not sure if it does in the standard render pipeline. I know for sure it does in HDRP and I am willing to bet it will in URP (you should probably use this option). Also is sirreldar pointed out, make sure your render texture is set to point mode (this wont get the effect you want, but will make sure the final texture isn't blurry when you scale it up). \$\endgroup\$ Oct 19, 2020 at 3:19

2 Answers 2

1
\$\begingroup\$

When you increase the zoom of the game view like this:

Screenshot from OP's video

what you're doing is cropping out a smaller section of the render target it's been drawn into.

So you can simply draw to a smaller render target in the first place.

Create a RenderTexture asset in your Assets folder, and set it to a resolution about 4x smaller than your target screen resolution. (If you want to support multiple resolutions, you can use a C# script to create and assign this RenderTexture dynamically to match the current screen/window resolution)

Set your camera's "Output Texture" field to render into this RenderTexture. That forces it to render only the number of pixels in that texture - including all post effects like bloom. You may also need to adjust the "Reference Resolution" in your pixel perfect camera script to work with your cropped-in resolution - otherwise it may try to scale everything down further to fit into the smaller space.

Lastly, create a new UI Canvas set to "Screenspace - Overlay" mode. Add a RawImage component that stretches to fill the whole canvas, and assign your RenderTexture as the image for it to display. That handles scaling up the few pixels of the render target up to the full window/screen size and displaying them to be seen.

\$\endgroup\$
0
\$\begingroup\$

Not sure that I understand your question exactly, but ensure you are importing your sprites with Filter Mode set to Point(no filter):

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ that is not the problem, the problem is that I want to pixelate my particlesystems in URP to the resolution of my sprites. \$\endgroup\$ May 16, 2020 at 21:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .