In this session at Unite Copenhagen, attendees learned how to write a custom lighting shader for a stylized look that can easily be shared across multiple assets. There was also a demo of the workflow for creating and maintaining custom HLSL inside the Unity Shader Graph, and an exploration of new Shader Graph features such as keywords.
Speaker: Ciro Continisio – Unity
Watch the session on YouTube: https://youtu.be/DOLE4nrK97g
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Learn how to do stylized shading with Shader Graph – Unite Copenhagen 2019
1.
2. Learn how to create
stylised shading with
Shader Graph
Ciro Continisio - Lead Evangelist, EMEA
3. Who am I
3
Ciro Continisio
Lead Evangelist, EMEA
Focus: Games, more advanced uses of Unity
Past:
— Developer of my own games
— Certification tester at EA
@CiroContns
4. In this presentation
4
— How to get light and shading information through custom
HLSL code in Shader Graph
— Use that to create a custom toon shader
— Tips to improve your production workflow
6. Shader Graph
6
Available as part of the SRPs
— Visual shader editor
— Node-based
— Instant feedback
— Now out of Preview
www.unity3d.com/shader-graph
10. “Stylised” look
10
— Something that doesn’t necessarily look real
– Altering the surface response to shadows and lighting
– Added abstract details (e.g. an outline)
— Exaggerating or removing details
– To direct the viewer’s attention
– To make the game easier to read
– To still look cool on less powerful hardware
15. Getting main light information
1
2
3
4
5
6
7
8
#if SHADERGRAPH_PREVIEW
Direction = half3(0.5, 0.5, 0);
Color = 1;
#else
Light light = GetMainLight();
Direction = light.direction;
Color = light.color;
#endif
15
(this code will be shared at the end of the presentation)
35. 35
There’s more…
— Get information from Ambient lighting or GI
— Get information on additional lights in the scene (point lights)
There’s a blog post out about this: bit.ly/CustomLightingSG
38. 38
1: Lighting and shadows
— Hard transition from light to shadows
– Only 2 colours (1 transition)
— Never really reaching full white or full black
48. 3: The backlight halo
48
Gives an appreciation of the colour of the model
even when it should be actually dark
— When point of view is completely opposite the
light source, contours are lit
51. 4: The side shine
51
Helps to read the silhouette
— Bright thin light on the side of the model,
where light is coming from
— Often the brightest spot, reaching almost
white
57. Want to learn more?
Tutorial:
Introduction to Shader Graph
Tutorial:
Shader Graph: Color Node
Project:
Make a Flag Move with
Shader Graph
Subscribe now for a 3-month free trial at
unity.com/learn-premium with code: UNITECPH19
*Learn Premium is included in Unity Plus and Pro licenses. Just sign in with your Unity ID.