SlideShare une entreprise Scribd logo
1  sur  34
Shaders
Ehsan Ehrari
1
Materials, Shaders & Textures
• Rendering in Unity uses Materials, Shaders and Textures. All three
have a close relationship.
2
Materials
• Materials define how a surface should be rendered, by including
references to the Textures it uses, tiling information, Color tints and
more. The available options for a Material depend on which Shader
the Material is using.
3
Textures
• Textures are bitmap images. A Material can contain references to
textures, so that the Material’s Shader can use the textures while
calculating the surface color of a GameObject. In addition to basic
Color (Albedo) of a GameObject’s surface, Textures can represent
many other aspects of a Material’s surface such as its reflectivity or
roughness.
4
Shader
• Small scripts that contain the mathematical calculations and
algorithms for calculating the Color of each pixel rendered, based on
the lighting input and the Material configuration.
• A program specifically made to run on a GPU
• Post processing
5
3D models
• a collection of 3D coordinates called vertices
• Triangles
• Each vertices can contain few other information's color , direction
• Models cannot be rendered without a material
• Materials are wrappers which contain a shader and the values for its
properties.
• Hence, different materials can share the same shader
6
Diagram
7
Anatomy of a shaders
• Unity has two different types of shaders
• surface shaders
• fragment and vertex shaders
• fixed function shaders
8
Anatomy of a shaders
• multiple SubShader sections
• actual instructions for the GPU
• Unity execute in order until it finds one that is compatible with your
graphics
• different platforms
9
The properties
• equivalent to the public fields in a C# script
• changes made to the properties of a material while the game is
running in the editor are permanent.
10
The properties
11
The surface VS Vertex and fragment
• Whenever the material you want to simulate needs to be affected by lights
in a realistic way, chances are you’ll need a surface shader
• Surface shaders hide the calculations of how light is reflected and allows to
specify “intuitive” properties such as the albedo, the normals, the
reflectivity and so on in a function called surf.
• Vertex and fragment shaders work close to the way the GPU renders
triangles, and have no built-in concept of how light should behave. The
geometry of your model is first passed through a function called vert which
can alter its vertices. Then, individual triangles are passed through another
function called frag which decides the final RGB colour for every pixel. They
are useful for 2D effects, postprocessing and special 3D effects which are
too complex to be expressed as surface shaders.
12
Unity Standard Shader
• built-in shader
• “real-world” objects
• wide range of shader types and combinations
• enabled or disabled by simply using or not using
• Incorporate PBS
13
Physics Base Shading
• Simulates the interactions between materials and light in a way that
mimics reality.
• Only recently become possible in real-time graphics
• It works at its best in situations where lighting and materials need to
exist together intuitively and realistically.
• Advance lighting model
14
Standard Shader
• The Standard Shader is designed with hard surfaces in mind (also
known as “architectural materials”), and can deal with most real-
world materials like stone, glass, ceramics, brass, silver or rubber. It
will even do a decent job with non-hard materials like skin, hair and
cloth.
• With the Standard Shader, a large range of shader types (such as
Diffuse, Specular, Bumped Specular, Reflective) are combined into a
single shader intended to be used across all material types.
15
Rendered using the standard shader on all models
16
Material Parameters
17
Rendering Mode
• Opaque
• Cutout
• Transparent
• Fade
18
Opaque
• Opaque - Is the default, and suitable for normal solid objects with no
transparent areas.
19
Cutout
• Cutout - Allows you to create a transparent effect that has hard edges
between the opaque and transparent areas. In this mode, there are
no semi-transparent areas, the texture is either 100% opaque, or
invisible. This is useful when using transparency to create the shape
of materials such as leaves, or cloth with holes and tatters.
20
Transparent
• Transparent - Suitable for rendering realistic transparent materials
such as clear plastic or glass.
21
Fade
• Fade - Allows the transparency values to entirely fade an object out,
including any specular highlights or reflections it may have. This mode
is useful if you want to animate an object fading in or out. It is not
suitable for rendering realistic transparent materials such as clear
plastic or glass because the reflections and highlights will also be
faded out.
22
Albedo Color
• The Albedo parameter controls the base color of the
surface.
• More common to assign a texture map for the
Albedo parameter
• Albedo texture should not contain any lighting
23
Albedo Transparency
• The alpha value of the Albedo colour controls the transparency level
for the material. This only has an effect if the Rendering
Mode for the material is set to one of the transparent mode, and
not Opaque.
24
Specular mode: Specular parameter
• Standard (Specular setup):
Choose this shader for the
classic approach. A Specular
color is used to control the
color and strength of
specular reflections in the
material.
25
Metallic mode: Metallic Parameter
• When working in the Metallic
workflow (as opposed to the
Specular workflow), the the
reflectivity and light response of
the surface are modified by the
Metallic level and
the Smoothness level.
26
Metallic
27
Smoothness
• The smoothness of the material is controlled by a slider. This slider
allows you to control the “microsurface detail” or smoothness across
a surface
28
Normal Maps
• Normal maps are a type of Bump Map. They are a special kind of
texture that allow you to add surface detail such as bumps, grooves,
and scratches to a model which catch the light as if they are
represented by real geometry.
29
Normal Map
30
Height Map
• Height mapping (also known as parallax mapping) is a similar concept
to normal mapping, however this technique is more complex - and
therefore also more performance-expensive.
31
Occlusion Map
• The occlusion map is used to provide information about which areas
of the model should receive high or low indirect lighting.
32
Emission
• Emission controls the color and intensity of light emitted from the
surface. When you use an emissive Material in your Scene, it appears
as a visible source of light. The GameObject appears to be self-
illuminated.
33
Thank You
34

Contenu connexe

Tendances

Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Johan Andersson
 
CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"
CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"
CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"Ryo Suzuki
 
3Ds MAX & INTRODUCTION TO ANIMATION IN AUTODESK 3Ds MAX
3Ds MAX & INTRODUCTION TO ANIMATION IN  AUTODESK 3Ds MAX3Ds MAX & INTRODUCTION TO ANIMATION IN  AUTODESK 3Ds MAX
3Ds MAX & INTRODUCTION TO ANIMATION IN AUTODESK 3Ds MAXAbhiram Chakravadhanula
 
HDR Theory and practicce (JP)
HDR Theory and practicce (JP)HDR Theory and practicce (JP)
HDR Theory and practicce (JP)Hajime Uchimura
 
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意UnityTechnologiesJapan002
 
Best Practices for Shader Graph
Best Practices for Shader GraphBest Practices for Shader Graph
Best Practices for Shader GraphUnity Technologies
 
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례SangYun Yi
 
Cascade Shadow Mapping
Cascade Shadow MappingCascade Shadow Mapping
Cascade Shadow MappingSukwoo Lee
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発Unity Technologies Japan K.K.
 
Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Ki Hyunwoo
 
Uncharted Animation Workflow
Uncharted Animation WorkflowUncharted Animation Workflow
Uncharted Animation WorkflowNaughty Dog
 
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑[0107 박민근] 쉽게 배우는 hdr과 톤맵핑
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑MinGeun Park
 
FrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteFrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteElectronic Arts / DICE
 
Cascades Demo Secrets
Cascades Demo SecretsCascades Demo Secrets
Cascades Demo Secretsicastano
 

Tendances (20)

La sintaxis-visual
La sintaxis-visualLa sintaxis-visual
La sintaxis-visual
 
fotomontaje
fotomontajefotomontaje
fotomontaje
 
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
 
Voxelizaition with GPU
Voxelizaition with GPUVoxelizaition with GPU
Voxelizaition with GPU
 
CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"
CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"
CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"
 
2D & 3D ANIMATION
2D & 3D ANIMATION2D & 3D ANIMATION
2D & 3D ANIMATION
 
3Ds MAX & INTRODUCTION TO ANIMATION IN AUTODESK 3Ds MAX
3Ds MAX & INTRODUCTION TO ANIMATION IN  AUTODESK 3Ds MAX3Ds MAX & INTRODUCTION TO ANIMATION IN  AUTODESK 3Ds MAX
3Ds MAX & INTRODUCTION TO ANIMATION IN AUTODESK 3Ds MAX
 
Ssao
SsaoSsao
Ssao
 
HDR Theory and practicce (JP)
HDR Theory and practicce (JP)HDR Theory and practicce (JP)
HDR Theory and practicce (JP)
 
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
 
Best Practices for Shader Graph
Best Practices for Shader GraphBest Practices for Shader Graph
Best Practices for Shader Graph
 
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례
Unity3D 엔진을 활용한 게임환경 분석 및 3D 그래픽스 기술 /제작 사례
 
Cascade Shadow Mapping
Cascade Shadow MappingCascade Shadow Mapping
Cascade Shadow Mapping
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発
 
Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1
 
Uncharted Animation Workflow
Uncharted Animation WorkflowUncharted Animation Workflow
Uncharted Animation Workflow
 
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑[0107 박민근] 쉽게 배우는 hdr과 톤맵핑
[0107 박민근] 쉽게 배우는 hdr과 톤맵핑
 
FrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteFrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in Frostbite
 
Cascades Demo Secrets
Cascades Demo SecretsCascades Demo Secrets
Cascades Demo Secrets
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 

Similaire à Shaders & Standard Shader In Unity

Les 2 game 3d - texturing & materials
Les 2   game 3d - texturing & materialsLes 2   game 3d - texturing & materials
Les 2 game 3d - texturing & materialsFrancisco Peters
 
Game development terminologies
Game development terminologiesGame development terminologies
Game development terminologiesAhmed Badr
 
From Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGLFrom Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGLFITC
 
[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering Pipeline[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering PipelineWilliam Hugo Yang
 
Clean architecture for shaders unite2019
Clean architecture for shaders unite2019Clean architecture for shaders unite2019
Clean architecture for shaders unite2019Abhilash Majumder
 
Layar - 3D Content Creation Tips and Tricks
Layar - 3D Content Creation Tips and TricksLayar - 3D Content Creation Tips and Tricks
Layar - 3D Content Creation Tips and TricksLayar
 
Modeling and texturing in 3 ds max
Modeling and texturing in 3 ds maxModeling and texturing in 3 ds max
Modeling and texturing in 3 ds maxsribalaji0007
 
Modelo y textrurizado 3 ds max
Modelo y textrurizado 3 ds maxModelo y textrurizado 3 ds max
Modelo y textrurizado 3 ds maxLuchIn Avalos
 
OpenCV presentation series- part 4
OpenCV presentation series- part 4OpenCV presentation series- part 4
OpenCV presentation series- part 4Sairam Adithya
 
digital image processing.pptx
digital image processing.pptxdigital image processing.pptx
digital image processing.pptxnibiganesh
 
Cahall Final Intern Presentation
Cahall Final Intern PresentationCahall Final Intern Presentation
Cahall Final Intern PresentationDaniel Cahall
 
Rendering basics
Rendering basicsRendering basics
Rendering basicsicedmaster
 
Authoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime shortAuthoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime shortVesselin Efremov
 
Make your designers love (working with) you
Make your designers love (working with) youMake your designers love (working with) you
Make your designers love (working with) youVinay Shenoy
 

Similaire à Shaders & Standard Shader In Unity (20)

3 D texturing
 3 D texturing 3 D texturing
3 D texturing
 
Les 2 game 3d - texturing & materials
Les 2   game 3d - texturing & materialsLes 2   game 3d - texturing & materials
Les 2 game 3d - texturing & materials
 
Deferred shading
Deferred shadingDeferred shading
Deferred shading
 
Game development terminologies
Game development terminologiesGame development terminologies
Game development terminologies
 
From Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGLFrom Experimentation to Production: The Future of WebGL
From Experimentation to Production: The Future of WebGL
 
TASK 2
TASK 2TASK 2
TASK 2
 
[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering Pipeline[UniteKorea2013] The Unity Rendering Pipeline
[UniteKorea2013] The Unity Rendering Pipeline
 
Clean architecture for shaders unite2019
Clean architecture for shaders unite2019Clean architecture for shaders unite2019
Clean architecture for shaders unite2019
 
Layar - 3D Content Creation Tips and Tricks
Layar - 3D Content Creation Tips and TricksLayar - 3D Content Creation Tips and Tricks
Layar - 3D Content Creation Tips and Tricks
 
Modeling and texturing in 3 ds max
Modeling and texturing in 3 ds maxModeling and texturing in 3 ds max
Modeling and texturing in 3 ds max
 
Modelo y textrurizado 3 ds max
Modelo y textrurizado 3 ds maxModelo y textrurizado 3 ds max
Modelo y textrurizado 3 ds max
 
WT in IP.ppt
WT in IP.pptWT in IP.ppt
WT in IP.ppt
 
3D modeling and animation
3D modeling and animation3D modeling and animation
3D modeling and animation
 
OpenCV presentation series- part 4
OpenCV presentation series- part 4OpenCV presentation series- part 4
OpenCV presentation series- part 4
 
digital image processing.pptx
digital image processing.pptxdigital image processing.pptx
digital image processing.pptx
 
PPT s08-machine vision-s2
PPT s08-machine vision-s2PPT s08-machine vision-s2
PPT s08-machine vision-s2
 
Cahall Final Intern Presentation
Cahall Final Intern PresentationCahall Final Intern Presentation
Cahall Final Intern Presentation
 
Rendering basics
Rendering basicsRendering basics
Rendering basics
 
Authoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime shortAuthoring of procedural rocks in The Blacksmith realtime short
Authoring of procedural rocks in The Blacksmith realtime short
 
Make your designers love (working with) you
Make your designers love (working with) youMake your designers love (working with) you
Make your designers love (working with) you
 

Dernier

Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 

Dernier (20)

Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 

Shaders & Standard Shader In Unity

  • 2. Materials, Shaders & Textures • Rendering in Unity uses Materials, Shaders and Textures. All three have a close relationship. 2
  • 3. Materials • Materials define how a surface should be rendered, by including references to the Textures it uses, tiling information, Color tints and more. The available options for a Material depend on which Shader the Material is using. 3
  • 4. Textures • Textures are bitmap images. A Material can contain references to textures, so that the Material’s Shader can use the textures while calculating the surface color of a GameObject. In addition to basic Color (Albedo) of a GameObject’s surface, Textures can represent many other aspects of a Material’s surface such as its reflectivity or roughness. 4
  • 5. Shader • Small scripts that contain the mathematical calculations and algorithms for calculating the Color of each pixel rendered, based on the lighting input and the Material configuration. • A program specifically made to run on a GPU • Post processing 5
  • 6. 3D models • a collection of 3D coordinates called vertices • Triangles • Each vertices can contain few other information's color , direction • Models cannot be rendered without a material • Materials are wrappers which contain a shader and the values for its properties. • Hence, different materials can share the same shader 6
  • 8. Anatomy of a shaders • Unity has two different types of shaders • surface shaders • fragment and vertex shaders • fixed function shaders 8
  • 9. Anatomy of a shaders • multiple SubShader sections • actual instructions for the GPU • Unity execute in order until it finds one that is compatible with your graphics • different platforms 9
  • 10. The properties • equivalent to the public fields in a C# script • changes made to the properties of a material while the game is running in the editor are permanent. 10
  • 12. The surface VS Vertex and fragment • Whenever the material you want to simulate needs to be affected by lights in a realistic way, chances are you’ll need a surface shader • Surface shaders hide the calculations of how light is reflected and allows to specify “intuitive” properties such as the albedo, the normals, the reflectivity and so on in a function called surf. • Vertex and fragment shaders work close to the way the GPU renders triangles, and have no built-in concept of how light should behave. The geometry of your model is first passed through a function called vert which can alter its vertices. Then, individual triangles are passed through another function called frag which decides the final RGB colour for every pixel. They are useful for 2D effects, postprocessing and special 3D effects which are too complex to be expressed as surface shaders. 12
  • 13. Unity Standard Shader • built-in shader • “real-world” objects • wide range of shader types and combinations • enabled or disabled by simply using or not using • Incorporate PBS 13
  • 14. Physics Base Shading • Simulates the interactions between materials and light in a way that mimics reality. • Only recently become possible in real-time graphics • It works at its best in situations where lighting and materials need to exist together intuitively and realistically. • Advance lighting model 14
  • 15. Standard Shader • The Standard Shader is designed with hard surfaces in mind (also known as “architectural materials”), and can deal with most real- world materials like stone, glass, ceramics, brass, silver or rubber. It will even do a decent job with non-hard materials like skin, hair and cloth. • With the Standard Shader, a large range of shader types (such as Diffuse, Specular, Bumped Specular, Reflective) are combined into a single shader intended to be used across all material types. 15
  • 16. Rendered using the standard shader on all models 16
  • 18. Rendering Mode • Opaque • Cutout • Transparent • Fade 18
  • 19. Opaque • Opaque - Is the default, and suitable for normal solid objects with no transparent areas. 19
  • 20. Cutout • Cutout - Allows you to create a transparent effect that has hard edges between the opaque and transparent areas. In this mode, there are no semi-transparent areas, the texture is either 100% opaque, or invisible. This is useful when using transparency to create the shape of materials such as leaves, or cloth with holes and tatters. 20
  • 21. Transparent • Transparent - Suitable for rendering realistic transparent materials such as clear plastic or glass. 21
  • 22. Fade • Fade - Allows the transparency values to entirely fade an object out, including any specular highlights or reflections it may have. This mode is useful if you want to animate an object fading in or out. It is not suitable for rendering realistic transparent materials such as clear plastic or glass because the reflections and highlights will also be faded out. 22
  • 23. Albedo Color • The Albedo parameter controls the base color of the surface. • More common to assign a texture map for the Albedo parameter • Albedo texture should not contain any lighting 23
  • 24. Albedo Transparency • The alpha value of the Albedo colour controls the transparency level for the material. This only has an effect if the Rendering Mode for the material is set to one of the transparent mode, and not Opaque. 24
  • 25. Specular mode: Specular parameter • Standard (Specular setup): Choose this shader for the classic approach. A Specular color is used to control the color and strength of specular reflections in the material. 25
  • 26. Metallic mode: Metallic Parameter • When working in the Metallic workflow (as opposed to the Specular workflow), the the reflectivity and light response of the surface are modified by the Metallic level and the Smoothness level. 26
  • 28. Smoothness • The smoothness of the material is controlled by a slider. This slider allows you to control the “microsurface detail” or smoothness across a surface 28
  • 29. Normal Maps • Normal maps are a type of Bump Map. They are a special kind of texture that allow you to add surface detail such as bumps, grooves, and scratches to a model which catch the light as if they are represented by real geometry. 29
  • 31. Height Map • Height mapping (also known as parallax mapping) is a similar concept to normal mapping, however this technique is more complex - and therefore also more performance-expensive. 31
  • 32. Occlusion Map • The occlusion map is used to provide information about which areas of the model should receive high or low indirect lighting. 32
  • 33. Emission • Emission controls the color and intensity of light emitted from the surface. When you use an emissive Material in your Scene, it appears as a visible source of light. The GameObject appears to be self- illuminated. 33