summaryrefslogtreecommitdiffstats
path: root/tooner_lighting.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-09-10 23:45:40 -0700
committeryum <yum.food.vr@gmail.com>2024-09-10 23:45:40 -0700
commitdfb1ece3e78cf013866d18a3a234e2f4bf8834f8 (patch)
tree81bbb45d39d6e2758b9b62632a4873821ac8d278 /tooner_lighting.cginc
parent2712f07c0d06a15e6624b3045207d301a1592886 (diff)
Start work on new halo tech
Diffstat (limited to 'tooner_lighting.cginc')
-rw-r--r--tooner_lighting.cginc33
1 files changed, 20 insertions, 13 deletions
diff --git a/tooner_lighting.cginc b/tooner_lighting.cginc
index 3a49112..8c03644 100644
--- a/tooner_lighting.cginc
+++ b/tooner_lighting.cginc
@@ -7,6 +7,7 @@
#include "clones.cginc"
#include "eyes.cginc"
#include "globals.cginc"
+#include "halos.cginc"
#include "interpolators.cginc"
#include "iq_sdf.cginc"
#include "math.cginc"
@@ -374,7 +375,6 @@ void geom(triangle v2f tri_in[3],
struct RorschachPBR {
float4 albedo;
};
-
float rorschach_map_sdf(float3 p, float2 e, float3 period, float center_randomization)
{
float r = _Rorschach_Radius * min(period.x, min(period.y, period.z));
@@ -393,7 +393,6 @@ float rorschach_map_dr(
float3 period,
float3 count,
float center_randomization,
- float2 uv,
out float3 which
)
{
@@ -442,7 +441,7 @@ RorschachPBR get_rorschach(float2 uv, RorschachParams p)
float3 which;
float3 period = float3(1 / (p.count_x+1), 1 / (p.count_y+1), 1);
float3 count = float3(p.count_x, p.count_y, 1);
- float d = rorschach_map_dr(ro, period, count, p.center_randomization, uv, which);
+ float d = rorschach_map_dr(ro, period, count, p.center_randomization, which);
d *= max(p.count_x + 1, p.count_y + 1);
@@ -1318,16 +1317,6 @@ float4 effect(inout v2f i)
}
#endif
-#if defined(_RENDERING_CUTOUT)
-#if defined(_RENDERING_CUTOUT_STOCHASTIC)
- float ar = rand2(i.uv0);
- clip(albedo.a - ar);
-#else
- clip(albedo.a - _Alpha_Cutoff);
-#endif
- albedo.a = 1;
-#endif
-
PbrOverlay ov;
getOverlayAlbedoRoughnessMetallic(ov, i);
@@ -1352,6 +1341,24 @@ float4 effect(inout v2f i)
raw_normal.z * i.normal
);
+#if defined(_GIMMICK_HALO_00)
+ {
+ Halo00PBR pbr = halo00_march(i.worldPos, i.uv0);
+ albedo = pbr.albedo;
+ normal = pbr.normal;
+ }
+#endif
+
+#if defined(_RENDERING_CUTOUT)
+#if defined(_RENDERING_CUTOUT_STOCHASTIC)
+ float ar = rand2(i.uv0);
+ clip(albedo.a - ar);
+#else
+ clip(albedo.a - _Alpha_Cutoff);
+#endif
+ albedo.a = 1;
+#endif
+
#if defined(_METALLIC_MAP)
float metallic = _MetallicTex.SampleBias(GET_SAMPLER_PBR,
UV_SCOFF(i, _MetallicTex_ST, 0), _Global_Sample_Bias);