From 2dfd6322587eb095a5a4f7b22d70e1abcc14d5e3 Mon Sep 17 00:00:00 2001 From: yum Date: Mon, 31 Mar 2025 21:50:39 -0700 Subject: Overhaul wrapped lighting Now: * k=0 -> lambertian * k=0.5 -> half lambertian * k=1.0 -> flat All three points should be energy conserving, but I haven't done the actual analysis yet. --- vertex_domain_warping.cginc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'vertex_domain_warping.cginc') diff --git a/vertex_domain_warping.cginc b/vertex_domain_warping.cginc index 3bbc5cd..29c500a 100644 --- a/vertex_domain_warping.cginc +++ b/vertex_domain_warping.cginc @@ -2,6 +2,7 @@ #define __VERTEX_DOMAIN_WARPING_INC #include "audiolink.cginc" +#include "features.cginc" #include "globals.cginc" #include "math.cginc" @@ -10,14 +11,14 @@ float3 domainWarpVertexPosition(float3 objPos) { float speed = _Vertex_Domain_Warping_Speed; float scale = _Vertex_Domain_Warping_Scale; float strength = _Vertex_Domain_Warping_Strength; - float octaves = _Vertex_Domain_Warping_Octaves; + uint octaves = (uint) _Vertex_Domain_Warping_Octaves; #if defined(_VERTEX_DOMAIN_WARPING_AUDIOLINK) [branch] if (AudioLinkIsAvailable()) { float vu = AudioLinkData(ALPASS_FILTEREDVU_INTENSITY + uint2(0, 0)); - strength += vu * _Vertex_Domain_Warping_Audiolink_VU_Factors.x; - scale += vu * _Vertex_Domain_Warping_Audiolink_VU_Factors.y; + strength += vu * _Vertex_Domain_Warping_Audiolink_VU_Strength_Factor; + scale += vu * _Vertex_Domain_Warping_Audiolink_VU_Scale_Factor; } #endif -- cgit v1.2.3