Moving Mobile Graphics Advanced Real-time Shadowing. Marius Bjørge ARM

Similar documents
Exponential Shadow Maps

Layered Variance Shadow Maps

Vulkan Multipass mobile deferred done right

Here s the general problem we want to solve efficiently: Given a light and a set of pixels in view space, resolve occlusion between each pixel and

Achieving High-performance Graphics on Mobile With the Vulkan API

Inside VR on Mobile. Sam Martin Graphics Architect GDC 2016

Vulkan on Mobile. Daniele Di Donato, ARM GDC 2016

Optimizing Mobile Games with ARM. Solo Chang Staff Applications Engineer, ARM

Many rendering scenarios, such as battle scenes or urban environments, require rendering of large numbers of autonomous characters.

Dual-Paraboloid Shadow Mapping. A paper by Stefan Brabec, Thomas Annen, Hans-Peter Seidel Presented By Patrick Wouterse, Selmar Kok

Applications of Explicit Early-Z Culling

Profiling and Debugging Games on Mobile Platforms

Soft Shadows. Michael Schwarz

Shaders. Slide credit to Prof. Zwicker

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

PowerVR Hardware. Architecture Overview for Developers

Mobile HW and Bandwidth

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Mali Developer Resources. Kevin Ho ARM Taiwan FAE

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

VR Rendering Improvements Featuring Autodesk VRED

REVECTORIZATION-BASED SHADOW MAPPING

GPU Memory Model. Adapted from:

Point Sample Rendering

Computergrafik. Matthias Zwicker. Herbst 2010

Dave Shreiner, ARM March 2009

Rendering Objects. Need to transform all geometry then

High-Quality Surface Splatting on Today s GPUs

The Graphics Pipeline

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

Using Perception-Based Filtering to Hide Shadow Artifacts

Coding OpenGL ES 3.0 for Better Graphics Quality

Rendering Structures Analyzing modern rendering on mobile

COMP371 COMPUTER GRAPHICS

Course Recap + 3D Graphics on Mobile GPUs

Shadow Rendering. CS7GV3 Real-time Rendering

MSAA- Based Coarse Shading

Vulkan: Architecture positive How Vulkan maps to PowerVR GPUs Kevin sun Lead Developer Support Engineer, APAC PowerVR Graphics.

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

Shadows. Prof. George Wolberg Dept. of Computer Science City College of New York

Programming shaders & GPUs Christian Miller CS Fall 2011

Simpler Soft Shadow Mapping Lee Salzman September 20, 2007

TSBK03 Screen-Space Ambient Occlusion

Advanced Deferred Rendering Techniques. NCCA, Thesis Portfolio Peter Smith

Vulkan (including Vulkan Fast Paths)

Optimizing and Profiling Unity Games for Mobile Platforms. Angelo Theodorou Senior Software Engineer, MPG Gamelab 2014, 25 th -27 th June

Programmable GPUs. Real Time Graphics 11/13/2013. Nalu 2004 (NVIDIA Corporation) GeForce 6. Virtua Fighter 1995 (SEGA Corporation) NV1

Advanced Computer Graphics CS 563: Screen Space GI Techniques: Real Time

Blis: Better Language for Image Stuff Project Proposal Programming Languages and Translators, Spring 2017

Rasterization Overview

Getting fancy with texture mapping (Part 2) CS559 Spring Apr 2017

Hard Shadows Aliasing and Remedies

Applications of Explicit Early-Z Z Culling. Jason Mitchell ATI Research

VGP352 Week March-2008

Computer Graphics Shadow Algorithms

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

ASYNCHRONOUS SHADERS WHITE PAPER 0

FRUSTUM-TRACED RASTER SHADOWS: REVISITING IRREGULAR Z-BUFFERS

PowerVR Performance Recommendations The Golden Rules. October 2015

AGGREGATE G-BUFFER ANTI-ALIASING

Computer graphics 2: Graduate seminar in computational aesthetics

The Graphics Pipeline

Achieving Console Quality Games on Mobile

CS354R: Computer Game Technology

The Graphics Pipeline

Rendering Grass with Instancing in DirectX* 10

Lecture 25: Board Notes: Threads and GPUs

Me Again! Peter Chapman. if it s important / time-sensitive

Image Processing Tricks in OpenGL. Simon Green NVIDIA Corporation

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Overview. Technology Details. D/AVE NX Preliminary Product Brief

Ciril Bohak. - INTRODUCTION TO WEBGL

Animation Essentially a question of flipping between many still images, fast enough

Sign up for crits! Announcments

VGP352 Week 8. Agenda: Post-processing effects. Filter kernels Separable filters Depth of field HDR. 2-March-2010

Computer Graphics. Bing-Yu Chen National Taiwan University

Optimizing Mobile Games with Gameloft and ARM

Windowing System on a 3D Pipeline. February 2005

Gaël Guennebaud Loïc Barthe, Mathias Paulin IRIT UPS CNRS TOULOUSE FRANCE Gaël Guennebaud Cyprus June 2006

EECS 487: Interactive Computer Graphics

Optimized Rendering Techniques Based on Local Cubemaps

GeForce4. John Montrym Henry Moreton

Render all data necessary into textures Process textures to calculate final image

Non-Linearly Quantized Moment Shadow Maps

Introduction to OpenGL ES 3.0

OPENGL RENDERING PIPELINE

Chapter 10 Computation Culling with Explicit Early-Z and Dynamic Flow Control

3D Graphics in Future Mobile Devices. Steve Steele, ARM

Introduction to Shaders.

Evolution of GPUs Chris Seitz

The Bifrost GPU architecture and the ARM Mali-G71 GPU

Introducing Metal 2. Graphics and Games #WWDC17. Michal Valient, GPU Software Engineer Richard Schreyer, GPU Software Engineer

The Making of Seemore WebGL. Will Eastcott, CEO, PlayCanvas

OUTLINE. Tessellation in OpenGL Tessellation of Bezier Surfaces Tessellation for Terrain/Height Maps Level of Detail

Starting out with OpenGL ES 3.0. Jon Kirkham, Senior Software Engineer, ARM

Transcription:

Moving Mobile Graphics Advanced Real-time Shadowing Marius Bjørge ARM

Shadow algorithms Shadow filters Results Agenda

SHADOW ALGORITHMS

Shadow Algorithms Shadow mapping Depends on light type Directional, spot light, point light, area light, etc

Cascaded shadow maps Builds on regular shadow mapping Split visible depth range into N partitions Slice distribution Logarithmic? Uniform?

Cascaded shadow maps Requires rendering geometry N times Same geometry might be rendered multiple times into different shadow slices Interleaved updates? Geometry shader could help, but is not efficient (on mobile) Multiview extension!

Multiview extension GL_OVR_multiview Originally conceived in order to make VR rendering more efficient Bind multiple slices of a 2D texture array as framebuffer output Submit draw calls for all cascades once

Multiview extension #extension GL_OVR_multiview: require layout (num_views = 4) in; uniform mat4 uviewproj[4]; in vec3 apos; void main() { gl_position = vec4(apos, 1.0) * uviewproj[gl_viewid_ovr]; }

Sample distribution shadow maps Analyze the current view to determine best fit for shadow projection

Sample distribution shadow maps Compute hierarchical min-max depth buffer from scene depth buffer To avoid GPU stalls, use depth buffer from previous frame Re-project depth values and add some rubber band region

Sample distribution shadow maps Compute shader used to generate cascade split distances Min-max depth buffer used to further trim size of splits Read-back to CPU to allow further per split culling...or store to buffer and draw everything

Sample distribution shadow maps Balanced primitive count per cascade Better ratio between shadow map resolution and output resolution Can lower resolution to get similar result as higher resolution non-sdsm approach

SHADOW FILTERING

Percentage Closer Filtering Depth textures cannot be filtered the same way as color textures Compare depth around current pixel Returned value is average of the comparison results Modern GPUs have HW support for this

Shadow aliasing Shadow resolution doesn t map 1:1 with rendered image 2x2 PCF is not enough and going higher is expensive at run-time

Variance Shadow Maps Approximates a distribution of depth values Variance moments Filterable to some extent http://www.punkuser.net/vsm/

Variance Shadow Maps Multi-sampled render to texture Output variance moments in fragment shader Result is resolved to single sample Apply separable blur (optional) Apply shadow map using Chebychev s inequality

Variance Shadow Maps Requires two components rather than a single depth value Sensitive to floating point precision Use RG32_FLOAT Light bleeding issues Careful when filtering with too large kernels

Exponential Variance Shadow Maps Builds on variance shadow maps and exponential shadow maps* Fixes most of the light bleeding issues Apply exponential warp to shadow map depth Positive and negative bounds Best result with RGBA32_FLOAT textures

ASTC compressed shadow maps Idea: Compress VSM/EVSM to HDR ASTC textures Useful for static scenes with static lighting Can still have dynamic geometry Massive storage savings Requires tweaking with ASTC encoder to get good results

ASTC compressed shadow maps

RESULTS

Fixed distribution 512x512 w/4 splits

Sample distribution 512x512 w/4 splits

Fixed distribution 1024x1024 w/4 splits

Sample distribution 1024x1024 w/4 splits

Split comparison Fixed distribution Sample distribution

Fixed distribution 1024x1024 w/4 splits

Sample distribution 1024x1024 w/4 splits

Sample distribution 1024x1024 w/2 splits

Split comparison Fixed distribution Sample distribution

Filter comparisons 256x256 PCF 1024x1024 PCF

Filter comparisons 256x256 VSM 1024x1024 VSM

Filter comparisons 256x256 EVSM 1024x1024 EVSM

Test scene contains ~2.5 million primitives Tested on a Mali- T880 MP12 running at 720p resolution Performance

Primitives per slice

Performance w/2 splits Frametime in ms (lower is better)

Performance w/4 splits Frametime in ms (lower is better)

Performance multiview Frametime in ms (lower is better)

Performance multiview Frametime in ms (lower is better)

Conclusion Sample distribution shadow maps is practical on mobile Multiview is great for shadow rendering Future work ASTC encoding and quality trade-off Vulkan Broader performance analysis

Thank you! Marius.Bjorge@arm.com

References 1. Sample Distribution Shadow Maps Lauritzen, Salvi, Lefohn 2. Variance Shadow Maps Donnelly, Lauritzen 3. Exponential Shadow Maps Annen, Mertens, Seidel, Flerackers, Kautz 4. GL_OVR_multiview https://www.opengl.org/registry/specs/ovr/multiview.txt 5. Lighting Research at Bungie Chen, Tatarchuk