Shadow Volumes and Deferred Rendering
Total Page:16
File Type:pdf, Size:1020Kb
Load more
Recommended publications
-
Programming Graphics Hardware Overview of the Tutorial: Afternoon
Tutorial 5 ProgrammingProgramming GraphicsGraphics HardwareHardware Randy Fernando, Mark Harris, Matthias Wloka, Cyril Zeller Overview of the Tutorial: Morning 8:30 Introduction to the Hardware Graphics Pipeline Cyril Zeller 9:30 Controlling the GPU from the CPU: the 3D API Cyril Zeller 10:15 Break 10:45 Programming the GPU: High-level Shading Languages Randy Fernando 12:00 Lunch Tutorial 5: Programming Graphics Hardware Overview of the Tutorial: Afternoon 12:00 Lunch 14:00 Optimizing the Graphics Pipeline Matthias Wloka 14:45 Advanced Rendering Techniques Matthias Wloka 15:45 Break 16:15 General-Purpose Computation Using Graphics Hardware Mark Harris 17:30 End Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware IntroductionIntroduction toto thethe HardwareHardware GraphicsGraphics PipelinePipeline Cyril Zeller Overview Concepts: Real-time rendering Hardware graphics pipeline Evolution of the PC hardware graphics pipeline: 1995-1998: Texture mapping and z-buffer 1998: Multitexturing 1999-2000: Transform and lighting 2001: Programmable vertex shader 2002-2003: Programmable pixel shader 2004: Shader model 3.0 and 64-bit color support PC graphics software architecture Performance numbers Tutorial 5: Programming Graphics Hardware Real-Time Rendering Graphics hardware enables real-time rendering Real-time means display rate at more than 10 images per second 3D Scene = Image = Collection of Array of pixels 3D primitives (triangles, lines, points) Tutorial 5: Programming Graphics Hardware Hardware Graphics Pipeline -
Improving Shadows and Reflections Via the Stencil Buffer
Improving Shadows and Reflections via the Stencil Buffer Mark J. Kilgard * NVIDIA Corporation “Slap textures on polygons, throw them at the screen, and let the depth buffer sort it out.” For too many game developers, the above statement sums up their approach to 3D hardware- acceleration. A game programmer might turn on some fog and maybe throw in some transparency, but that’s often the limit. The question is whether that is enough anymore for a game to stand out visually from the crowd. Now everybody’s using 3D hardware-acceleration, and everybody’s slinging textured polygons around, and, frankly, as a result, most 3D games look more or less the same. Sure there are differences in game play, network interaction, artwork, sound track, etc., etc., but we all know that the “big differentiator” for computer gaming, today and tomorrow, is the look. The problem is that with everyone resorting to hardware rendering, most games look fairly consistent, too consistent. You know exactly the textured polygon look that I’m talking about. Instead of settling for 3D hardware doing nothing more than slinging textured polygons, I argue that cutting-edge game developers must embrace new hardware functionality to achieve visual effects beyond what everybody gets today from your basic textured and depth-buffered polygons. Two effects that can definitely set games apart from the crowd are better quality shadows and reflections. While some games today incorporate shadows and reflections to a limited extent, the common techniques are fairly crude. Reflections in today’s games are mostly limited to “infinite extent” ground planes or ground planes bounded by walls. -
Directx 11 Extended to the Implementation of Compute Shader
DirectX 1 DirectX About the Tutorial Microsoft DirectX is considered as a collection of application programming interfaces (APIs) for managing tasks related to multimedia, especially with respect to game programming and video which are designed on Microsoft platforms. Direct3D which is a renowned product of DirectX is also used by other software applications for visualization and graphics tasks such as CAD/CAM engineering. Audience This tutorial has been prepared for developers and programmers in multimedia industry who are interested to pursue their career in DirectX. Prerequisites Before proceeding with this tutorial, it is expected that reader should have knowledge of multimedia, graphics and game programming basics. This includes mathematical foundations as well. Copyright & Disclaimer Copyright 2019 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at [email protected] -
Opengl FAQ and Troubleshooting Guide
OpenGL FAQ and Troubleshooting Guide Table of Contents OpenGL FAQ and Troubleshooting Guide v1.2001.01.17..............................................................................1 1 About the FAQ...............................................................................................................................................13 2 Getting Started ............................................................................................................................................17 3 GLUT..............................................................................................................................................................32 4 GLU.................................................................................................................................................................35 5 Microsoft Windows Specifics........................................................................................................................38 6 Windows, Buffers, and Rendering Contexts...............................................................................................45 7 Interacting with the Window System, Operating System, and Input Devices........................................46 8 Using Viewing and Camera Transforms, and gluLookAt().......................................................................48 9 Transformations.............................................................................................................................................52 10 Clipping, Culling, -
High Performance Visualization Through Graphics Hardware and Integration Issues in an Electric Power Grid Computer-Aided-Design Application
UNIVERSITY OF A CORUÑA FACULTY OF INFORMATICS Department of Computer Science Ph.D. Thesis High performance visualization through graphics hardware and integration issues in an electric power grid Computer-Aided-Design application Author: Javier Novo Rodríguez Advisors: Elena Hernández Pereira Mariano Cabrero Canosa A Coruña, June, 2015 August 27, 2015 UNIVERSITY OF A CORUÑA FACULTY OF INFORMATICS Campus de Elviña s/n 15071 - A Coruña (Spain) Copyright notice: No part of this publication may be reproduced, stored in a re- trieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording and/or other- wise without the prior permission of the authors. Acknowledgements I would like to thank Gas Natural Fenosa, particularly Ignacio Manotas, for their long term commitment to the University of A Coru˜na. This research is a result of their funding during almost five years through which they carefully balanced business-driven objectives with the freedom to pursue more academic goals. I would also like to express my most profound gratitude to my thesis advisors, Elena Hern´andez and Mariano Cabrero. Elena has also done an incredible job being the lead coordinator of this collaboration between Gas Natural Fenosa and the University of A Coru˜na. I regard them as friends, just like my other colleagues at LIDIA, with whom I have spent so many great moments. Thank you all for that. Last but not least, I must also thank my family – to whom I owe everything – and friends. I have been unbelievably lucky to meet so many awesome people in my life; every single one of them is part of who I am and contributes to whatever I may achieve. -
Appendix a Fundamentals of the Graphics Pipeline Architecture
Appendix A Fundamentals of the Graphics Pipeline Architecture A pipeline is a series of data processing units arranged in a chain like manner with the output of the one unit read as the input of the next. Figure A.1 shows the basic layout of a pipeline. Figure A.1 Logical representation of a pipeline. The throughput (data transferred over a period of time) many any data processing operations, graphical or otherwise, can be increased through the use of a pipeline. However, as the physical length of the pipeline increases, so does the overall latency (waiting time) of the system. That being said, pipelines are ideal for performing identical operations on multiple sets of data as is often the case with computer graphics. The graphics pipeline, also sometimes referred to as the rendering pipeline, implements the processing stages of the rendering process (Kajiya, 1986). These stages include vertex processing, clipping, rasterization and fragment processing. The purpose of the graphics pipeline is to process a scene consisting of objects, light sources and a camera, converting it to a two-dimensional image (pixel elements) via these four rendering stages. The output of the graphics pipeline is the final image displayed on the monitor or screen. The four rendering stages are illustrated in Figure A.2 and discussed in detail below. Figure A.2 A general graphics pipeline. 202 Summarised we can describe the graphics pipeline as an overall process responsible for transforming some object representation from local coordinate space, to world space, view space, screen space and finally display space. These various coordinate spaces are fully discussed in various introductory graphics programming texts and, for the purpose of this discussion, it is sufficient to consider the local coordinate space as the definition used to describe the objects of a scene as specified in our program’s source code. -
NV RIVA TNT PO Sanford 5/1/98 11:49 AM Page 1
NV RIVA TNT PO sanford 5/1/98 11:49 AM Page 1 RIVA TNT Product Overview PRODUCT DESCRIPTION The RIVA TNT™ is the first integrated, 128-bit 3D processor that processes 2 pixels per-clock-cycle which enables single-pass multi-texturing and delivers a mind-blowing 250 million pixels-per-second fill rate. RIVA TNT’s (twin-texel) 32-bit color pipeline, 24-bit Z, 8-bit stencil buffer and per-pixel precision delivers unsur- passed quality and performance allowing developers to write standards-based applications with stunning visual effects and realism. The RIVA TNT offers industry-leading 2D and 3D performance, meeting all the requirements of the main- stream PC graphics market and Microsoft’s PC’98 and DirectX 6.0 initiatives.The RIVA TNT delivers the indus- try’s fastest Direct3D™ acceleration solution and also delivers leadership VGA, 2D and video performance enabling a range of applications from 3D games to DVD and video conferencing. A complete high performance OpenGL ICD is included in the standard software driver package. ARCHITECTURE HIGHLIGHTS RIVA TNT BLOCK DIAGRAM ■ 128-bit wide graphics engine and frame buffer ■ Massive 3.2GB/sec frame buffer bandwidth PCI/AGP architecture supporting up to 200MHz memory Demand-Driven Prefetcher Scatter-Gather Virtual DMA ■ 250 million pixels/sec peak fill rate Vertex Cache ■ 8 million triangles/sec peak Advanced Floating Point Setup Advanced Floating Point Setup ■ Large 12K on-chip cache & Pixel Processor & Pixel Processor Lighting Lighting ■ Texture Cache 10GFLOPS floating-point geometry processor -
RIVA TNT™ 128-Bit Twin Texel 3D Processor
NVD-002 TNT.m5 3/11/99 3:26 PM Page 1 RIVA TNT™ 128-bit TwiN Texel 3D Processor PRODUCT DESCRIPTION The RIVA TNT™ is the first integrated, 128-bit 3D processor that processes 2 pixels per-clock-cycle which enables single-pass multi-texturing and delivers a mind-blowing 180 million pixels-per-second fill rate. RIVA TNT’s (TwiN Texel) 32-bit color pipeline, 24-bit Z, 8-bit stencil buffer and per-pixel precision delivers unsurpassed quality and performance allowing developers to write standards- based applications with stunning visual effects and realism. The RIVA TNT offers industry-leading 3D and 2D performance, meeting all the requirements of the mainstream PC graphics market and Microsoft’s PC’98 and DirectX 6.0 initiatives. The RIVA TNT delivers the industry’s fastest Direct3D™ acceleration solution and leadership VGA, 2D and video performance enabling a range of applications from 3D games to DVD and video conferencing. A complete high performance OpenGL ICD is included in the standard software driver package. PRODUCT OVERVIEW CompellingVisual • World’s fastest 3D and • 16MB frame buffer 2D processor Quality • 32-bit color, •AGP2X Bus • 128-bit TwiN Texel • 24-bit Z-buffer, 8-bit • Complete DirectX 6.0 and architecture stencil OpenGL support • Single-pass multi- • Maximum 3D/2D • WHQL ceritified Windows 2000, texturing resolution of Windows NT 4.0, Windows NT 3.5, • Optimized Direct 1920 x 1200 @ 75Hz Windows 98, and Windows 95 3D acceleration display drivers NVD-002 TNT.m5 3/11/99 3:26 PM Page 2 RIVA TNT™ Tuner 16MB 128-bit TwiN Texel -
Evolution of Gpus.Pdf
Evolution of GPUs Chris Seitz PDF created with pdfFactory Pro trial version www.pdffactory.com Overview Concepts: Real-time rendering Hardware graphics pipeline Evolution of the PC hardware graphics pipeline: 1995-1998: Texture mapping and z-buffer 1998: Multitexturing 1999-2000: Transform and lighting 2001: Programmable vertex shader 2002-2003: Programmable pixel shader 2004: Shader model 3.0 and 64-bit color support ©2004 NVIDIA Corporation. All rights reserved. PDF created with pdfFactory Pro trial version www.pdffactory.com Real-Time Rendering Graphics hardware enables real-time rendering Real-time means display rate at more than 10 images per second 3D Scene = Image = Collection of Array of pixels 3D primitives (triangles, lines, points) ©2004 NVIDIA Corporation. All rights reserved. PDF created with pdfFactory Pro trial version www.pdffactory.com PC Architecture Motherboard CPU System Memory Bus Port (PCI, AGP, PCIe) Graphics Board Video Memory GPU ©2004 NVIDIA Corporation. All rights reserved. PDF created with pdfFactory Pro trial version www.pdffactory.com Hardware Graphics Pipeline Application 3D Geometry 2D Rasterization Pixels Stage Triangles Stage Triangles Stage For each For each triangle vertex: triangle: Transform Rasterize position: triangle 3D -> screen Interpolate Compute vertex attributes attributes Shade pixels Resolve visibility ©2004 NVIDIA Corporation. All rights reserved. PDF created with pdfFactory Pro trial version www.pdffactory.com Real-time Graphics 1997: RIVA 128 –3M Transistors ©2004 NVIDIA Corporation. All rights reserved. PDF created with pdfFactory Pro trial version www.pdffactory.com Real-time Graphics 2004: ©2004 NVIDIA Corporation. All rights reserved. UnRealEngine 3.0 Images Courtesy of Epic Games PDF created with pdfFactory Pro trial version www.pdffactory.com ‘95-‘98: Texture Mapping & Z-Buffer CPU GPU Application / Rasterization Stage Geometry Stage Raster Texture Rasterizer Operations Unit Unit 2D Triangles Bus (PCI) Frame 2D Triangles Textures Buffer Textures System Memory Video Memory ©2004 NVIDIA Corporation. -
Shaders for Game Programming and Artists.Pdf
TEAM LinG - Live, Informative, Non-cost and Genuine ! TEAM LinG - Live, Informative, Non-cost and Genuine ! This page intentionally left blank TEAM LinG - Live, Informative, Non-cost and Genuine ! TEAM LinG - Live, Informative, Non-cost and Genuine ! © 2004 by Thomson Course Technology PTR. All rights reserved. No part of this SVP, Thomson Course book may be reproduced or transmitted in any form or by any means, electronic Technology PTR: or mechanical, including photocopying, recording, or by any information stor- Andy Shafran age or retrieval system without written permission from Thomson Course Tech- Publisher: nology PTR, except for the inclusion of brief quotations in a review. Stacy L. Hiquet The Premier Press and Thomson Course Technology PTR logo and related Senior Marketing Manager: trade dress are trademarks of Thomson Course Technology PTR and may not Sarah O’Donnell be used without written permission. Marketing Manager: NVIDIA® is a registered trademark of NVIDIA Corporation. Heather Hurley RenderMonkey™ is a trademark of ATI Technologies, Inc. Manager of Editorial Services: DirectX® is a registered trademark of Microsoft Corporation. Heather Talbot All other trademarks are the property of their respective owners. Acquisitions Editor: Mitzi Foster Important: Thomson Course Technology PTR cannot provide software sup- port. Please contact the appropriate software manufacturer’s technical support Senior Editor: line or Web site for assistance. Mark Garvey Thomson Course Technology PTR and the author have attempted throughout Associate Marketing Managers: this book to distinguish proprietary trademarks from descriptive terms by fol- Kristin Eisenzopf and lowing the capitalization style used by the manufacturer. Sarah Dubois Information contained in this book has been obtained by Thomson Course Project Editor: Technology PTR from sources believed to be reliable. -
游戏设计与开发 —Hardware —Apis —Shaders
SE341 1896 1935 1987 2006 Outline Real Time Requirement A Conceptual Rendering Pipeline Evolution of GPU 游戏设计与开发 —Hardware —APIs —Shaders GPU实时图形管线 GPU: Real-time Graphics Pipelines 上海交通大学软件学院 上海交通大学软件学院数字艺术实验室 Digital数字艺术实验室 ART LAB Digital ART Lab, SJTU Digital ART LAB Building A Game • Background Scene (e.g. sky, terrain) • Static Objects • Movement of Objects • Users’ Control • Collision and Response • Others REAL TIME REQUIREMENT Digital ART Lab, SJTU Digital ART Lab, SJTU Digital ART Lab, SJTU 1 SE341 3D Game Loop How Fast Does my Game Loop Need to Run? The “Game Loop” (Main Event Loop) : • ANSWER: “It depends…” • Visual displays: 25-30 Hz or higher,90~120Hz for Init Player Input VR display • Head-tracking for HMDs: 60 Hz, but even only 2- 5ms of latency yields display lag, which often quickly causes users to lose their lunch… Update Game End Game • Haptic displays: much higher update rates (500 - Status 1000 Hz) • Multitasking / Multiprocessing: allows for different update rates for different types of output displays Update Display • Main requirement: Real Time 3D Graphics Digital ART Lab, SJTU Digital ART Lab, SJTU E.g. Game Graphics Setting Game Programming Techniques Digital ART Lab, SJTU Digital ART Lab, SJTU Digital ART Lab, SJTU 2 SE341 VR in VR (IEEE VR 2020, Mar.23-26) ACM A.M. Turing Award (2019) PIONEERS OF MODERN COMPUTER GRAPHICS: 3D CGIs Patrick M. Hanrahan Edwin E. Catmull • Volume rendering; light field rendering Curved patches displaying • RenderMan Shading Language: Shader, GLSL Z-Buffering • Brook (a language for -
Creating Reflections and Shadows Using Stencil Buffers
Creating Reflections and Shadows Using Stencil Buffers Mark J. Kilgard NVIDIA Corporation Stencil Testing • Now broadly supports by both major APIs – OpenGL – DirectX 6 • RIVA TNT and other consumer cards now supporting full 8-bit stencil • Opportunity to achieve new cool effects and improve scene quality 2 What is Stenciling? • Per-pixel test, similar to depth buffering. • Tests against value from stencil buffer; rejects fragment if stencil test fails. • Distinct stencil operations performed when – Stencil test fails – Depth test fails – Depth test passes • Provides fine grain control of pixel update 3 Per-Fragment Pipeline Fragment Pixel + Ownership Scissor Alpha Test Test Test Associated Data Depth Stencil Test Test Blending Dithering Logic Frame Op buffer 4 OpenGL API • glEnable/glDisable(GL_STENCIL_TEST); • glStencilFunc(function, reference, mask); • glStencilOp(stencil_fail, depth_fail, depth_pass); • glStencilMask(mask); • glClear(… | GL_STENCIL_BUFFER_BIT); 5 Request a Stencil Buffer • If using stencil, request sufficient bits of stencil • Implementations may support from zero to 32 bits of stencil • 8, 4, or 1 bit are common possibilities • Easy for GLUT programs: glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL); glutCreateWindow(“stencil example”); 6 Stencil Test • Compares reference value to pixel’s stencil buffer value • Same comparison functions as depth test: – NEVER, ALWAYS – LESS, LEQUAL – GREATER, GEQUAL – EQUAL, NOTEQUAL • Bit mask controls comparison ((ref & mask) op (svalue & mask)) 7 Stencil