In each release of our SDK you will find hundreds of code samples, effects, whitepapers, and more to help you take advantage of the latest technology from NVIDIA. Check out our SDK Home Page to download the complete SDK, or browse through individual code samples below. You can also click on the video links for a quick preview, or the thumbnail images for a gallery of larger images.
This code is released free of charge for use in derivative works, whether academic, commercial, or personal. (Full License)
|
scroll
Side-scroll animation |
|
|
|
Image Postprocessing
Download |
|
|
scene_raytrace (.fx shader)
An actual raytracer witten in HLSL |
|
|
|
Environment
Download |
|
|
scene_MandelbrotPS3 (.fx shader)
Mandelbrot Set in a ps_3 pixel shader |
|
|
|
Fractal
Download |
|
|
post_edgeOverlayPS3 (.fx shader)
Edge detection overlayed on scene
handy with "toon" shading |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
scene_mouseDot (.fx shader)
Click-here demo |
|
|
|
Paint
Download |
|
|
post_TV (.fx shader)
The "TV" post-processing effect
draws any scene through an animated "old TV"
screen effect, driven by the scene clock. The elements of this TV
effect include contrast and color changes, a flickering "overbrite"
effect, and scrolling "scan lines" based on a sine
function. |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_alphaGlow (.fx shader)
Create a bg glow based on the object alpha |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_annoy (.fx shader)
Jerk picture around. Mess with mouse |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_bloom (.fx shader)
Overbright glow effect |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_corona (.fx shader)
Animated noisy glow effects around each object,
"Corona" is an animated extension of "post_halo" and "post_glowTrail"
with the simple addition of noise. Objects are rendered into a
texture, that texture swizzled and blurred, noise used to repeatedly
offset the texels, and over several frames each new frame is tinted,
faded, and moved by noise to a new location for a fire-like effect
around the edges of each object. |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_blendOverlay (.fx shader)
Draw an overlay image over the current scene,
using a variety of
pixel-shader-driven blend modes. Compile-time
options provide dissolve and Photoshop(tm)-style
"Advanced Blend" operations |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_dropShadow (.fx shader)
Add 2D dropshadow |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_innerGlow (.fx shader)
Draw a colored glow along the INSIDE edges
of the scene objects (based on alpha) |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_glow (.fx shader)
Glow overlay to scene |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_glowTrail (.fx shader)
Psychotronic glow trails over animated scenes.
The post_glowtrail shader uses persistent render-to-texture
for animated effect. Each frame is rendered to a texture, and its
alpha is blurred and swizzled into RGB, tinted, and saved from
frame-to-frame. Each frame, the previous blur is faded slightly
before being added to the new glow. |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_glowTrailFP (.fx shader)
Psychotronic glow trails over animated scenes.
The post_glowtrail shader uses persistent render-to-texture
for animated effect. Each frame is rendered to a texture, and its
alpha is blurred and swizzled into RGB, tinted, and saved from
frame-to-frame. Each frame, the previous blur is faded slightly
before being added to the new glow. |
|
|
|
Image Postprocessing
Whitepaper
Video
Download |
|
|
post_trail (.fx shader)
Leave persistent but fading images behind
as the scene moves. Looks best with "Draw Always"
active.
The uses persistent render-to-texture
for animated effect. Each frame is rendered to a texture,
blurred and saved from
frame-to-frame. Each frame, the previous blur is faded slightly
before being added to the new scene. |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_halo (.fx shader)
Halos around any object -- these halos are
based on the object's alpha channel, which is blurred and
swizzled into RGB space via render-to-texture. |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_star (.fx shader)
Create a star-shaped flare. This shader
uses two passes, like the separable "glow" shader, but
the passes are completely independant, creating a crossed-star
shape. Only pixels brighter than "Starmin"
will flare. |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_kuwahara (.fx shader)
Kuwahara "blur" filter selectively
preserve some egde detail and color |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_orb (.fx shader)
Draws a "lens" effect over the curent frame, based
on the current mouse location (drag over the render window). The
"lens" displacement is ased on a pre-calculated texture, so this
provides a handy template for displacement shaders. |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_edgeDetect (.fx shader)
Edge detection applied to scene |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_edgeDetect2 (.fx shader)
Edge detection applied to scene -- faster version
with some terms skipped because they were zero or one |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_edgeDetectColor (.fx shader)
Fasster Edge Detect in RGBA (instead of grayscale) |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_cameraShake (.fx shader)
Use vertex noise for postprocess camera shake |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_dizzy (.fx shader)
Make the viewer dizzy |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_dizzier (.fx shader)
Make the viewer dizzier |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_colorMatrix (.fx shader)
Process scene colors for Saturation, contrast, etc |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_colorMix (.fx shader)
Like the Photoshop(tm) color mixer |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_colorGradient (.fx shader)
Apply a color curve texture to the vlaues in the
R,G, B or grayscale values in the scene. Note that setting
grayscale conversion weights of (1,0,0) gives the same result
as just using "red" though at lower performance. |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_monoMix (.fx shader)
Like the Photoshop(ps) color mixer when set to
"monochrome" interactively create the final
color mix for the B&W result. Unlike Photoshop(tm), consider
alpha contribution too. |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
colorSpin (.fx shader)
ColorSpin ignores scene geometry, but rotates
the color coordinates of the input texture image according
to the HLSL World-View matrix |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_desaturate (.fx shader)
Desaturate scene colors |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_sepia (.fx shader)
Add sepia toning (or any color toning) |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_colorCurve (.fx shader)
Apply a color curve, much like the Photoshop(tm)
"curves" filter. Curves are stored as textures, which can
be defined via HLSL or from a disk file. |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_frost (.fx shader)
Edgy frost effect on image |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_frostFast (.fx shader)
Edgy frost effect on image -- cheaper version |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_halftone_n (.fx shader)
B&W white noisy halftoning as a postprocess |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_halftone_r (.fx shader)
Simple round-dor pure B&W imaging |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_posterize (.fx shader)
Reduce color palette |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_wipe (.fx shader)
Simple wipe between two images default
valuess set up a quot;Star Wars Special" |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_unsharpMask (.fx shader)
Aply unsharp mask to scene |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_tiles (.fx shader)
Reduce image to a mosaic of stylized 3D tiles |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_moscowTV (.fx shader)
The "TV" post-processing effect
draws any scene through an animated "old TV"
screen effect, driven by the scene clock. The elements of this TV
effect include contrast and color changes, a flickering "overbrite"
effect, and scrolling "scan lines" based on a sine
function. |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_negative (.fx shader)
Invert image |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_passThru (.fx shader)
Just pass image through another texture (useful for
capturing that texture to disk in FX Composer) |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
post_512x512 (.fx shader)
Copy scene to a fixed-size map |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
pre_texture (.fx shader)
Apply texture as background |
|
|
|
Background
Whitepaper
Download |
|
|
pre_cubeBg (.fx shader)
pre_cubeBg uses a cube environment map as the background,
adjusting appropriately for the camera's view direction |
|
|
|
Environment
Whitepaper
Download |
|
|
pre_gradient (.fx shader)
Draw gradient as background |
|
|
|
Background
Whitepaper
Download |
|
|
pre_gradientTexture (.fx shader)
create gradient texture for use as background |
|
|
|
Background
Whitepaper
Download |
|
|
scene_invDisplace (.fx shader)
Use object surface normals to displace an image |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
scene_showAlpha (.fx shader)
Show the scene alpha channel |
|
|
|
Image Postprocessing
Download |
|
|
scene_Mandelbrot (.fx shader)
Mandelbrot Set in a ps_2 pixel shader |
|
|
|
Fractal
Download |
|
|
scene_blendModes (.fx shader)
Blend modes |
|
|
|
Image Postprocessing
Whitepaper
Download |
|
|
scene_bias (.fx shader)
Show effects of texture bias |
|
|
|
Texture
Whitepaper
Download |
|
|
scene_clear (.fx shader)
Clear to any color |
|
|
|
Background
Whitepaper
Download |
|
|
scene_displaceMap (.fx shader)
Apply a displacement texture to the scene |
|
|
|
Image Postprocessing
Download |
|
|
scene_hsv2rgb (.fx shader)
Conversion of HSV data to RGB |
|
|
|
Texture
Whitepaper
Download |
|
|
scene_EasyBake (.fx shader)
Bake lighting from one object into a texture,
then apply that texture to instances of that object, rather
than lighting them. |
|
|
|
Texture
Download |
|
|
scene_texture (.fx shader)
Show a texture |
|
|
|
Background
Whitepaper
Download |
|
|
scene_textureclear (.fx shader)
Clear to a texture |
|
|
|
Background
Whitepaper
Download |
|
|
post_1024x1024 (.fx shader)
post_1024x1024 |
|
|
|
Download |
|
|
post_colorClip (.fx shader)
post_colorClip |
|
|
|
Download |
|
|
post_bleach_bypass (.fx shader)
post_bleach_bypass |
|
|
|
Download |
|
|
post_drainBamage (.fx shader)
post_drainBamage |
|
|
|
Download |
|
|
post_distort (.fx shader)
post_distort |
|
|
|
Download |
|
|
post_fromCMYK (.fx shader)
post_fromCMYK |
|
|
|
Download |
|
|
post_fromCMY (.fx shader)
post_fromCMY |
|
|
|
Download |
|
|
post_fromYUV (.fx shader)
post_fromYUV |
|
|
|
Download |
|
|
post_fromHSV (.fx shader)
post_fromHSV |
|
|
|
Download |
|
|
post_image_diffusion (.fx shader)
post_image_diffusion |
|
|
|
Download |
|
|
post_holga (.fx shader)
post_holga |
|
|
|
Download |
|
|
post_sepiaX (.fx shader)
post_sepiaX |
|
|
|
Download |
|
|
post_scratch (.fx shader)
post_scratch |
|
|
|
Download |
|
|
post_titleOverlay (.fx shader)
post_titleOverlay |
|
|
|
Download |
|
|
post_swizzle (.fx shader)
post_swizzle |
|
|
|
Download |
|
|
post_toCMYK (.fx shader)
post_toCMYK |
|
|
|
Download |
|
|
post_toCMY (.fx shader)
post_toCMY |
|
|
|
Download |
|
|
post_toYUV (.fx shader)
post_toYUV |
|
|
|
Download |
|
|
post_toHSV (.fx shader)
post_toHSV |
|
|
|
Download |
|
|
pre_noise (.fx shader)
pre_noise |
|
|
|
Download |
|
|
pre_opto (.fx shader)
pre_opto |
|
|
|
Download |
|
|
pre_noise3d (.fx shader)
pre_noise3d |
|
|
|
Download |
|
|
scene_lineDraw (.fx shader)
scene_lineDraw |
|
|
|
Image Postprocessing
Download |
|
|
pre_psych (.fx shader)
pre_psych |
|
|
|
Download |
|