Shader Programming CgFX, OpenGL 2.0. Michael Haller 2003

Size: px
Start display at page:

Download "Shader Programming CgFX, OpenGL 2.0. Michael Haller 2003"

Transcription

1 Shader Programming CgFX, OpenGL 2.0 Michael Haller 2003

2 Outline What is CgFX? CgFX runtime Production pipeline with CgFX CgFX Tools set OpenGL 2.0

3 What is CgFX? CgFX (C for Graphics Effekt File) Supports Microsoft.fx files Cg plus: Multi-pass Hardware fallbacks (techniques) Complete Hardware states Tweakables MS.fx (HLSL) plus: DirectX8 and OpenGL MAC and Linux

4 CgFX overview

5 Typical Production Pipeline Programmers write assembly for different hardware DCC tool (Maya, Max, SoftImage, ) Digital Content Creation Scene exporter plug-in Artists create models, textures, maps, in DCC tool of choice DCC Image ASM Shaders (HW1) ASM Shaders (HW2) Scene manager Models, Textures, Maps, Application (game, renderer, ) Not the same! Game Image App Scene Manager hard-coded to choose at run-time the appropriate ASM shaders + state for the hardware

6 CgFX Production Pipeline Programmers and/or artists write FX effects DCC tool (Maya, Max, SoftImage, ) FX material plug-in Scene exporter plug-in Artists assign FX files to scene objects and tweak parameters for each object in real-time FX files Models, Textures, Maps, FX effects + parameters Same Image Scene manager FX runtime Application (game, renderer, ) For any FX, App Scene Manager chooses at run-time the appropriate technique for the hardware

7 CgFX Example File - Structure Global declarations Tweakable declarations Vertex shaders Fragment shaders Techniques to encapsulate shaders

8 Techniques effect myeffectname { technique PixelShaderVersion { }; technique FixedFunctionVersion { }; technique LowDetailVersion { }; };

9 Passes Each technique contains one or more passes Each pass may contain a vertex program, a fragment program, or both. E.g. Pass 0: Fixed-function pixel processing to output the ambient color. Pass 1: ps_1_1 fragment program Pass 2: ps_2_0 fragment program Typically, all passes of a technique use Cg or assembly programs.

10 Render States pass firstpass { DepthWriteEnable = true; AlphaBlendEnable = false; MinFilter[ 0 ] = Linear; MagFilter[ 0 ] = Linear; MipFilter[ 0 ] = Linear; // Pixel shader written in assembly PixelShader = asm { ps.1.1 tex t0; mov r0, t0; }; };

11 Variables and Semantics Global and per-technique Cg-style variables (passed as uniform parameters): bool AlphaBlending = false; float bumpheight = 0.5f; These variables can contain a user-defined semantic, which helps applications provide the correct data to the shader: float4x4 myviewmatrix : ViewMatrix; texture2d sometexture : DiffuseMap;

12 Annotations Additionally, each variable can have an optional annotation. An annotation describes a user interface element for manipulating uniform variables: float bumpheight < string gui = slider ; float uimin = 0.0f; float uimax = 1.0f; float uistep = 0.1f; > = 0.5f;

13 My first fx example (Blinn) struct appdata { float4 vposition : POSITION; float4 vnormal : NORMAL; float4 vtexcoords : TEXCOORD0; }; struct vpconn { float4 vtexcoord0 : TEXCOORD0; float4 vdiffuse : COLOR0; float4 vposition : POSITION; float4 vspecular : COLOR1; };

14 My first fx example (Blinn) II // un-tweakables float4x4 worldview : WorldView; float4x4 worldviewit: WorldViewIT; float4x4 worldviewprojection : WorldViewProjection; [...] // tweakables float4 diffuse : DIFFUSE = { 0.1f, 0.1f, 0.5f, 1.0f }; [...] float4 lightpos : Position < string Object = "PointLight"; string Space = "World"; > = {100.0f, 100.0f, 100.0f, 0.0f};

15 My first fx example (Blinn) III vpconn vs_blinnshading(appdata IN, uniform float4x4 ModelViewProj, uniform float4x4 ModelView, uniform float4x4 ModelViewIT, uniform float4x4 ViewIT, uniform float4x4 View, uniform float4 lightpos, uniform float4 diffuse, uniform float4 specular, uniform float4 ambient) { vpconn OUT; [ ] } OUT.vDiffuse = diff_term; OUT.vPosition = mul(modelviewproj,in.vposition); return OUT;

16 My first fx example (Blinn) IV technique Blinn { pass p0 { Zenable = true; ZWriteEnable = true; CullMode = None; VertexShader = compile vs_1_1 vs_blinnshading( worldviewprojection, worldview, worldviewit, viewit, view, lightpos, diffuse, specular, ambient); } }

17 Results (Blinn) I

18 Results (Blinn) II

19 Production Pipeline with CgFX

20 CgFX Tools Set Integrated authoring in DCC apps: 3ds MAX 5.1 MAYA 4.5 XSI (CgFX Coming soon...) NVB Exporter CgFX Viewer OpenGL ARB, DirectX8, DirectX9

21 3D Studio Max 5.1 stdmaterial <-> CgFX Ability to select MAX scene lights and connect them to.fx parameters On the fly editing of shaders and auto-update of.fx GUI MAXSCRIPT support Source Code

22 Integration in 3D Studio Max

23 CgFX Viewport Manager Intuitive artist controls (sliders, color pickers, etc.) Dynamic, shaderspecific GUI Multiple Techniques for fallbacks Supports.fx file format

24 Shader changed by selecting a new fx file Color and numeric values can be changed Customizable Parameters are specific to each effect Bitmaps can be swapped

25 NVB Exporter for 3ds max Based on Pierre Terdiman s 3ds max exporter Exports Scene data Mesh, materials, lights, camera, skinning, etc... Exports CgFX materials ICgFXDataBridge interface Source code

26 CgFX Viewer Scene graph GUI.fx parameters edition Error reporting for easy.fx file problem identification Runs OpenGL, DirectX8, DirectX9 Switch between devices at any point

27 CgFX Viewer II Main Application Window Connection Editor Window The CgFX Viewer can be used as a production resource and a code example for implementing CgFX

28 How Does CgFX relate to Cg? CgFX describes an entire effect Cg implements a particular function required by an effect CgFX describes all the parameters (and their meaning or semantics) that the app has to provide automatic parameter discovery CgFX can describe complex multi-pass effects CgFX can handle multiple techniques

29 Hardware Shader Workflow Designing Shaders and Using Existing Shaders Artist-Configurable Parameters Editing Shader Parameters Exporting Shader Parameters to Game Engine

30 Multiple, narrowly-targeted shaders are more efficient/faster than large all-purpose shaders Several shaders may share similar features and lighting models Small Efficient Shaders

31 OpenGL: Where do you want to go today?

32 OpenGL 2.0 Goals Reduce the need for existing and future extensions to OpenGL by replacing complexity with programmability. Backward compatibility to OpenGL 1.x Address the needs of dynamic media authoring and playback applications needed by OpenML.

33 Status of Shading Language Extensions to support the OpenGL Shading Language Language approved as ARB extensions in June 2003 Language and extensions expected to be rolled into OpenGL in 6 rolled into OpenGL in 6-12 months 12 months That version of OpenGL will be called OpenGL 2.0 It will still be backwards compatible with Dlabs is shipping a preliminary implementation

34 Overview

35 Thanks!

Sébastien Dominé, NVIDIA. CgFX

Sébastien Dominé, NVIDIA. CgFX Sébastien Dominé, NVIDIA CgFX Overview What is CgFX? CgFX runtime Production pipeline with CgFX CgFX Tools set Demo What is CgFX? Supports Microsoft.fx files Cg plus: Multi-pass Hardware fallbacks (techniques)

More information

Shaders : the sky is the limit Sébastien Dominé NVIDIA Richard Stenson SCEA

Shaders : the sky is the limit Sébastien Dominé NVIDIA Richard Stenson SCEA Shaders : the sky is the limit Sébastien Dominé NVIDIA Richard Stenson SCEA Agenda FX Composer 2.0 Introductions Cross-Platform Shader Authoring FX Composer 2.0 and Production Pipelines PLAYSTATION 3 Production

More information

Advanced Rendering & Shading

Advanced Rendering & Shading Advanced Rendering & Shading Seminar 3 Advanced Rendering and Shading Pluto Computer room with NVidia 6600 graphics cards All remaining assignment examination slots are in this room Advanced Rendering

More information

DirectX Programming #4. Kang, Seongtae Computer Graphics, 2009 Spring

DirectX Programming #4. Kang, Seongtae Computer Graphics, 2009 Spring DirectX Programming #4 Kang, Seongtae Computer Graphics, 2009 Spring Programmable Shader For recent hardwares, vertex and pixel processing stage of the graphics pipeline is programmable Programmable Vertex

More information

Introduction to Shaders.

Introduction to Shaders. Introduction to Shaders Marco Benvegnù hiforce@gmx.it www.benve.org Summer 2005 Overview Rendering pipeline Shaders concepts Shading Languages Shading Tools Effects showcase Setup of a Shader in OpenGL

More information

Basics of GPU-Based Programming

Basics of GPU-Based Programming Module 1: Introduction to GPU-Based Methods Basics of GPU-Based Programming Overview Rendering pipeline on current GPUs Low-level languages Vertex programming Fragment programming High-level shading languages

More information

Shaders (some slides taken from David M. course)

Shaders (some slides taken from David M. course) Shaders (some slides taken from David M. course) Doron Nussbaum Doron Nussbaum COMP 3501 - Shaders 1 Traditional Rendering Pipeline Traditional pipeline (older graphics cards) restricts developer to texture

More information

Creating Real Shaders in FX Composer. Kevin Bjorke NVIDIA Corporation

Creating Real Shaders in FX Composer. Kevin Bjorke NVIDIA Corporation Creating Real Shaders in FX Composer Kevin Bjorke NVIDIA Corporation HLSL for both Artists and Programmers High-Level talk here at GDC Examples of what you can do in FX Composer Code details in these slides,

More information

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people GLSL Introduction Fu-Chung Huang Thanks for materials from many other people Programmable Shaders //per vertex inputs from main attribute aposition; attribute anormal; //outputs to frag. program varying

More information

Whitepaper. Using SAS with CgFX and FX file formats. Kevin Bjorke

Whitepaper. Using SAS with CgFX and FX file formats. Kevin Bjorke Whitepaper Using SAS with CgFX and FX file formats Kevin Bjorke Version 1.01 - March 2008 Using SAS with CgFX and FX file formats What, Why, How This document covers the use of SAS (that is, Standard

More information

Teaching Cg. This presentation introduces Cg ( C for graphics ) and explains why it would be useful when teaching a computer graphics course.

Teaching Cg. This presentation introduces Cg ( C for graphics ) and explains why it would be useful when teaching a computer graphics course. Teaching Cg This presentation introduces Cg ( C for graphics ) and explains why it would be useful when teaching a computer graphics course. 1 Real-Time Graphics Has Come a Long Way Virtua Fighter (SEGA

More information

NVIDIA FX Composer. Developer Presentation June 2004

NVIDIA FX Composer. Developer Presentation June 2004 NVIDIA FX Composer Developer Presentation June 2004 1 NVIDIA FX Composer FX Composer empowers developers to create high performance shaders in an integrated development environment with real-time preview

More information

Shaders in Eve Online Páll Ragnar Pálsson

Shaders in Eve Online Páll Ragnar Pálsson Shaders in Eve Online Páll Ragnar Pálsson EVE Online Eve Online Trinity First released 2003 Proprietary graphics engine DirectX 9 (DX11 on its way) Shader Model 3 (4 & 5 in development) HLSL Turning this

More information

RenderMonkey 1.6. Natalya Tatarchuk ATI Research

RenderMonkey 1.6. Natalya Tatarchuk ATI Research RenderMonkey 1.6 Natalya Tatarchuk ATI Research Game Developer Conference, San Francisco, CA, March 2005 Overview > What is RenderMonkey? > What s New In RenderMonkey 1.6? 2 What is RenderMonkey? > Shader

More information

Computer Graphics with OpenGL ES (J. Han) Chapter 6 Fragment shader

Computer Graphics with OpenGL ES (J. Han) Chapter 6 Fragment shader Computer Graphics with OpenGL ES (J. Han) Chapter 6 Fragment shader Vertex and Fragment Shaders The inputs to the fragment shader Varyings: The per-vertex output variables produced by the vertex shader

More information

High-Precision Shading and Geometry. Kevin Bjorke NVIDIA Corporation

High-Precision Shading and Geometry. Kevin Bjorke NVIDIA Corporation High-Precision Shading and Geometry Kevin Bjorke NVIDIA Corporation CPU Power Drives GPU Tools Showing Today: Two NVIDIA Tools Melody Simplify Complex Geometry Calculate UV-coord charts Generate high-res

More information

Pipeline Integration with FX Composer. Chris Maughan NVIDIA Corporation

Pipeline Integration with FX Composer. Chris Maughan NVIDIA Corporation Pipeline Integration with FX Composer Chris Maughan NVIDIA Corporation Agenda FX Composer 1.6 Recap DXSAS Plugins Scripting Preview of FX Composer 2 FX Composer History FX Composer 1.0 shipped last January

More information

Whitepaper. Using SAS with CgFX and FX file formats. Kevin Bjorke

Whitepaper. Using SAS with CgFX and FX file formats. Kevin Bjorke Whitepaper Using SAS with CgFX and FX file formats Kevin Bjorke Version 1.03 29 March 2008 Using SAS with CgFX and FX file formats What, Why, How This document covers the use of SAS (that is, Standard

More information

Shaders Part II. Traditional Rendering Pipeline

Shaders Part II. Traditional Rendering Pipeline Shaders Part II Doron Nussbaum Doron Nussbaum COMP 3501 - Shaders Part II 1 Traditional Rendering Pipeline Traditional pipeline (older graphics cards) restricts developer to texture and the 3-term lighting

More information

Accelerating Realism with the (NVIDIA Scene Graph)

Accelerating Realism with the (NVIDIA Scene Graph) Accelerating Realism with the (NVIDIA Scene Graph) Holger Kunz Manager, Workstation Middleware Development Phillip Miller Director, Workstation Middleware Product Management NVIDIA application acceleration

More information

Shaders. Slide credit to Prof. Zwicker

Shaders. Slide credit to Prof. Zwicker Shaders Slide credit to Prof. Zwicker 2 Today Shader programming 3 Complete model Blinn model with several light sources i diffuse specular ambient How is this implemented on the graphics processor (GPU)?

More information

Shader Series Primer: Fundamentals of the Programmable Pipeline in XNA Game Studio Express

Shader Series Primer: Fundamentals of the Programmable Pipeline in XNA Game Studio Express Shader Series Primer: Fundamentals of the Programmable Pipeline in XNA Game Studio Express Level: Intermediate Area: Graphics Programming Summary This document is an introduction to the series of samples,

More information

Lab 3 Shadow Mapping. Giuseppe Maggiore

Lab 3 Shadow Mapping. Giuseppe Maggiore Lab 3 Shadow Giuseppe Maggiore Adding Shadows to the Scene First we need to declare a very useful helper object that will allow us to draw textures to the screen without creating a quad vertex buffer //

More information

The Ultimate Developers Toolkit. Jonathan Zarge Dan Ginsburg

The Ultimate Developers Toolkit. Jonathan Zarge Dan Ginsburg The Ultimate Developers Toolkit Jonathan Zarge Dan Ginsburg February 20, 2008 Agenda GPU PerfStudio GPU ShaderAnalyzer RenderMonkey Additional Tools Tootle GPU MeshMapper CubeMapGen The Compressonator

More information

Lecture 5 Vertex and Fragment Shaders-1. CITS3003 Graphics & Animation

Lecture 5 Vertex and Fragment Shaders-1. CITS3003 Graphics & Animation Lecture 5 Vertex and Fragment Shaders-1 CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives The rendering pipeline and the shaders Data

More information

User Guide. DU _v01f January 2004

User Guide. DU _v01f January 2004 DU-01057-001_v01f January 2004 User Guide Table of Contents Chapter 1. About the FX Composer...1 1.1. System Requirements...3 1.2. References and Recommended Reading...3 Chapter 2. Using the FX Composer...4

More information

Evolution of GPUs Chris Seitz

Evolution of GPUs Chris Seitz Evolution of GPUs Chris Seitz Overview Concepts: Real-time rendering Hardware graphics pipeline Evolution of the PC hardware graphics pipeline: 1995-1998: Texture mapping and z-buffer 1998: Multitexturing

More information

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský Real - Time Rendering Graphics pipeline Michal Červeňanský Juraj Starinský Overview History of Graphics HW Rendering pipeline Shaders Debugging 2 History of Graphics HW First generation Second generation

More information

Technical Report. Mesh Instancing

Technical Report. Mesh Instancing Technical Report Mesh Instancing Abstract What is Mesh Instancing? Before we talk about instancing, let s briefly talk about the way that most D3D applications work. In order to draw a polygonal object

More information

NVSG NVIDIA Scene Graph

NVSG NVIDIA Scene Graph NVSG NVIDIA Scene Graph Leveraging the World's Fastest Scene Graph Agenda Overview NVSG Shader integration Interactive ray tracing Multi-GPU support NVIDIA Scene Graph (NVSG) The first cross-platform scene

More information

SDK White Paper. Rainbows and Fogbows Adding Natural Phenomena

SDK White Paper. Rainbows and Fogbows Adding Natural Phenomena SDK White Paper Rainbows and Fogbows Adding Natural Phenomena WP-01410-001-v01 July 2004 Abstract This document describes a method to render rainbows, coronas, fogbows, and halos realistically with a 3D

More information

Getting Started with Cg. Release 1.2 February 2004

Getting Started with Cg. Release 1.2 February 2004 Getting Started with Cg Release 1.2 February 2004 What This Presentation Contains What s Included in the Cg Distribution How to Learn Cg Quickly A Brief Introduction to Cg Using Cg in Your Applications

More information

Data passed from a source application is recognized by the destination application, yielding identical results. Data (Converted) compatibility

Data passed from a source application is recognized by the destination application, yielding identical results. Data (Converted) compatibility Interoperability Chart Version 2015 LEGEND Perfect compatibility Data passed from a source application is recognized by the destination application, yielding identical results. Data (Converted) compatibility

More information

NVIDIA Tools for Artists

NVIDIA Tools for Artists NVIDIA Tools for Artists GPU Jackpot October 2004 Will Ramey Why Do We Do This? Investing in Developers Worldwide Powerful tools for building games Software Development Content Creation Performance Analysis

More information

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people GLSL Introduction Fu-Chung Huang Thanks for materials from many other people Shader Languages Currently 3 major shader languages Cg (Nvidia) HLSL (Microsoft) Derived from Cg GLSL (OpenGL) Main influences

More information

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics Why GPU? Chapter 1 Graphics Hardware Graphics Processing Unit (GPU) is a Subsidiary hardware With massively multi-threaded many-core Dedicated to 2D and 3D graphics Special purpose low functionality, high

More information

Cg Toolkit. Cg 1.3 Release Notes. December 2004

Cg Toolkit. Cg 1.3 Release Notes. December 2004 Cg Toolkit Cg 1.3 Release Notes December 2004 Cg Toolkit Release Notes The Cg Toolkit allows developers to write and run Cg programs using a wide variety of hardware platforms and graphics APIs. Originally

More information

NVIDIA Developer Tools for Graphics and PhysX

NVIDIA Developer Tools for Graphics and PhysX NVIDIA Developer Tools for Graphics and PhysX FX Composer Shader Debugger PerfKit Conference Presentations mental mill Artist Edition NVIDIA Shader Library Photoshop Plug ins Texture Tools Direct3D SDK

More information

Introduction to OpenGL

Introduction to OpenGL Introduction to OpenGL 1995-2015 Josef Pelikán & Alexander Wilkie CGG MFF UK Praha pepca@cgg.mff.cuni.cz http://cgg.mff.cuni.cz/~pepca/ 1 / 31 Advances in Hardware 3D acceleration is a common feature in

More information

OpenGL ES 2.0 : Start Developing Now. Dan Ginsburg Advanced Micro Devices, Inc.

OpenGL ES 2.0 : Start Developing Now. Dan Ginsburg Advanced Micro Devices, Inc. OpenGL ES 2.0 : Start Developing Now Dan Ginsburg Advanced Micro Devices, Inc. Agenda OpenGL ES 2.0 Brief Overview Tools OpenGL ES 2.0 Emulator RenderMonkey w/ OES 2.0 Support OpenGL ES 2.0 3D Engine Case

More information

The Effects Framework. October 31, Composed of the following components:

The Effects Framework. October 31, Composed of the following components: Game Programming The Effects Framework October 31, 2005 Rendering Effect Composed of the following components: one ore more rendering passes a list of device states a vertex and/or pixel shader Effect

More information

Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer

Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer Heinrich Fink 1 Thomas Weber 1 Michael Wimmer 1 1 Institute of Computer Graphics and Algorithms, Vienna University of Technology

More information

Cg 2.0. Mark Kilgard

Cg 2.0. Mark Kilgard Cg 2.0 Mark Kilgard What is Cg? Cg is a GPU shading language C/C++ like language Write vertex-, geometry-, and fragmentprocessing kernels that execute on massively parallel GPUs Productivity through a

More information

Cg Toolkit. Cg 2.1 October 2008 Release Notes

Cg Toolkit. Cg 2.1 October 2008 Release Notes Cg Toolkit Cg 2.1 October 2008 Release Notes Cg Toolkit Release Notes The Cg Toolkit allows developers to write and run Cg programs using a wide variety of hardware and OS platforms and graphics APIs.

More information

The Application Stage. The Game Loop, Resource Management and Renderer Design

The Application Stage. The Game Loop, Resource Management and Renderer Design 1 The Application Stage The Game Loop, Resource Management and Renderer Design Application Stage Responsibilities 2 Set up the rendering pipeline Resource Management 3D meshes Textures etc. Prepare data

More information

Cg Toolkit. Cg 2.1 beta August 2008 Release Notes

Cg Toolkit. Cg 2.1 beta August 2008 Release Notes Cg Toolkit Cg 2.1 beta August 2008 Release Notes Cg Toolkit Release Notes The Cg Toolkit allows developers to write and run Cg programs using a wide variety of hardware and OS platforms and graphics APIs.

More information

printf Debugging Examples

printf Debugging Examples Programming Soap Box Developer Tools Tim Purcell NVIDIA Successful programming systems require at least three tools High level language compiler Cg, HLSL, GLSL, RTSL, Brook Debugger Profiler Debugging

More information

Cg Toolkit. Cg 2.0 May 2008 Release Notes

Cg Toolkit. Cg 2.0 May 2008 Release Notes Cg Toolkit Cg 2.0 May 2008 Release Notes Cg Toolkit Release Notes The Cg Toolkit allows developers to write and run Cg programs using a wide variety of hardware and OS platforms and graphics APIs. Originally

More information

Cg Toolkit. Cg 2.0 January 2008 Release Notes

Cg Toolkit. Cg 2.0 January 2008 Release Notes Cg Toolkit Cg 2.0 January 2008 Release Notes Cg Toolkit Release Notes The Cg Toolkit allows developers to write and run Cg programs using a wide variety of hardware and OS platforms and graphics APIs.

More information

CS 4620 Program 3: Pipeline

CS 4620 Program 3: Pipeline CS 4620 Program 3: Pipeline out: Wednesday 14 October 2009 due: Friday 30 October 2009 1 Introduction In this assignment, you will implement several types of shading in a simple software graphics pipeline.

More information

Canonical Shaders for Optimal Performance. Sébastien Dominé Manager of Developer Technology Tools

Canonical Shaders for Optimal Performance. Sébastien Dominé Manager of Developer Technology Tools Canonical Shaders for Optimal Performance Sébastien Dominé Manager of Developer Technology Tools Agenda Introduction FX Composer 1.0 High Performance Shaders Basics Vertex versus Pixel Talk to your compiler

More information

Programming Graphics Hardware

Programming Graphics Hardware Tutorial 5 Programming Graphics Hardware Randy Fernando, Mark Harris, Matthias Wloka, Cyril Zeller Overview of the Tutorial: Morning 8:30 9:30 10:15 10:45 Introduction to the Hardware Graphics Pipeline

More information

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1 X. GPU Programming 320491: Advanced Graphics - Chapter X 1 X.1 GPU Architecture 320491: Advanced Graphics - Chapter X 2 GPU Graphics Processing Unit Parallelized SIMD Architecture 112 processing cores

More information

Cg: A system for programming graphics hardware in a C-like language

Cg: A system for programming graphics hardware in a C-like language Cg: A system for programming graphics hardware in a C-like language William R. Mark University of Texas at Austin R. Steven Glanville NVIDIA Kurt Akeley NVIDIA and Stanford University Mark Kilgard NVIDIA

More information

Pump Up Your Pipeline

Pump Up Your Pipeline Pump Up Your Pipeline NVIDIA Developer Tools GPU Jackpot October 4004 Will Ramey Why Do We Do This? Investing in Developers Worldwide Powerful tools for building games Software Development Content Creation

More information

Optimal Shaders Using High-Level Languages

Optimal Shaders Using High-Level Languages Optimal Shaders Using High-Level Languages The Good, The Bad, The Ugly All high level languages provide significant power and flexibility that: Make writing shaders easy Make writing slow shaders easy

More information

Cg Toolkit. Cg 2.2 February 2010 Release Notes

Cg Toolkit. Cg 2.2 February 2010 Release Notes Cg Toolkit Cg 2.2 February 2010 Release Notes Cg Toolkit Release Notes The Cg Toolkit allows developers to write and run Cg programs using a wide variety of hardware and OS platforms and graphics APIs.

More information

Computer Graphics Coursework 1

Computer Graphics Coursework 1 Computer Graphics Coursework 1 Deadline Deadline: 4pm, 24/10/2016 4pm 23/10/2015 Outline The aim of the coursework is to modify the vertex and fragment shaders in the provided OpenGL framework to implement

More information

Dave Shreiner, ARM March 2009

Dave Shreiner, ARM March 2009 4 th Annual Dave Shreiner, ARM March 2009 Copyright Khronos Group, 2009 - Page 1 Motivation - What s OpenGL ES, and what can it do for me? Overview - Lingo decoder - Overview of the OpenGL ES Pipeline

More information

last time put back pipeline figure today will be very codey OpenGL API library of routines to control graphics calls to compile and load shaders

last time put back pipeline figure today will be very codey OpenGL API library of routines to control graphics calls to compile and load shaders last time put back pipeline figure today will be very codey OpenGL API library of routines to control graphics calls to compile and load shaders calls to load vertex data to vertex buffers calls to load

More information

Cg Toolkit. Cg 1.2 Release Notes

Cg Toolkit. Cg 1.2 Release Notes Cg Toolkit Cg 1.2 Release Notes Cg Toolkit Release Notes The Cg Toolkit allows developers to write and run Cg programs using a wide variety of hardware platforms and graphics APIs. Originally released

More information

PVRShaman. User Manual

PVRShaman. User Manual PVRShaman Copyright Imagination Technologies Limited. All Rights Reserved. Appendix A. This publication contains proprietary information which is subject to change without notice and is supplied 'as is'

More information

Designing a Modern GPU Interface

Designing a Modern GPU Interface Designing a Modern GPU Interface Brooke Hodgman ( @BrookeHodgman) http://tiny.cc/gpuinterface How to make a wrapper for D3D9/11/12, GL2/3/4, GL ES2/3, Metal, Mantle, Vulkan, GNM & GCM without going (completely)

More information

Computer graphics 2: Graduate seminar in computational aesthetics

Computer graphics 2: Graduate seminar in computational aesthetics Computer graphics 2: Graduate seminar in computational aesthetics Angus Forbes evl.uic.edu/creativecoding/cs526 Homework 2 RJ ongoing... - Follow the suggestions in the Research Journal handout and find

More information

Cg Toolkit. Cg 2.2 April 2009 Release Notes

Cg Toolkit. Cg 2.2 April 2009 Release Notes Cg Toolkit Cg 2.2 April 2009 Release Notes Cg Toolkit Release Notes The Cg Toolkit allows developers to write and run Cg programs using a wide variety of hardware and OS platforms and graphics APIs. Originally

More information

Cg Toolkit. Cg 1.4 rc 1 Release Notes

Cg Toolkit. Cg 1.4 rc 1 Release Notes Cg Toolkit Cg 1.4 rc 1 Release Notes Cg Toolkit Release Notes The Cg Toolkit allows developers to write and run Cg programs using a wide variety of hardware platforms and graphics APIs. Originally released

More information

Content. Building Geometry Appearance Lights Model Loaders

Content. Building Geometry Appearance Lights Model Loaders Content Building Geometry Appearance Lights Model Loaders Building Geometry A Geometry represents a 3D object: Mesh: The form or structure of a shape (What to draw) Material: The color, transparency, and

More information

Technical Report. Anisotropic Lighting using HLSL

Technical Report. Anisotropic Lighting using HLSL Technical Report Anisotropic Lighting using HLSL Abstract Anisotropic Lighting Demo Anisotropic lighting is a lighting technique that does not require that the surface behave the same from different angles.

More information

Programming Graphics Hardware

Programming Graphics Hardware Programming Graphics Hardware Computer Graphics, VT 2013 Lecture 10 Johan Nysjö Centre for Image analysis Swedish University of Agricultural Sciences Uppsala University Recap: The fixed-function OpenGL

More information

PyFX: A framework for programming real-time effects

PyFX: A framework for programming real-time effects PyFX: A framework for programming real-time effects Calle Lejdfors and Lennart Ohlsson Department of Computer Science, Lund University Box 118, SE-221 00 Lund, SWEDEN {calle.lejdfors, lennart.ohlsson}@cs.lth.se

More information

Siggraph Agenda. Usability & Productivity. FX Composer 2.5. Usability & Productivity 9/12/2008 9:16 AM

Siggraph Agenda. Usability & Productivity. FX Composer 2.5. Usability & Productivity 9/12/2008 9:16 AM Agenda Shader Debugger Performance Tools A New Generation of Performance Analysis and Shader Authoring Tools Chris Maughan & Jeffrey Kiel Usability & Productivity Increase productivity Refine usability

More information

GPU Programmable Graphics Pipeline

GPU Programmable Graphics Pipeline GPU Programmable Graphics Pipeline 3D Apps Fixed Function Pipeline API commands 3D API: Direct3D NVidia GeForce FX GPU cmd & data stream GPU Frontend Vtx index Primitive Assembly Assembled polygons Rasterization

More information

CS GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1. Markus Hadwiger, KAUST

CS GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1. Markus Hadwiger, KAUST CS 380 - GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1 Markus Hadwiger, KAUST Reading Assignment #4 (until Feb. 23) Read (required): Programming Massively Parallel Processors book, Chapter

More information

Programming with OpenGL Part 3: Shaders. Ed Angel Professor of Emeritus of Computer Science University of New Mexico

Programming with OpenGL Part 3: Shaders. Ed Angel Professor of Emeritus of Computer Science University of New Mexico Programming with OpenGL Part 3: Shaders Ed Angel Professor of Emeritus of Computer Science University of New Mexico 1 Objectives Simple Shaders - Vertex shader - Fragment shaders Programming shaders with

More information

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation Lecture 17: Shading in OpenGL CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Introduce the OpenGL shading methods - per vertex shading

More information

EDAF80 Introduction to Computer Graphics. Seminar 3. Shaders. Michael Doggett. Slides by Carl Johan Gribel,

EDAF80 Introduction to Computer Graphics. Seminar 3. Shaders. Michael Doggett. Slides by Carl Johan Gribel, EDAF80 Introduction to Computer Graphics Seminar 3 Shaders Michael Doggett 2017 Slides by Carl Johan Gribel, 2010-13 Today OpenGL Shader Language (GLSL) Shading theory Assignment 3: (you guessed it) writing

More information

Game Graphics & Real-time Rendering

Game Graphics & Real-time Rendering Game Graphics & Real-time Rendering CMPM 163, W2018 Prof. Angus Forbes (instructor) angus@ucsc.edu Lucas Ferreira (TA) lferreira@ucsc.edu creativecoding.soe.ucsc.edu/courses/cmpm163 github.com/creativecodinglab

More information

Custom Component Development Using RenderMonkey SDK. Natalya Tatarchuk 3D Application Research Group ATI Research, Inc

Custom Component Development Using RenderMonkey SDK. Natalya Tatarchuk 3D Application Research Group ATI Research, Inc Custom Component Development Using RenderMonkey SDK Natalya Tatarchuk 3D Application Research Group ATI Research, Inc Overview Motivation Introduction to the SDK SDK Functionality Overview Conclusion 2

More information

Dynamic Code Generation for Realtime Shaders

Dynamic Code Generation for Realtime Shaders Dynamic Code Generation for Realtime Shaders Niklas Folkegård Högskolan i Gävle Daniel Wesslén Högskolan i Gävle Figure 1: Tori shaded with output from the Shader Combiner system in Maya Abstract Programming

More information

Programmable Graphics Hardware

Programmable Graphics Hardware Programmable Graphics Hardware Ian Buck Computer Systems Laboratory Stanford University Outline Why programmable graphics hardware Vertex Programs Fragment Programs CG Trends 2 Why programmable graphics

More information

B x. Interoperability Chart Version 2011 LEGEND. Perfect compatibility. Data (Converted) compatibility. Emulated (Bake) compatibility.

B x. Interoperability Chart Version 2011 LEGEND. Perfect compatibility. Data (Converted) compatibility. Emulated (Bake) compatibility. Interoperability Chart Version 2011 LEGEND Perfect compatibility Data passed from a source application is recognized by the destination application, yielding identical results. Data (Converted) compatibility

More information

Programming with OpenGL Shaders I. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico

Programming with OpenGL Shaders I. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico Programming with OpenGL Shaders I Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico Objectives Shader Programming Basics Simple Shaders Vertex shader Fragment shaders

More information

Objectives Shading in OpenGL. Front and Back Faces. OpenGL shading. Introduce the OpenGL shading methods. Discuss polygonal shading

Objectives Shading in OpenGL. Front and Back Faces. OpenGL shading. Introduce the OpenGL shading methods. Discuss polygonal shading Objectives Shading in OpenGL Introduce the OpenGL shading methods - per vertex shading vs per fragment shading - Where to carry out Discuss polygonal shading - Flat - Smooth - Gouraud CITS3003 Graphics

More information

User s Guide. FX Composer 2.5. April 2008 DU _v01

User s Guide. FX Composer 2.5. April 2008 DU _v01 User s Guide FX Composer 2.5 DU-02761-001_v01 Table of Contents Quick Tutorial...1 Overview... 1 The NVIDIA Software Improvement Program... 1 Creating an Effect... 1 Importing Geometry... 4 Applying Materials

More information

Transforming Production Workflows with the GPU. Kevin Bjorke, NVIDIA SIGGRAPH 2004

Transforming Production Workflows with the GPU. Kevin Bjorke, NVIDIA SIGGRAPH 2004 Transforming Production Workflows with the GPU Kevin Bjorke, NVIDIA SIGGRAPH 2004 Overview Games, Films, TV Production All are getting rapidly more complex and more expensive (and producers are getting

More information

Sung-Eui Yoon ( 윤성의 )

Sung-Eui Yoon ( 윤성의 ) Introduction to Computer Graphics and OpenGL Graphics Hardware Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/etri_cg/ Class Objectives Understand how GPUs have been evolved Understand

More information

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014 ECS 175 COMPUTER GRAPHICS Ken Joy Winter 2014 Shading To be able to model shading, we simplify Uniform Media no scattering of light Opaque Objects No Interreflection Point Light Sources RGB Color (eliminating

More information

1 of 5 9/10/ :11 PM

1 of 5 9/10/ :11 PM Shader programs Summary: This tutorial shows how to write a simple shader in X3D. Shader program definition Keywords: tutorial, X3D, world, rendering Author(s): Yvonne Jung Date: 2007-02-05 First an example

More information

Models and Architectures

Models and Architectures Models and Architectures Objectives Learn the basic design of a graphics system Introduce graphics pipeline architecture Examine software components for an interactive graphics system 1 Image Formation

More information

12.2 Programmable Graphics Hardware

12.2 Programmable Graphics Hardware Fall 2018 CSCI 420: Computer Graphics 12.2 Programmable Graphics Hardware Kyle Morgenroth http://cs420.hao-li.com 1 Introduction Recent major advance in real time graphics is the programmable pipeline:

More information

MXwendler Fragment Shader Development Reference Version 1.0

MXwendler Fragment Shader Development Reference Version 1.0 MXwendler Fragment Shader Development Reference Version 1.0 This document describes the MXwendler fragmentshader interface. You will learn how to write shaders using the GLSL language standards and the

More information

Programming with OpenGL Shaders I. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico

Programming with OpenGL Shaders I. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico Programming with OpenGL Shaders I Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico 0 Objectives Shader Basics Simple Shaders Vertex shader Fragment shaders 1 Vertex

More information

INFOGR Computer Graphics

INFOGR Computer Graphics INFOGR Computer Graphics Jacco Bikker & Debabrata Panja - April-July 2017 Lecture 10: Shaders Welcome! INFOGR2016/17 Today s Agenda: Recap: Diffuse Materials The Phong Shading Model Environment

More information

Table of contents. Autodesk Entertainment Creation Suite 2016 Questions and answers. 1. General product information 3. 2.

Table of contents. Autodesk Entertainment Creation Suite 2016 Questions and answers. 1. General product information 3. 2. Autodesk Entertainment Creation Suite 2016 Questions and answers Table of contents 3 1.1 When will the Entertainment Creation Suite 2016 software be available? 3 1.2 What will be the contents in Entertainment

More information

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics 2 Lecture Outline Introduction to DirectX & Direct3D Lab 2a: Direct3D Basics William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://bit.ly/hgvxlh / http://bit.ly/evizre

More information

Programmable Graphics Hardware

Programmable Graphics Hardware CSCI 480 Computer Graphics Lecture 14 Programmable Graphics Hardware [Ch. 9] March 2, 2011 Jernej Barbic University of Southern California OpenGL Extensions Shading Languages Vertex Program Fragment Program

More information

Lecture 10: Shading Languages. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Lecture 10: Shading Languages. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011) Lecture 10: Shading Languages Kayvon Fatahalian CMU 15-869: Graphics and Imaging Architectures (Fall 2011) Review: role of shading languages Renderer handles surface visibility tasks - Examples: clip,

More information

Profiling and Debugging Games on Mobile Platforms

Profiling and Debugging Games on Mobile Platforms Profiling and Debugging Games on Mobile Platforms Lorenzo Dal Col Senior Software Engineer, Graphics Tools Gamelab 2013, Barcelona 26 th June 2013 Agenda Introduction to Performance Analysis with ARM DS-5

More information

Shading Languages Tim Foley

Shading Languages Tim Foley Shading Languages Tim Foley Why Shading Languages? DSLs? Productivity Performance 2 Why Shading Languages? DSLs? Productivity Performance 3 Productivity Build shaders from re-usable components Performance

More information

Fog example. Fog is atmospheric effect. Better realism, helps determine distances

Fog example. Fog is atmospheric effect. Better realism, helps determine distances Fog example Fog is atmospheric effect Better realism, helps determine distances Fog Fog was part of OpenGL fixed function pipeline Programming fixed function fog Parameters: Choose fog color, fog model

More information