diff options
| author | yum <yum.food.vr@gmail.com> | 2024-07-13 01:49:03 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-07-13 01:49:21 -0700 |
| commit | bf4457b96cd46ed2d3d61bde2eb4d58d3114730b (patch) | |
| tree | 00c2e9c18f15dc2decd54666e96254e9176102dd /tooner_lighting.cginc | |
| parent | d0032ecf7d258ac52ef572e26f64e18190bf9215 (diff) | |
Integrate metallic eye shader
Diffstat (limited to 'tooner_lighting.cginc')
| -rw-r--r-- | tooner_lighting.cginc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tooner_lighting.cginc b/tooner_lighting.cginc index 3c033bc..8eae8ef 100644 --- a/tooner_lighting.cginc +++ b/tooner_lighting.cginc @@ -3,6 +3,7 @@ #include "audiolink.cginc" #include "clones.cginc" +#include "eyes.cginc" #include "globals.cginc" #include "interpolators.cginc" #include "iq_sdf.cginc" @@ -89,6 +90,17 @@ v2f vert(appdata v) } #endif +#if defined(_GIMMICK_SHEAR_LOCATION) + if (_Gimmick_Shear_Location_Enable_Dynamic) { + v.vertex = mul(float4x4( + _Gimmick_Shear_Location_Strength.x, 0, 0, 0, + 0, _Gimmick_Shear_Location_Strength.y, 0, 0, + 0, 0, _Gimmick_Shear_Location_Strength.z, 0, + 0, 0, 0, _Gimmick_Shear_Location_Strength.w), + v.vertex); + } +#endif + o.vertex = UnityObjectToClipPos(v.vertex); o.worldPos = mul(unity_ObjectToWorld, v.vertex); o.objPos = v.vertex; @@ -760,6 +772,19 @@ float4 effect(inout v2f i) float4 vertex_light_color = 0; #endif +#if defined(_GIMMICK_EYES_00) + { + float3 eyes00_normal = 0; + float3 eyes00_albedo = eyes00_march(i.uv, eyes00_normal).rgb; + bool is_ray_hit = (eyes00_albedo.r > 0 || eyes00_albedo.g > 0 || eyes00_albedo.b > 0); + if (is_ray_hit) { + float mask = _Gimmick_Eyes00_Effect_Mask.SampleGrad(linear_repeat_s, i.uv, iddx, iddy); + albedo.rgb = lerp(eyes00_albedo * 1.5, albedo.rgb * 20.0, mask); + normal = eyes00_normal; + } + } +#endif + mixOverlayAlbedo(albedo.rgb, ov); #if defined(_DECAL0) || defined(_DECAL1) || defined(_DECAL2) || defined(_DECAL3) float decal_emission = 0; |
