All Projects → ColinLeung-NiloCat → Unityurp Mobilescreenspaceplanarreflection

ColinLeung-NiloCat / Unityurp Mobilescreenspaceplanarreflection

Licence: mit
Reusable RendererFeature of MobileScreenSpacePlanarReflection

Programming Languages

reflection
70 projects

Projects that are alternatives of or similar to Unityurp Mobilescreenspaceplanarreflection

Unityurp Billboardlensflareshader
(1)Add a new Quad GameObject (2)Use this shader (3)Done! Now you have billboard lens flare shader for URP!
Stars: ✭ 140 (-46.15%)
Mutual labels:  unity, shader, mobile
Kinovision
Frame visualization utility for Unity
Stars: ✭ 177 (-31.92%)
Mutual labels:  unity, shader
Nvjob Water Shader Simple And Fast
#NVJOB Simple Water Shaders. Free Unity Asset.
Stars: ✭ 172 (-33.85%)
Mutual labels:  unity, shader
Awesome Unity Shader
⛵ 关于炫酷的Unity3D Shader | About Cool Unity3D Shaders
Stars: ✭ 2,658 (+922.31%)
Mutual labels:  unity, shader
Computestochasticreflections
Compute Stochastic Screen Space Reflections for unity post processing
Stars: ✭ 163 (-37.31%)
Mutual labels:  unity, shader
Bloodfx
Procedural blood stain shader
Stars: ✭ 170 (-34.62%)
Mutual labels:  unity, shader
Isaura
An attempt at making a aura thingie with a isoline shader.
Stars: ✭ 187 (-28.08%)
Mutual labels:  unity, shader
Lowpolyshaders
Unity shaders optimized for Low Poly models.
Stars: ✭ 157 (-39.62%)
Mutual labels:  unity, shader
Unity Shaders
✨ Shader demo - More than 300 examples
Stars: ✭ 198 (-23.85%)
Mutual labels:  unity, shader
Shinyeffectforugui
Shiny effect of uGUI, which does not need mask or normal map.
Stars: ✭ 204 (-21.54%)
Mutual labels:  unity, shader
Noiseball2
A small example of procedural modeling with compute shaders.
Stars: ✭ 215 (-17.31%)
Mutual labels:  unity, shader
Unity Boids Behavior On Gpgpu
Boids behavior calculation code is modified to utilize Microsoft Direct Compute resulting significant improvements in Performance. 利用Compute Shader实现Boids模拟。
Stars: ✭ 162 (-37.69%)
Mutual labels:  unity, shader
Urp stylizedlitshader
Madumpa's URP Stylized Lit Shader Repository
Stars: ✭ 160 (-38.46%)
Mutual labels:  unity, shader
Rimlight
Customizable rimlight shader for Unity that includes pulsation and noise scrolling. Give your scenes that extra oomph!
Stars: ✭ 170 (-34.62%)
Mutual labels:  unity, shader
Unityurptoonlitshaderexample
A very simple toon lit shader example, for you to learn writing custom lit shader in Unity URP
Stars: ✭ 2,988 (+1049.23%)
Mutual labels:  unity, shader
Kinobinary
Binary image effect for Unity
Stars: ✭ 180 (-30.77%)
Mutual labels:  unity, shader
Videoplayereffects
Experimental special effects for VideoPlayer (Unity 5.6 new feature)
Stars: ✭ 252 (-3.08%)
Mutual labels:  unity, shader
Unityscreenspaceboolean
Screen Space Boolean Implementation for Unity.
Stars: ✭ 150 (-42.31%)
Mutual labels:  unity, shader
Uiwidgets
UIWidget is a Unity Package which helps developers to create, debug and deploy efficient, cross-platform Apps.
Stars: ✭ 1,901 (+631.15%)
Mutual labels:  unity, mobile
Unitywatersurface
Water Surface Simulation using CutomRenderTexture in Unity 2017.1
Stars: ✭ 190 (-26.92%)
Mutual labels:  unity, shader

UnityURP-MobileScreenSpacePlanarReflection

A simple and fast ScreenSpacePlanarReflection(SSPR) as a standalone reusable RendererFeature in URP.
Can run on PC/console/vulkan android, other platforms not tested but should work if compute shader is supported.

SSPR ON screenshot SSPR OFF screenshot SSPR ON screenshot SSPR OFF screenshot

On Adreno630 GPU android mobile device(almost all 2018/2019 flagship android mobiles), Toggle SSPR ON/OFF:

  • cost <1ms to update 128 height SSPR RT
  • cost <1ms to update 256 height SSPR RT
  • cost 1~2ms to update 512 height SSPR RT

On Adreno612 GPU android mobile device(Samsung Galaxy A70), Toggle SSPR ON/OFF:

  • cost <1ms to update 128 height SSPR RT
  • cost 1~2ms to update 256 height SSPR RT
  • cost 4~5ms to update 512 height SSPR RT

On Adreno506 GPU android mobile device(Lenovo S5), Toggle SSPR ON/OFF:

  • cost ~1ms to update 128 height SSPR RT
  • cost 3~4ms to update 256 height SSPR RT
  • cost 8~9ms to update 512 height SSPR RT

Where are the important files?

There are only 4 important code files, all inside a folder "Assets \ _MobileSSPR \ ReusableCore".
https://github.com/ColinLeung-NiloCat/UnityURP-MobileScreenSpacePlanarReflection/tree/master/Assets/_MobileSSPR/ReusableCore
Other files are for demo only, not important.

Can it run on mobile?

Tested on ~10 android devices(all support Vulkan). If your android device support Vulkan, result should be correct and rendering should be fast enough. (OpenGLES3.2 is not enough, must support Vulkan!)

*We have received a report that this SSPR is not working on MaliT760 GPU android (Galaxy S6), but we don't have this device to reproduce it

How to try this inside my own URP project?

  • copy "Assets \ _MobileSSPR \ ReusableCore" folder to your project (contains 4 important code files)

  • turn on "Depth Texture" in all your project's URP's setting

  • turn on "Opaque Texture" in all your project's URP's setting

  • Add MobileSSPRRendererFeature(RendererFeature) to your forward renderer asset

  • create a new plane game object in your scene (set world space pos y = 0.01)

  • create a material using MobileSSPRExampleShader.shader

  • assign this material to your new plane

  • DONE! You should see correct reflection both in scene and game window

I can see some small flickering in reflection / can't see any reflection

It is not expected! Please report your device name in Issues, thanks!

Notes

It is not safe to use InterlockedMin() and RenderTexture color format "RInt" on android/iOS compute shader(see -> https://zhuanlan.zhihu.com/p/150890059). Instead, we will use RenderTexture color format RFloat / ARGBHalf to produce similar result.

Editor

2019.4.4f1 LTS

Implementation reference

Change log

  • 2020-08-23: add iOS/OSX support (with the help of MusouCrow)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].