SlideShare uma empresa Scribd logo
1 de 43
Baixar para ler offline
Shaders
Tasos Stamadianos
Before we begin...
- Please download the necessary files:
- http://bit.ly/2arPTiv
Agenda
● About me
● What’s a shader?
● Graphics pipeline high-level
● Lighting
● Physically-based rendering
● Physically-based rendering in Unity
● Post-processing effects
● Unity shader system
● Post-processing effect example
About Me
- Graduated from UOIT
- Engine programmer at Ludia
- Programming is love, programming is life
No black boxes!
- Know enough to Google it!
Reinvent the wheel!
- Practice, practice, practice to learn!
Ask questions!
- No one attends presentations because they already know everything.
- No such thing as a stupid question
- While embarrassment can be an effective growing tool for some, it can
paralyze others out of learning.
What’s a shader?
- A lightweight program running thousands at times at once on the GPU
- Takes in data and outputs data
- Varies depending on stage of graphics pipeline
Graphics Pipeline High-level
- Starts with a 3D model and ends with a flat image on the screen
Model-friendly
vertex data Vertex
Shader
GPU-friendly
vertex data
Textures and
other data
Fragment
Shader
Pretty pixels
Graphics Pipeline High-level
Graphics Pipeline High-level
- Models are comprised of their own points relative to that model, not to your
game world
- First step is to position these local points into the game world
- To do this we use....
Vertex Shaders
- Given information about a vertex and some info about the world and camera,
this places a point on a model into the virtual world
- There’s also some GPU stuff related to clipping but that’s not important for this workshop
- Model data in, important data for shading out!
Graphics Pipeline High-level
- After we know what has to be rendered, it comes time to actually render it
- Known as ‘shading’
- Use vertex data and some other customizable parameters
- Uniforms (constants), textures, etc
Fragment Shader
- The penultimate step of the rendered pixel, but easily the most important
- Vertices are assembled into tiny pieces and we use interpolated data to colour
things (normals and UVs most common)
- All colouring and effects are done here
- Normal mapping
- Colour correction
- Toon shading
Fragment Shader
- Most common example is normal mapping
Fragment Shader
- Toon shading is popular too
Fragment Shader
- But nothing is more ubiquitous than LENS FLARES AND BLOOM
- SO REALISTIC
The Final Step
- Blending to the backbuffer
- Incoming pixels must interact with existing pixels
- Try it
Geometry Shaders
- Vertices can also produce more vertices
- Geometry shaders take one vertex, do some calculations, and output more
vertices!
- Good for particles
Tessellation Shaders
- Take a model as a whole and either reduce/increase the number of triangles
- Increases or decreases model quality to save on calculations
Lighting
- Traditional method is to use Phong shading
- Looks okay, efficient and cheap
- Doesn’t have the next-gen look
Physically-based rendering!
- THE FUTURE IS HERE
- Use physical properties of a material (roughness, shininess) to light it, and
reflect how light bounces around a scene!
- Global illumination in a fast way
- Unity uses this method
Physically-based rendering in Unity
- Unity material system is pretty powerful and customizable
- Relies on certain material properties, and we will go over each of them
A Note on Maps
- “Maps” are just fancy terms for textures
- Dictate the values at a given point of a surface
- Albedo, specular, normal, etc
- Each will be explained
Unity PBR Material Parameters
- Albedo
- Colour at a specific point
- Can be uniform or provided via ‘albedo map’, AKA ‘texture map’
Unity PBR Material Parameters
- Metallic
- One of two shininess options
- Basically, how metalic an object is will influence how much light reflects
- Can also specify “smoothness”
- Describes how the reflected light will reflect
Unity PBR Material Parameters
- Specular
- The other of two shininess options
- Use a map to specify the shiny parts of the
surface
- Also uses the “smoothness” parameter
Unity PBR Material Parameters
- Normal map
- Specify detailed normals to use in the lighting calculations
Unity PBR Material Parameters
- Height map, or parallax map
- Gives the appearance of protruding geometry from a flat surface
- Fake extra modelled detail at a fraction of the cost
Unity PBR Material Parameters
- Occlusion map
- Specify how certain parts of the model should react to indirect lighting (lighting from the scene)
Unity PBR Material Parameters
- Emission map
- Specify the light emitting from areas of a surface
- Both colour and intensity
Unity PBR Material Parameters
- Detail mask
- Specify parts of the surface which need more detail
- Provide more detail with the specified albedo and normal textures
Post-processing effects
- Make things pretty!
- Shaders can be used to change colours of a screen as a whole
- Known as post-processing effects
- Colour correction, greyscale, toon shading, bloom
- Lens flares for that next-gen look & feel
- Must use the Unity shader and RTT system now
Unity Shader System
- Can write a variety of shaders
- Surface shader (lighting, not what we’re interested in)
- Traditional vertex/fragment shader (more useful for post-processing)
- Fixed-function (i don’t know why these are still here)
Unity Shader System
- We’ll use the Vertex/Fragment shader method
- Unity ShaderLab is based on HLSL
Putting it all together
- Need two things:
- Script with “OnRenderImage” implemented
- Shader to apply
Post-processing effect example
OnRenderImage
- Important parameters
- ‘src’ and ‘dest’ are render targets
- One extremely important function
Fullscreen Blur
- One of the easiest effects to create
- Can be used to bring things in/out of focus
- Cheap DOF
Questions?
Shameless friend plug
- Special thanks to:
- Jonathan Virly for the spider mech
- jones.virly@gmail.com
- Matthew Racanelli for the textures
- mracanelli.com
Helpful resources
- Krita
- General 2D painting
- https://krita.org/en/
- Blender
- 3D Modelling + map painting
- https://www.blender.org
- Sculptris
- Normal maps
- http://pixologic.com/sculptris/
Thank you!
I enjoy learning through teaching!
@tasostam
tasosgamedev.com

Mais conteúdo relacionado

Destaque

유니티 게임 그래픽스 아트 개발 사례 분석
유니티 게임 그래픽스 아트 개발 사례 분석유니티 게임 그래픽스 아트 개발 사례 분석
유니티 게임 그래픽스 아트 개발 사례 분석SangYun Yi
 
Brdf기반 사전정의 스킨 셰이더
Brdf기반 사전정의 스킨 셰이더Brdf기반 사전정의 스킨 셰이더
Brdf기반 사전정의 스킨 셰이더동석 김
 
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다 공개용
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다  공개용물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다  공개용
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다 공개용JP Jung
 
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현유니티의 툰셰이딩을 사용한 3D 애니메이션 표현
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현MinGeun Park
 
Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Alexander Dolbilov
 
Computacao grafica
Computacao graficaComputacao grafica
Computacao graficaHélio Jovo
 

Destaque (19)

Pixelles Game Incubator 4 Info Session (2015-2016)
Pixelles Game Incubator 4 Info Session (2015-2016)Pixelles Game Incubator 4 Info Session (2015-2016)
Pixelles Game Incubator 4 Info Session (2015-2016)
 
Info Session: Pixelles Game Incubator 3
Info Session: Pixelles Game Incubator 3Info Session: Pixelles Game Incubator 3
Info Session: Pixelles Game Incubator 3
 
Presentation
PresentationPresentation
Presentation
 
PGI3 - Creating Art with Rekka Bell
PGI3 - Creating Art with Rekka BellPGI3 - Creating Art with Rekka Bell
PGI3 - Creating Art with Rekka Bell
 
PGI3 - Intro to Programming
PGI3 - Intro to ProgrammingPGI3 - Intro to Programming
PGI3 - Intro to Programming
 
Twine intro by Tanya Short
Twine intro by Tanya ShortTwine intro by Tanya Short
Twine intro by Tanya Short
 
Info Session: Pixelles Game Incubator 2
Info Session: Pixelles Game Incubator 2 Info Session: Pixelles Game Incubator 2
Info Session: Pixelles Game Incubator 2
 
Pixelles Info Session
Pixelles Info SessionPixelles Info Session
Pixelles Info Session
 
Intro++ to C#
Intro++ to C#Intro++ to C#
Intro++ to C#
 
유니티 게임 그래픽스 아트 개발 사례 분석
유니티 게임 그래픽스 아트 개발 사례 분석유니티 게임 그래픽스 아트 개발 사례 분석
유니티 게임 그래픽스 아트 개발 사례 분석
 
PGI3 - Mechanics, Dynamics, and Aesthetics
PGI3 - Mechanics, Dynamics, and AestheticsPGI3 - Mechanics, Dynamics, and Aesthetics
PGI3 - Mechanics, Dynamics, and Aesthetics
 
Making Video Games. Everyone! Get in Here!
Making Video Games. Everyone! Get in Here!Making Video Games. Everyone! Get in Here!
Making Video Games. Everyone! Get in Here!
 
Brdf기반 사전정의 스킨 셰이더
Brdf기반 사전정의 스킨 셰이더Brdf기반 사전정의 스킨 셰이더
Brdf기반 사전정의 스킨 셰이더
 
UI/UX with Bio Jade
UI/UX with Bio JadeUI/UX with Bio Jade
UI/UX with Bio Jade
 
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다 공개용
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다  공개용물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다  공개용
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다 공개용
 
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현유니티의 툰셰이딩을 사용한 3D 애니메이션 표현
유니티의 툰셰이딩을 사용한 3D 애니메이션 표현
 
Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)
 
Computacao grafica
Computacao graficaComputacao grafica
Computacao grafica
 
Texturas para games
Texturas para gamesTexturas para games
Texturas para games
 

Último

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Último (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Workshop: (Unity3D) Shaders – Making your games pretty!

  • 2. Before we begin... - Please download the necessary files: - http://bit.ly/2arPTiv
  • 3. Agenda ● About me ● What’s a shader? ● Graphics pipeline high-level ● Lighting ● Physically-based rendering ● Physically-based rendering in Unity ● Post-processing effects ● Unity shader system ● Post-processing effect example
  • 4. About Me - Graduated from UOIT - Engine programmer at Ludia - Programming is love, programming is life
  • 5. No black boxes! - Know enough to Google it!
  • 6. Reinvent the wheel! - Practice, practice, practice to learn!
  • 7. Ask questions! - No one attends presentations because they already know everything. - No such thing as a stupid question - While embarrassment can be an effective growing tool for some, it can paralyze others out of learning.
  • 8. What’s a shader? - A lightweight program running thousands at times at once on the GPU - Takes in data and outputs data - Varies depending on stage of graphics pipeline
  • 9. Graphics Pipeline High-level - Starts with a 3D model and ends with a flat image on the screen Model-friendly vertex data Vertex Shader GPU-friendly vertex data Textures and other data Fragment Shader Pretty pixels
  • 11. Graphics Pipeline High-level - Models are comprised of their own points relative to that model, not to your game world - First step is to position these local points into the game world - To do this we use....
  • 12. Vertex Shaders - Given information about a vertex and some info about the world and camera, this places a point on a model into the virtual world - There’s also some GPU stuff related to clipping but that’s not important for this workshop - Model data in, important data for shading out!
  • 13. Graphics Pipeline High-level - After we know what has to be rendered, it comes time to actually render it - Known as ‘shading’ - Use vertex data and some other customizable parameters - Uniforms (constants), textures, etc
  • 14. Fragment Shader - The penultimate step of the rendered pixel, but easily the most important - Vertices are assembled into tiny pieces and we use interpolated data to colour things (normals and UVs most common) - All colouring and effects are done here - Normal mapping - Colour correction - Toon shading
  • 15. Fragment Shader - Most common example is normal mapping
  • 16. Fragment Shader - Toon shading is popular too
  • 17. Fragment Shader - But nothing is more ubiquitous than LENS FLARES AND BLOOM - SO REALISTIC
  • 18. The Final Step - Blending to the backbuffer - Incoming pixels must interact with existing pixels - Try it
  • 19. Geometry Shaders - Vertices can also produce more vertices - Geometry shaders take one vertex, do some calculations, and output more vertices! - Good for particles
  • 20. Tessellation Shaders - Take a model as a whole and either reduce/increase the number of triangles - Increases or decreases model quality to save on calculations
  • 21. Lighting - Traditional method is to use Phong shading - Looks okay, efficient and cheap - Doesn’t have the next-gen look
  • 22. Physically-based rendering! - THE FUTURE IS HERE - Use physical properties of a material (roughness, shininess) to light it, and reflect how light bounces around a scene! - Global illumination in a fast way - Unity uses this method
  • 23. Physically-based rendering in Unity - Unity material system is pretty powerful and customizable - Relies on certain material properties, and we will go over each of them
  • 24. A Note on Maps - “Maps” are just fancy terms for textures - Dictate the values at a given point of a surface - Albedo, specular, normal, etc - Each will be explained
  • 25. Unity PBR Material Parameters - Albedo - Colour at a specific point - Can be uniform or provided via ‘albedo map’, AKA ‘texture map’
  • 26. Unity PBR Material Parameters - Metallic - One of two shininess options - Basically, how metalic an object is will influence how much light reflects - Can also specify “smoothness” - Describes how the reflected light will reflect
  • 27. Unity PBR Material Parameters - Specular - The other of two shininess options - Use a map to specify the shiny parts of the surface - Also uses the “smoothness” parameter
  • 28. Unity PBR Material Parameters - Normal map - Specify detailed normals to use in the lighting calculations
  • 29. Unity PBR Material Parameters - Height map, or parallax map - Gives the appearance of protruding geometry from a flat surface - Fake extra modelled detail at a fraction of the cost
  • 30. Unity PBR Material Parameters - Occlusion map - Specify how certain parts of the model should react to indirect lighting (lighting from the scene)
  • 31. Unity PBR Material Parameters - Emission map - Specify the light emitting from areas of a surface - Both colour and intensity
  • 32. Unity PBR Material Parameters - Detail mask - Specify parts of the surface which need more detail - Provide more detail with the specified albedo and normal textures
  • 33. Post-processing effects - Make things pretty! - Shaders can be used to change colours of a screen as a whole - Known as post-processing effects - Colour correction, greyscale, toon shading, bloom - Lens flares for that next-gen look & feel - Must use the Unity shader and RTT system now
  • 34. Unity Shader System - Can write a variety of shaders - Surface shader (lighting, not what we’re interested in) - Traditional vertex/fragment shader (more useful for post-processing) - Fixed-function (i don’t know why these are still here)
  • 35. Unity Shader System - We’ll use the Vertex/Fragment shader method - Unity ShaderLab is based on HLSL
  • 36. Putting it all together - Need two things: - Script with “OnRenderImage” implemented - Shader to apply
  • 38. OnRenderImage - Important parameters - ‘src’ and ‘dest’ are render targets - One extremely important function
  • 39. Fullscreen Blur - One of the easiest effects to create - Can be used to bring things in/out of focus - Cheap DOF
  • 41. Shameless friend plug - Special thanks to: - Jonathan Virly for the spider mech - jones.virly@gmail.com - Matthew Racanelli for the textures - mracanelli.com
  • 42. Helpful resources - Krita - General 2D painting - https://krita.org/en/ - Blender - 3D Modelling + map painting - https://www.blender.org - Sculptris - Normal maps - http://pixologic.com/sculptris/
  • 43. Thank you! I enjoy learning through teaching! @tasostam tasosgamedev.com