diff options
| author | yum <yum.food.vr@gmail.com> | 2026-01-19 18:40:39 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-01-19 18:40:39 -0800 |
| commit | 0ef282da6a87c27e4056faaedb2847eed1f5a8a7 (patch) | |
| tree | 3eaf26a8216f0efc94edc1499e0ab9241b5aac83 /2ner.cginc | |
| parent | f6e54271cddfec5ef16e986a94edf2db380bc458 (diff) | |
shadows now use pbr normal; reparameterize tesellation falloff
Diffstat (limited to '2ner.cginc')
| -rw-r--r-- | 2ner.cginc | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -239,16 +239,16 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace return 0;
#endif
+ i.normal *= facing ? 1 : -1;
+ i.normal = UnityObjectToWorldNormal(i.normal);
+ i.tangent = mul(unity_ObjectToWorld, i.tangent);
+ i.binormal = mul(unity_ObjectToWorld, i.binormal);
+
// Not necessarily normalized after interpolation
i.normal = normalize(i.normal);
i.tangent = normalize(i.tangent);
i.binormal = normalize(i.binormal);
- i.normal *= facing ? 1 : -1;
- i.normal = UnityObjectToWorldNormal(i.normal);
- i.tangent = UnityObjectToWorldNormal(i.tangent);
- i.binormal = UnityObjectToWorldNormal(i.binormal);
-
#if defined(_RAYMARCHED_FOG)
{
// Many fields are overspecified as .rgb or .xyz. This is because thry's
|
