A RealTime Procedural Shading System for Programmable Graphics Hardware - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

A RealTime Procedural Shading System for Programmable Graphics Hardware

Description:

Programmability makes it possible to make real-time graphics more lifelike ... To support new hardware, make a new module. One module per computation frequency ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 12
Provided by: academ114
Learn more at: https://cseweb.ucsd.edu
Category:

less

Transcript and Presenter's Notes

Title: A RealTime Procedural Shading System for Programmable Graphics Hardware


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
    youre doing, but you dont 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?
Write a Comment
User Comments (0)
About PowerShow.com