SlideShare a Scribd company logo
1 of 49
Unity Scriptable Render Pipeline
в кастомизацию рендеринга с головой
Надеждин Кирилл
SWAG MASHA
Шейдер или Пайплайн
Шейдер или Пайплайн
Шейдер - “сам по себе”
Пайплайн - совокупность разных этапов отрисовки
Шейдер или Пайплайн?
Шейдер или Пайплайн?
Шейдер или Пайплайн?
Шейдер или Пайплайн?
Шейдер или Пайплайн?
Шейдер или Пайплайн
Краткая история рендеринга и шейдеров в Unity
ShaderLab
ShaderLab
Shader "SomeShader" {
[Properties]
__Subshaders__
}
ShaderLab
SubShader {
Pass {
Material {
Diffuse[_Color] // fixed function
}
}
}
ShaderLab
SubShader {
Pass {
Material {
Diffuse[_Color] // fixed function
}
} Pass {...}
}
ShaderLab
SubShader {
Pass {
Material {
Diffuse[_Color] // fixed function
}
} Pass {...} Pass {...}
}
ShaderLab
ShaderLab = Shaders = Pipelines
ShaderLab
Command Buffers
Command Buffers
Command Buffers
Scriptable Render Pipeline
Scriptable Render Pipeline
LWRP + HDRP
LWRP = мобилки
HDRP = “убийца” Unreal Engine
LWRP - “легкий” пайплайн
LWRP
LWRP
LWRP → URP
URP
Scriptable Render Pipeline
“Этюд” с Shadow Fight 3
(почти)
SRP
• ScriptableRenderAsset
• RenderPipeline
• ScriptableRenderContext
SRP
var cmds = new CommandBuffer();
cmds.ClearRenderTarget(true, true, _asset.clearColor);
SRP
SRP
camera.TryGetCullingParameters(out var cullingParameters);
var results = context.Cull(ref cullingParameters);
context.DrawRenderers(cullingResults, ref ds, ref of);
SRP
SRP
context.DrawSkybox(camera);
SRP
SRP
drawSettings.perObjectData = PerObjectData.Lightmaps;
SRP
SRP
cmd.SetRenderTarget(tempRt);
{
...
cmd.DrawRenderer(renderer, solidMat, 0, 0);
…
}
SRP
SRP
cmd.DrawRenderer(renderer, alphaShadowMat, 0, 0);
SRP
SRP
• Детальный, гранулированный контроль
• Единая точка входа - проще для понимания и отладки
• Полное отсутствие ненужного функционала
Вопросы?

More Related Content

More from DevGAMM Conference

Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...DevGAMM Conference
 
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)DevGAMM Conference
 
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)DevGAMM Conference
 
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...DevGAMM Conference
 
How to increase wishlists & game sales from China? Growth marketing tactics &...
How to increase wishlists & game sales from China? Growth marketing tactics &...How to increase wishlists & game sales from China? Growth marketing tactics &...
How to increase wishlists & game sales from China? Growth marketing tactics &...DevGAMM Conference
 
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)DevGAMM Conference
 
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...DevGAMM Conference
 
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...DevGAMM Conference
 
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...DevGAMM Conference
 
Branded Content: How to overcome players' immunity to advertising / Alex Brod...
Branded Content: How to overcome players' immunity to advertising / Alex Brod...Branded Content: How to overcome players' immunity to advertising / Alex Brod...
Branded Content: How to overcome players' immunity to advertising / Alex Brod...DevGAMM Conference
 
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...DevGAMM Conference
 
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...DevGAMM Conference
 
Launching a title in Asia Pacific and China / Maxim Chuvalov (Wargaming)
Launching a title in Asia Pacific and China / Maxim Chuvalov (Wargaming)Launching a title in Asia Pacific and China / Maxim Chuvalov (Wargaming)
Launching a title in Asia Pacific and China / Maxim Chuvalov (Wargaming)DevGAMM Conference
 
5 things I wish I knew before becoming a VFX Artist / Paulina Grigonis (Tuatara)
5 things I wish I knew before becoming a VFX Artist / Paulina Grigonis (Tuatara)5 things I wish I knew before becoming a VFX Artist / Paulina Grigonis (Tuatara)
5 things I wish I knew before becoming a VFX Artist / Paulina Grigonis (Tuatara)DevGAMM Conference
 
Pitching with Killer Demos / Jaroslav Stacevič (Nordcurrent)
Pitching with Killer Demos / Jaroslav Stacevič (Nordcurrent)Pitching with Killer Demos / Jaroslav Stacevič (Nordcurrent)
Pitching with Killer Demos / Jaroslav Stacevič (Nordcurrent)DevGAMM Conference
 
How to Craft the Perfect Pitch / Nathan Sölbrandt ( Xsolla)
How to Craft the Perfect Pitch / Nathan Sölbrandt ( Xsolla)How to Craft the Perfect Pitch / Nathan Sölbrandt ( Xsolla)
How to Craft the Perfect Pitch / Nathan Sölbrandt ( Xsolla)DevGAMM Conference
 
Making Games We Like aka Personal Biases in Game Design / Rok Mioč (Outfit7)
Making Games We Like aka Personal Biases in Game Design / Rok Mioč (Outfit7)Making Games We Like aka Personal Biases in Game Design / Rok Mioč (Outfit7)
Making Games We Like aka Personal Biases in Game Design / Rok Mioč (Outfit7)DevGAMM Conference
 
How to game the Xbox system / Neil Holmes (Xbox)
How to game the Xbox system / Neil Holmes (Xbox)How to game the Xbox system / Neil Holmes (Xbox)
How to game the Xbox system / Neil Holmes (Xbox)DevGAMM Conference
 
AI-Enhanced Game Development: Unleashing Creativity and Empowering Leaders / ...
AI-Enhanced Game Development: Unleashing Creativity and Empowering Leaders / ...AI-Enhanced Game Development: Unleashing Creativity and Empowering Leaders / ...
AI-Enhanced Game Development: Unleashing Creativity and Empowering Leaders / ...DevGAMM Conference
 
AI for Art Generation / Dave Savio (Artifactory.ai)
AI for Art Generation / Dave Savio (Artifactory.ai)AI for Art Generation / Dave Savio (Artifactory.ai)
AI for Art Generation / Dave Savio (Artifactory.ai)DevGAMM Conference
 

More from DevGAMM Conference (20)

Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
 
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
 
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
 
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
 
How to increase wishlists & game sales from China? Growth marketing tactics &...
How to increase wishlists & game sales from China? Growth marketing tactics &...How to increase wishlists & game sales from China? Growth marketing tactics &...
How to increase wishlists & game sales from China? Growth marketing tactics &...
 
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
 
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
 
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
 
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
 
Branded Content: How to overcome players' immunity to advertising / Alex Brod...
Branded Content: How to overcome players' immunity to advertising / Alex Brod...Branded Content: How to overcome players' immunity to advertising / Alex Brod...
Branded Content: How to overcome players' immunity to advertising / Alex Brod...
 
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
 
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
 
Launching a title in Asia Pacific and China / Maxim Chuvalov (Wargaming)
Launching a title in Asia Pacific and China / Maxim Chuvalov (Wargaming)Launching a title in Asia Pacific and China / Maxim Chuvalov (Wargaming)
Launching a title in Asia Pacific and China / Maxim Chuvalov (Wargaming)
 
5 things I wish I knew before becoming a VFX Artist / Paulina Grigonis (Tuatara)
5 things I wish I knew before becoming a VFX Artist / Paulina Grigonis (Tuatara)5 things I wish I knew before becoming a VFX Artist / Paulina Grigonis (Tuatara)
5 things I wish I knew before becoming a VFX Artist / Paulina Grigonis (Tuatara)
 
Pitching with Killer Demos / Jaroslav Stacevič (Nordcurrent)
Pitching with Killer Demos / Jaroslav Stacevič (Nordcurrent)Pitching with Killer Demos / Jaroslav Stacevič (Nordcurrent)
Pitching with Killer Demos / Jaroslav Stacevič (Nordcurrent)
 
How to Craft the Perfect Pitch / Nathan Sölbrandt ( Xsolla)
How to Craft the Perfect Pitch / Nathan Sölbrandt ( Xsolla)How to Craft the Perfect Pitch / Nathan Sölbrandt ( Xsolla)
How to Craft the Perfect Pitch / Nathan Sölbrandt ( Xsolla)
 
Making Games We Like aka Personal Biases in Game Design / Rok Mioč (Outfit7)
Making Games We Like aka Personal Biases in Game Design / Rok Mioč (Outfit7)Making Games We Like aka Personal Biases in Game Design / Rok Mioč (Outfit7)
Making Games We Like aka Personal Biases in Game Design / Rok Mioč (Outfit7)
 
How to game the Xbox system / Neil Holmes (Xbox)
How to game the Xbox system / Neil Holmes (Xbox)How to game the Xbox system / Neil Holmes (Xbox)
How to game the Xbox system / Neil Holmes (Xbox)
 
AI-Enhanced Game Development: Unleashing Creativity and Empowering Leaders / ...
AI-Enhanced Game Development: Unleashing Creativity and Empowering Leaders / ...AI-Enhanced Game Development: Unleashing Creativity and Empowering Leaders / ...
AI-Enhanced Game Development: Unleashing Creativity and Empowering Leaders / ...
 
AI for Art Generation / Dave Savio (Artifactory.ai)
AI for Art Generation / Dave Savio (Artifactory.ai)AI for Art Generation / Dave Savio (Artifactory.ai)
AI for Art Generation / Dave Savio (Artifactory.ai)
 

Unity Scriptable Render Pipeline - diving into scriptable customization