70 likes | 88 Views
Explore the power of programmable hardware with Luc, a high-level shading language that supports Nvidia Cg, DirectX HLSL, and OpenGL Shading language. Learn how to use Luc's C-like syntax, vertex and fragment programs, hardware functions, and 4-component algebra to create stunning graphics effects. This example demonstrates linear interpolation and how to manipulate data input and output, including textures, geometry, color, and normal.
E N D
High Level Shading Language • Nvidia Cg, • DirectX HLSL, • OpenGL Shading language, OpenGL 2.0
Shaders • C-like syntax • Vertex program • Fragment program • Hardware functions • 4-component algebra • Sin, cos,… • Linear interpolation • …
Data • Data input: • Textures • Tex coordinates • Geometry • Color • Normal • Output: • Direct display • Textures • P-buffer
Example float4 shader(float3 texCoord0 : TEXCOORD0, uniform sampler3D texture0, uniform sampler1D texture1 ) : COLOR { float tex0 = tex3D(texture0, texCoord0).a; return tex1D(texture1, tex0); }
Paper 1 • Acceleration Techniques for GPU based Volume Rendering • Tech. Univ. Munich • Viola et al, • IEEE Vis2003
Paper 2 • Hardware Based Non Linear Filtering and Segmentation Using High Level Shading Languages • Vienna Univ. of Technology • IEEE Vis2003