Unity: Any way to get anti-aliasing on Screen Space - Overlay Canvas? - unity3d

I'm using Unity and I have a Screen Space - Overlay canvas and it has Image objects that rotate. The problem is that on shallow rotations the images have really obvious jagged edges. I can't find any built in anti-aliasing solution that fixes this.
I know the MSAA in the settings doesn't apply to overlay canvases, neither does the anti-aliasing in the Post Effects package.
I can't change to a Screen Space - Camera canvas, I know that will apply MSAA but it breaks my game in too many other ways to be viable (my game is almost finished, I left adding AA to the end which may have been a mistake).
Is there any way to get AA to work on an overlay canvas?

A possible solution is in the second answer in this question on Game Development Stack Exchange: add a transparent outline to your image.
Enabling mip-maps gets you half way there, but the other half of it is to make sure that sides you want smoothed are bordered by alpha transparency. The outer edge of everything you want smooth must be transparent.

Related

All shaders render black while using shadergraph in unity 2020 1.10f

I am doing a simple animation in unity and I wanted to add portal efecct using shadergraph 8.2.0 and everything renders black
like this
shader setings
I have no clue whatsoever what it is
I'm still learning the pipeline, however, I would think you need to scale up the texture on the top left, I can't read its name from the image. But you are getting the red/yellow mix, getting the swirl, but the area that's being blacked out is comparable to the texture I mentioned. Sorry I don't know how to put it exactly, but the white to grey to black gradient is not large enough so you are rendering the center fine just need to expand the white-grey area, I think scaling the texture up would produce the effect you want.

Unity Camera Target Texture Render Texture How To Get Masks To Work?

I'm looking at using Camera TartetTexture RenderTexture functionality for less processing intensive menu transitions but I'm having some trouble. Every texture I render out from the camera doesn't have masks working. I can see the whole version of every graphic on the screen. How can I get it rendering keeping the masks in tact? It is also failing to render any of my spawned prefabs. Either that or they could be hidden behind the unmasked graphics.
Also, I was told to render to a material. None of the shaders I've tried have supported the masks (don't know if that's really the problem) or have looked like the original image. They all look dark and moody, with the occasional weird alpha channel in the upper left corner. How can I get the image looking just like my screen?
My menus are all on a Screen Space - Overlay canvas, so they shouldn't need to be lit.

Unity: Filter to give slight color variations to whole scene?

In Unity, is there a way to give slight color variations to a scene (a strain of purple here, some yellow blur there) without adjusting every single texture? And for that to work in VR stereo images too (and ideally in semi-consistent way as one moves around, and perhaps also without having to use computing-heavy colored lights)? Many thanks!
A simple way to achieve this if your color effect is fixed would be to add a canvas that renders a half transparent image to the whole screen. But I suppose that you might prefer some dynamic effect.
To achieve this, look at Unity's post processing stack. It allows you to add many post process effects, such as chromatic aberation and color grading, that might allow you to do what you want

Unity3D - Make texture edges not stretch

I've been searching around for this one for a bit, and unfortunately I can't seem to find any good, consistent results. So, in the Unity UI system, buttons can stretch without becoming pixelated or distorted. This is because the texture is split up into 9 parts - the corners, middle, and sides.
This works because the button's middle and sides are stretched, but not the corners. Then, the button appears not pixelated, at any dimension.
So, the question is as follows: How can I do the same thing for a transparent, unlit texture in 3D space? I have a speech bubble texture on a flat plane that I know how to re-scale to fit the text in the speech bubble.
I've set the texture type to Multiple Sprite, and divided it up into 9 parts. However, I cannot seem to find where I can set the texture to act like the UI button does, and I'm not sure that this is even possible in this way in 3D space.
Is there a way, or should I just make the different parts of the texture different objects, and move them together? That would seem very inefficient and ugly compared to this.
To accomplish what you are asking, you would need to create tiles for this speech bubble and then write a script that procedurally builds a speech bubble based on the plane's scale value. You could also try just changing the texture's Filter Mode to Point.
However I really don't think you should be using textures for this anyway. Why not just use a Unity Canvas and set the Render Mode to World Space? Then you can just set your text box to be a sprite, not a texture, and set its filter mode to Point (See below). This would also make it a lot easier for when you want there to be text in the speech bubble later on.

How to draw a light effect over a texture on iPhone using UIKit/Quartz

I have a scene with a background image (a lit room), and a black image (shadow) over that. I need to be able to move my finger over the background and reveal some parts of the scene, simulating a dim light source in a dark room.
My current approach was to generate a mask depending on the position of the touch, and then applying that mask to the shadow image. The problem is I'm generating a new mask and applying it every time I receive a touch event. It's a large image (800x600) and this causes the performance to go down and it increases a lot the memory usage, eventually crashing the game (I think I don't have any memory leaks, but that's not warrantied... anyway the performance itself isn't acceptable).
Can anyone think of a better approach (which doesn't involve using OpenGL ES -- that's not an option in this project) to do this?
To go with my comments above.
Maybe to get around the different shadow levels you could also have a grid of views (squares) between the image and the shadow view. each grid square has a different alpha opacity and when the spot is over a grid square, the grid square's alpha opacity changes to 0. when the spot moves off the grid square it's alpha opacity changes back to it's default.
Without more information it is a little difficult to know whether this approach will work in your case but what you could do is generate a single mask image, say, a radial alpha gradient and then apply an affine transform to it to shape it according to the touches. This can be used to simulate a torch/flashlight beam.
I would try this: use one view with a custom drawRect implemetation: first draw the shadow image (in grayscale) then a bright spot image in white an alpha. And finally the background image in a 'multiply' blend mode.
Just a thought, does the shadow has to be an image? Perhaps you could simply fill the shadow layer with a color and mask it then? This way the memory usage should be less and the effect should be nearly identical (if not exactly the same).
There is no reason to generate a new mask on every touch move. Instead, let the mask be initialized once and manipulate it (reset it's frame) as needed upon touch events.