summaryrefslogtreecommitdiffstats
path: root/yum_pbr.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-02-12 01:24:49 -0800
committeryum <yum.food.vr@gmail.com>2025-02-12 01:24:49 -0800
commitcaf02458737f93b20978f41613ad5b56e074e154 (patch)
treeb7b3c0ab468d858d71f4fa96f2b420b7ad5ab98a /yum_pbr.cginc
parent498ffebe9524871e9442e58eb0c3760a5463ffbc (diff)
Add a bunch of features
* stereo instancing * outlines * shadows (casting & receiving) * unity fog * blend modes * wrapped lighting (generalized half lambertian) * diffuse & specular have independent knobs Also: * fix bug where shadow caster wouldn't clip in cutout mode. * remove a bunch of unused params * use ifex to minimize size of locked materials (more to be done probably) * improve formatting
Diffstat (limited to 'yum_pbr.cginc')
-rw-r--r--yum_pbr.cginc5
1 files changed, 5 insertions, 0 deletions
diff --git a/yum_pbr.cginc b/yum_pbr.cginc
index b895cd0..f89d865 100644
--- a/yum_pbr.cginc
+++ b/yum_pbr.cginc
@@ -17,7 +17,12 @@ struct YumPbr {
YumPbr GetYumPbr(v2f i) {
YumPbr result;
+#if defined(OUTLINE_PASS)
+ result.albedo = _Outline_Color;
+ result.albedo.a *= tex2D(_MainTex, i.uv).a;
+#else
result.albedo = tex2D(_MainTex, i.uv) * _Color;
+#endif
float3 normal_raw = UnpackScaleNormal(tex2D(_BumpMap, i.uv), _BumpScale);
float3x3 tangentToWorld = float3x3(i.tangent, i.bitangent, i.normal);