TSE/Shaders/Tools

From TDN

Contents

Overview

Shader and material development is a pretty important and specific task. This sets up how your game will be rendered and how all the textures will be affected by light and in some cases even physics. Materials are definitions for your textures so that they react in a specific manner when it passes through a specific shader. So if you want you bathroom wall texture to reflect light and show some dents, this will be defined through your material, creating the 'settings' for your texture file. This material is then put through the shader which will do all the hardware calls and heavy work to use the settings to produce the desired effects. To develop these shaders, you will need two main tools; RenderMonkey and/or FX Composer.

Tools

The two main current development tools for Shaders are provided by the main two graphic card providers, ATI and Nvidia.

RenderMonkey

RenderMonkey

Further tools by ATI which might are usefull can be found here.

FX Composer

FX Composer 2

FX Composer is a powerful integrated development environment for shader authoring. With support for DirectX and OpenGL, HLSL, COLLADA FX, and CgFX, as well as .fbx, .x, .3ds, .obj, and .dae formats, FX Composer provides true cross-platform functionality.

Key Features of FX Composer 2

   * Cross-Platform Support
         o DirectX 9 and OpenGL
         o HLSL, COLLADA FX Cg, CgFX shading languages 
   * User-Friendly Shader Authoring
         o Shader Creation Wizard with templates
         o Full-featured Code Editor
               + Code folding for functions, techniques and passes
               + Tab stop display
               + Line number display
               + External file modification monitoring
               + Jump-to-include files 
         o Properties panel for tweaking shader parameters
               + High dynamic range color picker 
         o Material panel for managing materials
               + Display of per-material textures
               + Tone mapping for per-material textures 
         o Easy material creation and management interface
         o Hundreds of sample shaders
               + NVIDIA Shader Library integration
               + Sample projects ranging from simple to complex 
         o Advanced scene manipulation
               + Create and manipulate basic geometric shapes, lights, and cameras
               + Import .3ds, .fbx, .dae, .x, .obj files
               + Drag-and-drop light binding
               + Drag-and-drop texture binding
               + Skinning and animation 
         o Texture Viewer
               + Support for .dds, .jpg, .bmp, .png, .tif
               + Drag-and-drop textures onto object materials 
         o mental millâ„¢ Artist Edition
               + Artist-friendly visual shader authoring
               + Ability to export to FX Composer via CgFX and HLSL 
         o Convenient Start Page
               + Recent projects
               + Quick Start Tutorial
               + Quick links to User Guide and other useful documentation
               + Single-click access to open effects and create new ones
               + Single-click access to open COLLADA documents 
         o Integrated Shader Performance Tuning via NVIDIA ShaderPerf 2.0
               + Support for CgFX, COLLADA FX, and HLSL shaders
               + Compare shader techniques across multiple GPUs
               + View data in tables or graphs
               + See shader throughput, register usage, instruction counts, and branching performance 
         o Convenient Pipeline Integration Features
               + Semantic and Annotation remapping
               + Advanced Scripting Support
                     # Full Python scripting
                     # Custom toolbar for scripting support 
               + Extensible plug-in Architecture with SDK 
         o Complete COLLADA support
               + Project and Asset Management (Project Explorer and Library Viewer)
                     # Author COLLADA assets
                     # Create and remove COLLADA documents
                     # Move, delete, and copy COLLADA assets across COLLADA documents
                     # View COLLADA assets by category 
               + COLLADA format support
                     # Material Instance Scene Binding
                     # Material Instance Vertex Binding
                     # Skinning
                     # Triangulation with holes
                     # Support for rendering COMMON Profiles
                     # Vertex Stream Remapper 
               + Conversion of CgFX to COLLADA FX Cg 
         o Comprehensive Undo/Redo support
         o Comprehensive Documentation
               + User Guide
               + Quick Tutorial

FX Composer 1.8

Further tools by Nvidia which might are usefull can be found here.

The Differences

The key differences are mainly in the pipeline and the production of the shaders. Their result will pretty much be the same, although both programs are more targetted towards functions and calls that are used on their respective producers video cards and drivers. You should be aware that some things might react slightly differently, but only on specific features and function calls.