Skip to content

Commit 29ee278

Browse files
committed
Light tweaks and bugfix on shader
1 parent 771b116 commit 29ee278

File tree

7 files changed

+15449
-1205
lines changed

7 files changed

+15449
-1205
lines changed

UOP1_Project/Assets/Shaders/CustomHLSL/CustomLighting.hlsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
void MainLight_float(float3 WorldPos, out float3 Direction, out float3 Color, out float ShadowAtten)
55
{
6-
#if SHADERGRAPH_PREVIEW
6+
#if defined(SHADERGRAPH_PREVIEW)
77
Direction = float3(0.5, 0.5, 0);
88
Color = 1;
99
ShadowAtten = 1;
@@ -31,7 +31,7 @@ void DirectSpecular_float(float Smoothness, float3 Direction, float3 WorldNormal
3131
{
3232
float4 White = 1;
3333

34-
#if SHADERGRAPH_PREVIEW
34+
#if defined(SHADERGRAPH_PREVIEW)
3535
Out = 0;
3636
#else
3737
Smoothness = exp2(10 * Smoothness + 1);
@@ -47,7 +47,7 @@ void AdditionalLights_float(float Smoothness, float3 WorldPosition, float3 World
4747
float3 specularColor = 0;
4848
float4 White = 1;
4949

50-
#ifndef SHADERGRAPH_PREVIEW
50+
#if !defined(SHADERGRAPH_PREVIEW)
5151
Smoothness = exp2(10 * Smoothness + 1);
5252
WorldNormal = normalize(WorldNormal);
5353
WorldView = SafeNormalize(WorldView);

UOP1_Project/Assets/Shaders/SubGraphs/AdditionalLights.shadersubgraph

Lines changed: 663 additions & 60 deletions
Large diffs are not rendered by default.

UOP1_Project/Assets/Shaders/SubGraphs/AdditionalLightsToon.shadersubgraph

Lines changed: 1417 additions & 106 deletions
Large diffs are not rendered by default.

UOP1_Project/Assets/Shaders/SubGraphs/ToonLightingModel.shadersubgraph

Lines changed: 5681 additions & 360 deletions
Large diffs are not rendered by default.

UOP1_Project/Assets/Shaders/SubGraphs/ToonShading.shadersubgraph

Lines changed: 2710 additions & 211 deletions
Large diffs are not rendered by default.

UOP1_Project/Assets/Shaders/Toon.shadergraph

Lines changed: 2816 additions & 246 deletions
Large diffs are not rendered by default.

UOP1_Project/Assets/Shaders/Toon_RandomPositionTint.shadergraph

Lines changed: 2159 additions & 219 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)