

Real-time Cubemap
Reflection Probe




- UNITY_SAMPLE_TEXCUBE:採樣cube貼圖,推薦服用文獻[2]。
- HDR(High Dynamic Range)[3]:若在貼圖加入後綴_HDR,Unity會自動填入所需資料[4]。



上文,我們透過unity_SpecCube0... 等關鍵字取得Reflection Probe提供的資料,但有個問題是環境cubemap的取樣是有一定弧度的(?),並不能精準的回饋出玩家畫面上的倒影。


如上圖看到玩家倒影有些走位、拉扯。
目標是做出如終結者利利這種鏡面反射,查了一下文章後又發現這種反射可稱為Planar Relfection。

建立鏡像相機
參考文獻[6],在每一幀計算一個與目標相機顛倒Y軸的投影矩陣:


-
來源[6]

Shader





- Unity - Manual: Reflection Probe (unity3d.com)
- UnityShader-環境反射_賢愚的博客-CSDN博客_unity 反射環境
- Question - How to correctly sample HDR cubemap? - Unity Forum
- How to sample HDR texture in shader? - Unity Forum
- Unity Shader-反射效果(CubeMap,Reflection Probe,Planar Reflection,Screen Space Reflection)_puppet_master的博客-CSDN博客_planarreflection
- Combined Reflections: Stereo Reflections in VR - Graphics, Gaming, and VR blog - Arm Community blogs - Arm Community
勉強維持住周更ㄌ