1 / 11

A Real-Time Procedural Shading System for Programmable Graphics Hardware

This paper discusses the challenges of programming graphics hardware and proposes a shading system that makes programming easier and more efficient. It covers the use of shading languages, compiling the shading language, and optimizing the system for better performance. The goal is to achieve lifelike real-time graphics.

ahill
Download Presentation

A Real-Time Procedural Shading System for Programmable Graphics Hardware

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Real-Time Procedural Shading System for Programmable Graphics Hardware Kekoa ProudfootWilliam R. Mark Svetoslav Tzvetkov Pat Hanrahan

  2. Introduction • Graphics processors are becoming programmable • Programmability makes it possible to make real-time graphics more lifelike • But somebody has to do the programming

  3. Programmable graphics hardware • Problem: programming graphics hardware is difficult • Low-level interfaces • Different manufacturers produce hardware with different interfaces and functionality • Sounds familiar: microprocessors • Assembly language interface • Intel processor very different from Alpha

  4. Programmable graphics hardware • Programming in assembly is difficult • Have to worry about register allocation, instruction scheduling, etc. • With normal processors, we program in higher-level languages, and compile down to assembly • Can we apply this idea to programmable graphics hardware?

  5. Shading languages • High level description: programmer describes how objects should be drawn, instead of how to draw them • Kind of like C: you still need to know what you’re doing, but you don’t need to worry about low-level details • Makes programming easier, and makes programs portable

  6. Compiling the shading language shading language • Traditional compiler structure • Programmable pipeline program is an intermediate language compiler front end programmable pipeline program retargetable compiler back end hardware-specific code

  7. Front end analysis - computation frequencies • Primitives (cubes, etc) get converted to vertices (triangles) • Vertices get converted to fragments (pixels) • Computation can occur at any of these stages • Use type inference to perform computation as early as possible constant primitive group vertex fragment

  8. Compiler back end • Modular structure • To support new hardware, make a new module • One module per computation frequency • Modules can be interchanged • Arbitrarily complex computations can be done • Render in multiple passes if necessary • Use the CPU if all else fails

  9. Back end optimizations • Group parallel scalar operations into vector operations • Copy propagation • Collapse MUL and ADD to MAD (multiply-and-add) • Use negate-on-read when possible

  10. Conclusion • Shaders provide an abstraction barrier between the programmer and the hardware • But, the programmer no longer has direct control over the performance of the program

  11. Discussion • The goal is to produce lifelike real-time graphics. Can we afford an extra layer of abstraction?

More Related