日本語はコチラ
https://www.slideshare.net/ssuser741a3c/lookingglass-renderingoptimizeplanjp
This is the side for this event.
https://lookingglass.connpass.com/event/115508/
2. “Rendering” is the bottleneck
I want to play “LookingGlass” with my Laptop(MacBookPro2015)
not “VR Ready PC”.
I‘d like to optimize the rendering.
Before optimizing I have to know the current rendering.
3. Current Rendering...
• I launched “Unity FrameDebugger” and
“RenderDoc” to figure out current Rendering.
4. Flow of the Rendering
All tiles are drawn, and
then render for final
result.
Changing
View/Projection Matrix
and then drawing.
Repeat this step to fill
the tiled texture.
5. The bottleneck is here
The bottleneck is here!
Repeating many “Camera.Render” is the
bottleneck.
6. The idea to reduce the execute time ...
If we can choose the number of tiles
(ex. 3 * 4) , we can reduce the execute
time.
7. I found the setting
The setting is here.
In the“Holo PlayCapture”
prefab.
(I knew this setting from
source code).
8. Detail information
We can choose the size of texture and the numer of tiles.
The best setting is depends on Machine spec.
9. Mission Complete !!
No!! The “Quality” became lower!
There should be other things that we can
do.
12. We want to change to this way!
Camera.RenderCulling ShadowMapPass
DepthTexturePass Rendering
Blit to Tile
repeat
TileX × TileY
Executing Culling and creating ShadowMap before the
“Repeat”.
13. Changing the behavior of “Camera.Render”...
Oh we have SRP(Scriptable Render Pipeline)!
Yes!!!
We can implements original SRP!!!
14. My Custom RenderPipeline
Camera.RenderCulling ShadowMapPass
DepthTexturePass Rendering
Blit to Tile
repeat
TileX × TileY
This step was removed.
When I implemented my own RP based on LWRP...
* No cascade shadow and no screen base shadow.
15. Camera.RenderCulling ShadowMapPass
Rendering
Blit To Tile
repeat
TileX × TileY
Camera.Render
Culling ShadowMapPassDepthTexturePass Rendering
Blit To Tile
repeat
TileX × TileY
SourceCode
https://github.com/wotakuro/LookingGlassRenderPipeline
Before
After
16. I’m not satisfied with this....
Much more faster...
Much more optimization...
17. Throw away “user-friendly”.
Faster and faster!
- Special shaders should be written for this RenderPipeline.
- Throw away PostProcessing etc...
- Implements more things!
18. Much more faster...
Currently , complete to create RenderTexture and then Blit to this
Texture...
Why we don’t draw to this texture directly?
Camera.RenderCulling ShadowMapPass
Rendering
Blit to Tile
repeat
TileX × TileY
19. Much more faster...
To complete rendering result , there are some material changing...
Some material changing are in the “Repeat”...
I wanted remove “Repeat”....
Camera.RenderCulling ShadowMapPass
Rendering
Blit to Tile
repeat
TileX × TileY