Sh Reference Manual

Taken from Metaprogramming GPUs with Sh available from AK Peters, Inc.
 
Michael McCool
[email protected]
 
Stefanus Du Toit
[email protected]
 
http://libsh.sourceforge.net/
 
Computer Graphics Laboratory
School of Computer Science
University of Waterloo
Waterloo, Ontario, Canada

DRAFT
28th May 2004

Contents

1 Reference Overview
 1.1 Setup
 1.2 Sample OpenGL GLUT Application
 1.3 The shrike Testbed
 1.4 API Documentation
2 Types
 2.1 Programs
 2.2 Tuples
  2.2.1 Semantic Types
  2.2.2 Storage Types
  2.2.3 Binding Types
  2.2.4 Template Declaration
 2.3 Matrices
 2.4 Arrays, Tables, and Textures
 2.5 Contexts
 2.6 Exceptions and Error Handling
 2.7 Metadata
  2.7.1 Object Names
3 Standard Operators and Functions
 3.1 Swizzling and Write Masking
 3.2 Arithmetic
 3.3 Derivatives
 3.4 Noise
 3.5 Trigonometric and Exponential Functions
 3.6 Interpolation and Approximation
 3.7 Geometry
 3.8 Linear Algebra
 3.9 Logical and Comparison Functions
 3.10 Discontinuities
 3.11 Miscellaneous Functions
4 Arrays, Tables and Textures
 4.1 Texture Formats
 4.2 Trait Modifiers
 4.3 Texture Memory and Storage
 4.4 Texture and Array Access
5 Programs and Streams
 5.1 Defining Programs
  5.1.1 Compiling Programs
 5.2 Binding Programs and Data
  5.2.1 Binding Programs
  5.2.2 Binding and Updating Data
  5.2.3 Unbinding
  5.2.4 Querying Binding State
 5.3 Introspection
 5.4 Algebra
  5.4.1 Connection
  5.4.2 Combination
 5.5 Nibbles
  5.5.1 Interface Adaptation and Specialization
  5.5.2 Passthrough
  5.5.3 Texture Access
  5.5.4 Type and Size Conversion
  5.5.5 Transformations
  5.5.6 Basis Conversion
  5.5.7 Primitive Computations
 5.6 Manipulators
  5.6.1 Fixed Manipulators
  5.6.2 Expandable Manipulators
 5.7 Kernels
  5.7.1 Universal Vertex Shader Kernel
  5.7.2 Surface Shader Kernels
  5.7.3 Light Shader Kernels
  5.7.4 Surface Map Kernels
  5.7.5 Postprocessing Kernels
 5.8 Streams
6 Control Constructs
 6.1 Selection
  6.1.1 IF
  6.1.2 WHEN
 6.2 Iteration
  6.2.1 FOR
  6.2.2 WHILE
  6.2.3 DO/UNTIL
  6.2.4 BREAK/CONTINUE
7 Backends
 7.1 OpenGL Backends
  7.1.1 Input and Output Binding
  7.1.2 Texture Bindings
  7.1.3 Parameter Bindings
 7.2 CPU Backends
 7.3 The Sm Backend


Note: This manual is available as a bound book from AK Peters, including better formatting, in-depth examples, and about 200 pages not available on-line.