1 Questions about GPUs AS-Temps réel – Bordeaux Philippe Decaudin Fabrice Neyret Stéphane Guy Sylvain Lefebvre.

Slides:



Advertisements
Similar presentations
Accelerating Real-Time Shading with Reverse Reprojection Caching Diego Nehab 1 Pedro V. Sander 2 Jason Lawrence 3 Natalya Tatarchuk 4 John R. Isidoro 4.
Advertisements

Compositing and Blending Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Graphics Pipeline.
Status – Week 257 Victor Moya. Summary GPU interface. GPU interface. GPU state. GPU state. API/Driver State. API/Driver State. Driver/CPU Proxy. Driver/CPU.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
CS 4363/6353 BASIC RENDERING. THE GRAPHICS PIPELINE OVERVIEW Vertex Processing Coordinate transformations Compute color for each vertex Clipping and Primitive.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
WSCG 2007 Hardware Independent Clipmapping A. Seoane, J. Taibo, L. Hernández, R. López, A. Jaspe VideaLAB – University of A Coruña (Spain)
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Week 11 - Wednesday.  Image based effects  Skyboxes  Lightfields  Sprites  Billboards  Particle systems.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
Compositing and Blending Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Image Compositing Angel 8.11 Angel: Interactive Computer Graphics5E © Addison-Wesley
Computer Graphics Hardware Acceleration for Embedded Level Systems Brian Murray
Texture Mapping CPSC /24/03 Abhijeet Ghosh.
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
Status – Week 277 Victor Moya.
GPU Simulator Victor Moya. Summary Rendering pipeline for 3D graphics. Rendering pipeline for 3D graphics. Graphic Processors. Graphic Processors. GPU.
Texture Sprites: Texture Elements Splatted on Surfaces Sylvain Lefebvre Samuel Hornus Fabrice Neyret GRAVIR/IMAG-INRIA ACM SIGGRAPH 2005 Symposium on Interactive.
Z-Buffer Optimizations Patrick Cozzi Analytical Graphics, Inc.
The Story So Far The algorithms presented so far exploit: –Sparse sets of images (some data may not be available) –User help with correspondences (time.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
09/18/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Bump Mapping Multi-pass algorithms.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
© Copyright Khronos Group, Page 1 Harnessing the Horsepower of OpenGL ES Hardware Acceleration Rob Simpson, Bitboys Oy.
CS 638, Fall 2001 Today Light Mapping (Continued) Bump Mapping with Multi-Texturing Multi-Pass Rendering.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
11/11/04© University of Wisconsin, CS559 Fall 2004 Last Time Shading Interpolation Texture mapping –Barycentric coordinates for triangles.
Rendering Forest Scenes in Real-Time EGSR 2004 Philippe Decaudin Fabrice Neyret GRAVIR/IMAG-INRIA, Grenoble, France.
Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures Vision, Modeling, Visualization Erlangen, Germany November 16-18,
An Interactive Introduction to OpenGL Programming Ed Angel
Interactive Time-Dependent Tone Mapping Using Programmable Graphics Hardware Nolan GoodnightGreg HumphreysCliff WoolleyRui Wang University of Virginia.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
Cg Programming Mapping Computational Concepts to GPUs.
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
03/24/03© 2003 University of Wisconsin Last Time Image Based Rendering from Sparse Data.
Pattern Based Procedural Textures Sylvain Lefebvre Fabrice Neyret iMAGIS - GRAVIR / IMAG - INRIA
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
1 Real-time visualization of large detailed volumes on GPU Cyril Crassin, Fabrice Neyret, Sylvain Lefebvre INRIA Rhône-Alpes / Grenoble Universities Interactive.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
Computer Graphics 2 Lecture 7: Texture Mapping Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Review of OpenGL Basics
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
Texture Mapping CAP4730: Computational Structures in Computer Graphics.
Computing & Information Sciences Kansas State University Lecture 12 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
Compositing and Blending Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Computer Graphics I, Fall 2008 Compositing and Blending.
Lecture Rendering pipeline, shaders and effects 1Elias Holmlid.
Discrete Techniques.
Week 7 - Monday CS361.
Programmable Pipelines
Graphics Processing Unit
Deferred Lighting.
The Graphics Rendering Pipeline
Graphics Processing Unit
UMBC Graphics for Games
RADEON™ 9700 Architecture and 3D Performance
Frame Buffer Applications
Presentation transcript:

1 Questions about GPUs AS-Temps réel – Bordeaux Philippe Decaudin Fabrice Neyret Stéphane Guy Sylvain Lefebvre

2 Overview 1.Suspicious behaviors of GPUs. 2.What could be improved quickly. 3.Our wishes.

3 1. Suspicious behaviors 3D Textures, MIP-mapping and anisotropy Clamp to border and MIP-mapping Deferred shading for conditions

4 3D textures and MIP-mapping Filtering of 3D textures is isotropic (same MIP-map level for u, v and w)  When texturing a slice of volume with a 3D texture, the slope of the slice controls the blur sloppy => blurry  With 2D textures, this problem is solved by anisotropic filtering, but: - it is not available for 3D textures… - no dsdw

5 Clamp_to_border and MIP-mapping Using non-square textures (2 a  2 b, a  b) CLAMP_TO_BORDER_ARB enabled MIP-map enabled  at MIP-map levels > log 2 (a) (with a < b), the texture becomes 1D: clamp doesn’t seem to work correctly…

6 Clamp_to_border and MIP-mapping a quad mapped with a white texture 256  64 (u,v) = (0,0) to (6,6) mapping clamped to [0,1]  [0,1] border color is black MIP-map level forced with GL_TECTURE_MIN_LOD Square texture (64  64)  correct (0,0) (6,6) Clamp problem  bug? Texture 256  64 MIP-map level = 1 (256  64) MIP-map level = 8 (1  1)

7 Clamp_to_border and MIP-mapping  all MIP-map levels 128x32 64x16 32x8 16x4 8x2 4x1 2x1 1x1

8 Deferred shading for conditions fast, but a few pixels are wrong 1 Theory: Custom shader: costly particular case for some pixels general case fast.

9 fast, but a few pixels are wrong flag wrong pixels in stencil 12 Deferred shading for conditions Theory:

10 fast, but a few pixels are wrong use slow correction shader only where needed 12 3 flag wrong pixels in stencil Deferred shading for conditions Theory:

11 fast, but a few pixels are wrong use slow correction shader only where needed 12 3 Practice: Does not work !? cost the same as full rendering stencil after fragment program ? flag wrong pixels in stencil Deferred shading for conditions

12 2. What could be improved quickly Front to back rendering with alpha Fog and pre-multiplied alpha Scale / Bias not limited to [0,1] Tiled textures storage

13 Front to back rendering with alpha Theory: front to back (to benefit Z-test culling) Practice with alpha: must disable depth_test !  landscapes, billboards, volumes… even more costly Suggested solution: glEnable(ALPHA_DEPTH_TEST) doing regular blending, then if (Ascreen>Athreshold) Zscreen:=Zfrag

14 Fog and pre-multiplied alpha Premultiplied alpha textures (aR,aG,aB,a) to avoid interpolation artefacts. Blend mode is then set to glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_ALPHA)

15 Fog and pre-multiplied alpha Problem: not compatible with standard Fog equation ( glEnable(GL_FOG) ) Fog equation: C frag ’= (1-f) C frag + f C fog In our case, C frag = aC (premultiplied alpha) Blend equation: C dest ’=C frag ’+ (1-a)C dest  C dest ’= (1-f) aC + f C fog + (1-a)C dest missing ‘a’ Suggestion: if SRC_ALPHA == GL_ONE then fog equation: (1-f) C + f a C fog

16 Scale / Bias not limited to [0,1] Theory: scale, bias to tune transparency, light, color… Practice: coef must lies in [0,1] !  applications which need coef > 1 must multipass (volume rendering, light maps…) Suggested Solution: Float operation in texture units for scaling.

17 Tiled textures storage Principle: –Use a set of tiles to create a larger texture fragment program

18 Tiled textures storage Numerous new advanced usage of tiles –Antialiased Parameterized Solid Texturing [Hart et al] ACM Transactions on Graphics 2002 –Adaptive Texture Maps [Kraus and Ertl] Graphics Hardware 2002 –Pattern Based Procedural Textures [Lefebvre and Neyret] I3D 2003 –… and more !

19 Tiled textures storage Storage requirements –Efficient selection from FP –No waste of memory –Ease filtering / interpolation of tiles per-tile border color per-tile MIP-mapping

20 Tiled textures storage Current solutions –Store as separate textures limited bindings no real selection in FP –Store in an atlas false neighborhood and no border color waste space if filtering on tiles limited to 4096x4096 –Store as a stack in a 3D Texture waste a lot of space (2 n ) ill-defined filtering

21 Tiled textures storage Our proposal: Texture stack 3D Texture with no filtering on R per-tile border colors per-tile filtering easy selection from fragment program s t r level x32x4 level x16x4 level x4x4

22 3. Our wishes Having features more coherent –programable blending –feedback buffer –read access to all state variables (ex: MIP-mapping) –r/w stencil from FP Native support of tiled textures Fragment culling order (stencil, A, depth) Tools for procedural textures

23 Having features more coherent Programable blending: –multi-pass algorithms with intermediate results –needs complex blending –current blending very limited compared to programable pipeline

24 Having features more coherent Feedback buffer: –lot of vertex attributes –few can be read back

25 Perspective correction rasterization in object space not always desired  need control on variables interpolated by rasterizer glEnable/Disable(param,GL_PERSPECTIVE_CORRECTION) Having features more coherent

26 Native support of tiled textures Difficulties –Storage (borders, repeat, …) –MIP-mapping –Linear interpolation

27 Fragment culling order Early culling essential for performance Would let the user specify test order between –alpha test –stencil –depth –discard (from FP)

28 Tools for procedural textures New texture types (envmap, indir., N, shaders, …)  custom filtering MIP-mapping levels –have to be infered from ddx ddy –while computed for standard textures  needs to be accessible (read) resolution specifiable by user

29 Questions about GPUs AS-Temps réel – Bordeaux Philippe Decaudin Fabrice Neyret Stéphane Guy Sylvain Lefebvre