# 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.
- See runtime video here: https://youtu.be/Cy46A8EyX4Q
- download pre-built .apk here: https://drive.google.com/file/d/14Z_Gjb1ADz8RhcBgAFpa96dm-oQuOyQx/view?usp=sharing
SSPR ON
![screenshot](https://i.imgur.com/cNaVHLK.png)
SSPR OFF
![screenshot](https://i.imgur.com/0WCIcTM.png)
SSPR ON
![screenshot](https://i.imgur.com/XvudHkR.png)
SSPR OFF
![screenshot](https://i.imgur.com/AZ08hZ8.png)
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
-------------------
- http://remi-genin.fr/blog/screen-space-plane-indexed-reflection-in-ghost-recon-wildlands/
- http://advances.realtimerendering.com/s2017/PixelProjectedReflectionsAC_v_1.92_withNotes.pdf
- https://zhuanlan.zhihu.com/p/150890059
- https://github.com/Steven-Cannavan/URP_ScreenSpacePlanarReflections
Change log
-------------------
- 2020-08-23: add iOS/OSX support (with the help of MusouCrow)
没有合适的资源?快使用搜索试试~ 我知道了~
UnityURP-MobileScreenSpacePlanarReflection:MobileScreenSpacePlan...
共316个文件
meta:161个
tif:45个
mat:33个
需积分: 50 15 下载量 96 浏览量
2021-02-04
02:51:43
上传
评论
收藏 690.44MB ZIP 举报
温馨提示
UnityURP-MobileScreenSpacePlanarReflection 一个简单而快速的ScreenSpacePlanarReflection(SSPR)作为URP中的一个独立的可重用RendererFeature。 可以在PC /控制台/ vulkan android上运行,其他平台未经测试,但如果支持计算着色器,则应该可以运行。 在此处查看运行时视频: : 在此处下载预构建的.apk: ://drive.google.com/file/d/14Z_Gjb1ADz8RhcBgAFpa96dm-oQuOyQx/view usp sharing 开启SSPR 关闭S
资源推荐
资源详情
资源评论
收起资源包目录
UnityURP-MobileScreenSpacePlanarReflection:MobileScreenSpacePlanarReflection的可重用渲染器功能 (316个子文件)
Capsule(dynamic) - Move.anim 7KB
LightingData.asset 63KB
ProjectSettings.asset 20KB
InputManager.asset 10KB
GraphicsSettings.asset 3KB
MobileSSPR_ExampleForwardRenderer.asset 2KB
Physics2DSettings.asset 2KB
MobileSSPR_ExampleURPSetting.asset 2KB
QualitySettings.asset 1KB
NavMeshAreas.asset 1KB
DynamicsManager.asset 1KB
EditorSettings.asset 1KB
UnityConnectSettings.asset 853B
PresetManager.asset 797B
AudioManager.asset 413B
URPProjectSettings.asset 410B
TagManager.asset 378B
EditorBuildSettings.asset 299B
VFXManager.asset 273B
TimeManager.asset 195B
XRSettings.asset 158B
ClusterInputManager.asset 114B
MobileSSPRComputeShader.compute 17KB
Capsule(dynamic).controller 2KB
MobileSSPRRendererFeature.cs 16KB
ExampleSceneScript_MobileSSPR.cs 2KB
GareoultWhiteBalanced.exr 94.14MB
GareoultWhiteBalancedNoSun.exr 93.51MB
KirbyCoveWhiteBalanced.exr 89.34MB
KirbyCoveWhiteBalancedNoSun.exr 87.92MB
TreasureIslandWhiteBalanced.exr 85.91MB
TreasureIslandWhiteBalancedNoSun.exr 84.08MB
TrinitatisChurchWhiteBalanced.exr 72.7MB
SeasideWhiteBalanced.exr 70.3MB
Lightmap-0_comp_light.exr 637KB
ReflectionProbe-3.exr 98KB
ReflectionProbe-2.exr 46KB
ReflectionProbe-0.exr 13KB
ReflectionProbe-1.exr 12KB
Workbench.fbx 447KB
Workbench_Low.fbx 261KB
Workshop_Set.fbx 252KB
jigsaw_low.fbx 145KB
ConstructionLight_Low.fbx 125KB
paintbucket_low.fbx 98KB
safetygoggles_low.fbx 89KB
magneticlevel_low.fbx 84KB
safetyhat_low.fbx 79KB
brush_low.fbx 47KB
hammer_low.fbx 44KB
Stud.fbx 31KB
small_plane.fbx 20KB
.gitattributes 66B
.gitignore 1KB
MobileSSPRInclude.hlsl 1KB
packages-lock.json 7KB
manifest.json 1KB
LICENSE 1KB
Jigsaw_Mat.mat 3KB
Plastic_Ridges_Mat.mat 3KB
Plastic_Rough_Mat.mat 3KB
PaintBrush_Mat.mat 3KB
OBS_Mat.mat 3KB
HardHat_Mat.mat 3KB
ConstructionLight_Mat.mat 3KB
Hammer_Mat.mat 3KB
Stud_Mat.mat 3KB
Strap_Mat.mat 3KB
Ground_Mat.mat 3KB
Metal_Blue_Simple_Mat.mat 3KB
Plastic_Gray_Mat.mat 3KB
Plastic_Black_Mat.mat 3KB
Plastic_White_Mat.mat 3KB
Metal_Simple_Mat.mat 3KB
Plastic_Yellow_Mat.mat 3KB
DryWallPainted_Mat.mat 3KB
DryWall_Mat.mat 3KB
PaintLabel_Mat.mat 3KB
Liquid_Mat.mat 3KB
Plastic_Transparent.mat 3KB
LightBulb_Mat.mat 3KB
Paint1G_WAnim_Material.mat 2KB
TreasureIslandWhiteBalancedNoSun.mat 2KB
TrinitatisChurchWhiteBalanced.mat 2KB
TreasureIslandWhiteBalanced.mat 2KB
KirbyCoveWhiteBalancedNoSun.mat 2KB
GareoultWhiteBalancedNoSun.mat 2KB
KirbyCoveWhiteBalanced.mat 2KB
GareoultWhiteBalanced.mat 2KB
SeasideWhiteBalanced.mat 2KB
MobileSSPR_ExampleShader.mat 2KB
README.md 4KB
Workbench_Low.fbx.meta 3KB
Paint1G_MetallicOcculusionRoughness.tif.meta 3KB
PaintAnimMask.tif.meta 3KB
Paint5G_AlbedoSmoothness.tif.meta 3KB
PlasticRough_Albedo.tif.meta 3KB
Jigsaw_Albedo.tif.meta 3KB
Paint1G_Albedo.tif.meta 3KB
PlasticRidges_Albedo.tif.meta 3KB
共 316 条
- 1
- 2
- 3
- 4
资源评论
moseswangbp981
- 粉丝: 26
- 资源: 4639
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功