kirevdokimov / Unity-UI-Rounded-Corners

This components and shaders allows you to add rounded corners to UI elements!
MIT License
1.4k stars 122 forks source link

Problems with RenderTexture #44

Open ImanCol opened 1 year ago

ImanCol commented 1 year ago

I am projecting multiple cameras to select Characters, each Camera projects each Player and their asset has allowed me to round the edge. But it happens that some objects have transparency in their textures. This makes the background visible, so half of the character can be seen half dark.

The problem comes from here: Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha This enables the rounding function, but turning it off disables renderTexture.

Is there a way to use the RoundedCorners functionality removing that blend code to avoid the transparency of the objects?

Jepplen commented 2 months ago

I believe I added that in #36 You could try reverting it and see if it helps your use case.

ImanCol commented 2 months ago

I'm not sure what the problem was at the moment, but I think I used it for this menu. As far as I remember, although I managed to round the edges, it didn't work well when using rendertexture . I'll check to see what was happening in the next few days.

https://youtu.be/F9ApikBjt_I?si=iKIyLZxymt0pAsiI