mob-sakai / UIEffect

UIEffect is an effect component for uGUI element in Unity. Let's decorate your UI with effects!
https://github.com/mob-sakai/UIEffect
MIT License
5.62k stars 773 forks source link

Capture with Android + URP + 2019 + OpenGL3 #204

Open drallcom3 opened 4 years ago

drallcom3 commented 4 years ago

Not really a bug report, but I got UIEffectCapturedImage to work with

I replaced public const string shaderName = "UI/Hidden/UI-EffectCapture"; with public const string shaderName = "Hidden/Universal Render Pipeline/Blit"; in UIEffectCapturedImage.cs

Of course there's no blur, but it runs nice and fast with an additional fast blur UIEffect.cs attached to it. In the editor it looks distorted, but on the devices it's fine. Speaking of blur: blurFactor*2 in the UI-Effect.shader instead of clamping it to 1 (in the .cs) makes for a much more useful fast blur on mobile. It's not perfect, but a lot more blurred.

I don't know much of shaders, but maybe this helps. Got the idea from this thread: https://forum.unity.com/threads/lightweight-render-pipeline-blitting-broken.584320/

mob-sakai commented 4 years ago

Hi @drallcom3

Thanks!