Skip to content

Commit b40ae19

Browse files
[BUGFIX] *GameDev Toon Shader* - hooked up light colour and intensity in the shader.
1 parent c0df0b7 commit b40ae19

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

otls/mat_toon_glsl_shader.hda/INDEX__SECTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ Inputs: 0 to 0
1010
Subnet: false
1111
Python: false
1212
Empty: false
13-
Modified: Tue Apr 9 15:25:55 2019
13+
Modified: Fri Aug 2 12:21:59 2019
1414

otls/mat_toon_glsl_shader.hda/Vop_1mat__toon__glsl__shader/Glsl150Fragment

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ void SimpleLightingModel(in vec3 P, in vec3 nN, inout vec3 lDiff, vec3 lightPos)
177177
S = smoothstep(0.29, 0.3, clamp(dot(normalize(L), nN), 0, 1));
178178
S = step(threshold + (1 - occlusion) + aoMap, dot(normalize(L), nN));
179179
vec3 base = mix(baseColour * tintColour, baseColour, S);
180+
base = base * lightColour * lightIntensity;
180181
//lDiff = mix(emit, base, shifted);
181182
lDiff = base + emit;
182183
//lDiff = base;
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
SaveSpareParms := 0;
21
CheckExternal := 1;
3-
SaveIcon := 1;
4-
GzipContents := 1;
52
ContentsCompressionType := 1;
6-
UnlockOnCreate := 0;
7-
SaveCachedCode := 0;
3+
ForbidOutsideParms := 1;
4+
GzipContents := 1;
85
LockContents := 1;
96
MakeDefault := 1;
10-
UseDSParms := 1;
11-
ForbidOutsideParms := 1;
7+
ParmsFromVfl := 0;
128
PrefixDroppedParmLabel := 0;
139
PrefixDroppedParmName := 0;
14-
ParmsFromVfl := 0;
10+
SaveCachedCode := 0;
11+
SaveIcon := 1;
12+
SaveSpareParms := 0;
13+
UnlockOnCreate := 0;
14+
UseDSParms := 1;

0 commit comments

Comments
 (0)