回答編集履歴
1
単語の修正漏れを訂正、プロパティのデフォルト値を@aa_debdebさんの方式と同じに変更
test
CHANGED
@@ -54,7 +54,7 @@
|
|
54
54
|
|
55
55
|
{
|
56
56
|
|
57
|
-
_Color ("Color", Color) = (
|
57
|
+
_Color ("Color", Color) = (0.8, 0.5, 0.5, 0.1)
|
58
58
|
|
59
59
|
_MainTex ("Albedo (RGB)", 2D) = "white" {}
|
60
60
|
|
@@ -62,9 +62,9 @@
|
|
62
62
|
|
63
63
|
_Metallic ("Metallic", Range(0,1)) = 0.0
|
64
64
|
|
65
|
-
_Refraction ("Refraction Index",
|
65
|
+
_Refraction ("Refraction Index", Range(1.0, 3.0)) = 1.33
|
66
|
-
|
66
|
+
|
67
|
-
_Distance ("Refraction Distance", Float) = 1.0
|
67
|
+
_Distance ("Refraction Distance", Float) = 10.0
|
68
68
|
|
69
69
|
}
|
70
70
|
|
@@ -132,7 +132,7 @@
|
|
132
132
|
|
133
133
|
#define DEPTH_THRESHOLD 0.1
|
134
134
|
|
135
|
-
#define EDGE_BLENDING_
|
135
|
+
#define EDGE_BLENDING_EXPONENT 4.0
|
136
136
|
|
137
137
|
|
138
138
|
|
@@ -212,7 +212,7 @@
|
|
212
212
|
|
213
213
|
float depthDelta = abs(backgroundDepth + refractionViewPos.z);
|
214
214
|
|
215
|
-
hit = hit * saturate(1.0 - pow(depthDelta / DEPTH_THRESHOLD, EDGE_BLENDING_
|
215
|
+
hit = hit * saturate(1.0 - pow(depthDelta / DEPTH_THRESHOLD, EDGE_BLENDING_EXPONENT));
|
216
216
|
|
217
217
|
|
218
218
|
|