diff options
| author | yum <yum.food.vr@gmail.com> | 2024-07-18 15:23:14 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-07-18 15:23:14 -0700 |
| commit | 82b36c1c14013e82e15ca48dc766eb7aa4198e63 (patch) | |
| tree | db54ba20a8ac0d795de992dfe41e9777a5795f71 /tooner_lighting.cginc | |
| parent | a95481afa226d76d671b13515ee2abc59359b87a (diff) | |
Add individual lighting multipliers
... for direct, indirect x {specular,diffuse}
Diffstat (limited to 'tooner_lighting.cginc')
| -rw-r--r-- | tooner_lighting.cginc | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/tooner_lighting.cginc b/tooner_lighting.cginc index e11f0dc..ec3e22b 100644 --- a/tooner_lighting.cginc +++ b/tooner_lighting.cginc @@ -112,19 +112,17 @@ v2f vert(appdata v) #if !defined(_SCROLL) && defined(_GIMMICK_SHEAR_LOCATION) if (_Gimmick_Shear_Location_Enable_Dynamic) { float3 p = v.vertex.xyz; + + float r = 0.0; + float3 sc = lerp( + _Gimmick_Shear_Location_Strength.xyz, + 1, + abs(p) < r); + float3x3 shear_matrix = float3x3( - _Gimmick_Shear_Location_Strength.x, 0, 0, - 0, _Gimmick_Shear_Location_Strength.y, 0, - 0, 0, _Gimmick_Shear_Location_Strength.z); -#if 0 - float3x3 rot_fix, rot_fixi; - float4x4 ts_fix, ts_fixi; - getMeshRendererMatrices(/*invert=*/false, rot_fix, ts_fix); - getMeshRendererMatrices(/*invert=*/true, rot_fixi, ts_fixi); - if (_Gimmick_Shear_Location_Mesh_Renderer_Fix) { - p = mul(ts_fixi, float4(p, 1)).xyz; - } -#endif + sc.x, 0, 0, + 0, sc.y, 0, + 0, 0, sc.z); p = mul(shear_matrix, p); v.vertex.xyz = p; } |
