diff options
| author | yum <yum.food.vr@gmail.com> | 2025-07-23 22:53:08 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-07-23 22:53:08 -0700 |
| commit | 4539f87e36cb3ca554e1e174c19206b552107c57 (patch) | |
| tree | 6f9aca818989773cc10f3c465224a07f847eb279 /Shaders/TaSTT_lighting.cginc | |
| parent | f6b93a20d754579008076e85f5c0a97e1bcbc258 (diff) | |
Delete unused filesv1.0.0-beta00
Diffstat (limited to 'Shaders/TaSTT_lighting.cginc')
| -rw-r--r-- | Shaders/TaSTT_lighting.cginc | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/Shaders/TaSTT_lighting.cginc b/Shaders/TaSTT_lighting.cginc deleted file mode 100644 index bc3f3f3..0000000 --- a/Shaders/TaSTT_lighting.cginc +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef TASTT_LIGHTING -#define TASTT_LIGHTING - -#include "AutoLight.cginc" -#include "UnityPBSLighting.cginc" -#include "ray_march.cginc" -#include "pbr.cginc" -#include "poi.cginc" -#include "stt_generated.cginc" -#include "stt_text.cginc" - -void getVertexLightColor(inout v2f i) -{ - #if defined(VERTEXLIGHT_ON) - float3 light_pos = float3(unity_4LightPosX0.x, unity_4LightPosY0.x, - unity_4LightPosZ0.x); - float3 light_vec = light_pos - i.worldPos; - float3 light_dir = normalize(light_vec); - float ndotl = DotClamped(i.normal, light_dir); - // Light fills an expanding sphere with surface area 4 * pi * r^2. - // By conservation of energy, this means that at distance r, light intensity - // is proportional to 1/(r^2). - float attenuation = 1 / (1 + dot(light_vec, light_vec) * unity_4LightAtten0.x); - i.vertexLightColor = unity_LightColor[0].rgb * ndotl * attenuation; - - i.vertexLightColor = Shade4PointLights( - unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, - unity_LightColor[0].rgb, - unity_LightColor[1].rgb, - unity_LightColor[2].rgb, - unity_LightColor[3].rgb, - unity_4LightAtten0, i.worldPos, i.normal - ); - #endif -} - -v2f vert(appdata v) -{ - v2f o; - o.position = UnityObjectToClipPos(v.position); - o.worldPos = mul(unity_ObjectToWorld, v.position); - o.normal = UnityObjectToWorldNormal(v.normal); - - o.uv = v.uv; - getVertexLightColor(o); - - return o; -} - -fixed4 frag(v2f i, out float depth : SV_DepthLessEqual) : SV_Target -{ - depth = -1000.0; - - return stt_ray_march(i, depth); -} - -#endif // TASTT_LIGHTING |
