SlideShare a Scribd company logo
1 of 49
nvFX: A New Shader-Effect Framework 
for OpenGL, DirectX and Even Compute 
Tristan Lorach ( tlorach@nvidia.com )
Plan 
 What is an Effect 
 How to redefine the “Effect” 
paradigm 
 Examples 
 More Details on concepts 
 Conclusion
What Is An “Effect” ? 
 Higher level management: packages things together 
— Of Shader Code 
— Uniforms / Parameters 
— Samplers, Textures and Sampler States 
 Concept of Techniques and Passes 
— Passes : setup Shaders and render states for a rendering pass 
— Techniques : groups Passes 
 NOTE : Effect is mostly CPU runtime work 
— Maintains the Effect Database and updates/binds GPU
What Is An “Effect” ? (Cont’) 
 In 2002 
— Cg and CgFX created by NVIDIA 
— Microsoft followed on the idea, for HLSL : HLSLFx 
Check out NVIDIA SDK Samples & Microsoft SDK Samples 
 In 2013 : 
— Game Developers often have their own shader-builders 
— Cg 3.1 in maintenance mode… not expected to evolve 
Why ? Issues of maintenance… 
— Microsoft D3D Effect: No significant evolution
Anatomy Of An Effect 
someFunction(args…) 
{ 
Shader code 
} 
Samplers / Textures 
… 
someOtherFunction(args…) 
{ 
Shader code 
} 
Technique myTechName 
{ 
} 
Pass myPassName 
{ 
} 
Render / Shader States 
Pass myPassName2 
{…} 
Technique myTechName2 
{ … } 
Uniforms / Parameters 
Uniforms / Parameters 
… 
…
Anatomy Of Effect’s Runtime 
Uniforms / Parameters 
someFunction(args…) 
{ 
Shader code 
} 
Samplers / Textures 
Technique myTechName 
{ 
} 
Pass myPassName 
{ 
} 
Render / Shader States 
Pass myPassName2 
{…} 
CPU GPU 
handle = loadEffect(…) 
handle = getXXX(…) 
setXXX(handle,…) 
Vertex Prg 
Fragment Prg 
Vertex Prg 
Fragment Prg 
… 
validatePass() 
executePass() 
Uniforms 
Effect 
DB 
… 
Create & send 
Render-states 
Bind/set
Standard Effect design 
Application 
Parameters 
Shader func’s Effect file 
Texture 
Samplers 
Textures (D3D) 
Sampler-states 
Techniques 
Passes 
Render-states 
GPU 
Render 
states 
Shaders 
… 
Initialization 
Effect 
runtime 
Render loop 
Resources 
/uniforms 
• Set/Get parameters 
• Validate passes (builds shaders) 
• Bind textures/samplers 
• Activate (executes) a Pass
Generic Effect Container : Motivations 
 Revive ‘Effect’ concept for today’s needs & HW 
 Be a Generic ‘Container’ for GLSL, D3D, Compute, OptiX… 
 Add new concepts and features 
(Add resource creation; etc.) 
 Use latest 3D API features (OpenGL 4.3 or DX11.x and >) 
 Help to simplify applications and C++ code 
 Runtime efficiency 
 Multi-Platform (Windows, Linux, OSX, iOS, Android) 
 Make it Open-Source
What nvFx Can *Not* do 
 Few cool CgFX features not in nvFx 
— One unified language (Cg language) for all (D3D, OpenGL…) 
— CgFx Interfaces ( ~== Abstract classes) 
 nvFx can’t modify shading languages grammar 
— nvFx relies on GLSL, D3D, CUDA compilers 
 nvFx shader code not unified 
— OpenGL != GL-ES != D3D != CUDA features 
 Doesn’t sort and optimize Drawcalls for you 
 “Regal” could help on OpenGL <> GL-ES
Potential User Target 
 Workstation CAD/DCC 
— Convenient to expose some programmability to the end-user 
— Helps for maintenance of heavy projects 
 Labs / research (Prototype for a Siggraph paper !) 
— Helps to perform rapid and flexible prototyping 
— Convenient for Demos, Samples showcasing Shaders 
 Games 
— Helps highly combinatorial Shaders 
— Avoids heavy pre-processor code (#ifdef/#else/#endif everywhere)
nvFX Effect Integration 
Application 
nvFX 
runtime 
nvFX files 
Shader code 
Shader code 
Techs/passes 
… 
Techs/passes 
nvFX files 
Application 
nvFX 
runtime 
Techs/passes 
Techs/passes 
Shader code 
… 
Application 
nvFX 
runtime 
TTeecchhss//ppaassseess 
… 
Pre-compiled 
shaders 
C++ 
nvFX 
Effects 
nvFX files 
SShhaaddeerr c cooddee 
SShhaaddeerr c cooddee 
Pre-compiled 
shaders 
nvFxcc.exe –omyFx.cpp myFx.glslfx 
Make better diagram on details (loop, resource)
API Design 
 Front-End : parser (Bison/Flex) 
— Parses the effect 
— Does not parse the shader/compute 
code in Modules ! 
 Back-End : the library to build the 
effect data 
— Used by the Front-End to create 
parsed data 
— Used by the application to drive the 
effects 
 Works on PC, Android… iOS etc. 
Front-End 
(nvFX parser) 
Custom Grammar 
& Token 
API (C++ interfaces) 
C++ Back-End 
(nvFX runtime) 
Application 
Your 
Front-End 
Parser 
OpenGL DX CUDA 
Your Gfx API layer
Inside An nvFX Effect 
GLSL-Compute 
DXCompute Resources 
nvFX file 
Sampler-states 
Uniform 
Parameters 
Techniques 
Passes 
New Pass-states 
Texture Bind point 
Render 
state-groups 
Shader Code Modules 
GLSL 
D3D 
CUDA 
(render targets) 
Frame buffers 
Constant 
Buffers 
Resources description 
CUDA/OptiX/Compute 
[shared] Memory
Simple nvFX Example 
GLSLShader { 
#version 410 compatibility 
#extension GL_ARB_separate_shader_objects : 
enable 
… } 
GLSLShader ObjectVS { 
layout(location=0) in vec4 Position; 
layout(location=0) out vec3 v2fWorldNormal; 
void main() { … } 
} 
GLSLShader ObjectPS { 
layout(location=0) in vec3 v2fWorldNormal; 
Main() { … } 
} 
rasterization_state myRStates { 
POLYGON_MODE = FILL; 
… } 
sampler_state defaultSamplerState 
{ 
TEXTURE_MIN_FILTER = LINEAR_MIPMAP_LINEAR; 
TEXTURE_MAG_FILTER = LINEAR; 
} 
Resource2D diffTex { 
samplerState = defaultSamplerState; 
defaultFile = "gargoyleMossyDiffuse.dds"; 
} 
technique BasicTechnique { 
pass p1 { 
rasterization_state = myRStates; 
samplerResource(diffSampler) = { diffTex, 0 }; 
VertexProgram = ObjectVS; 
FragmentProgram = ObjectPS; 
Uniform(attenuation) = 0.9; 
CurrentTarget = backbuffer; 
}
Simple nvFX Example : On C++ Side 
Initialization: 
 Validate effect’s passes (Checks errors, compile shaders…) 
 Create/Gather any object we need for update (Uniforms to set etc.) 
Rendering Loop: 
 Loop in a Technique (taken from a material id, for example) 
 Set some Uniform values (projection matrix…) 
 Loop in the Passes 
 For each pass : ‘Execute’ it 
— Optionally update Uniforms/Cst Buffers afterward 
 Render your geometry
Example : HDR Rendering With Glow 
1 
Scene Effect 
Render 
Skybox in HDR 
Render The 
Scene in HDR 
Down-scale the 
texture 2x, 4x 
Blur texture 
Horizontal 
Then Vertical 
1 
2 
3 
4 
5 
6 
nvFx-managed 775 6 
Scene Graph 
Material Effect 1 
Metal Pass 
Material Effect 2 
Plastic pass 
Other ‘Effects’… 
RGBA32F 
Texture 
(HDR) 
Compositing: 
tone-mapping 
And radial Blur 
7 
RGBA 
32F 
Texture 
+ 
Backbuffer 
2 3 
4 
Resources
Demo
Example : Compute Post-Processing 
Scene Effect passes 
1 
Render 
Skybox 
Render The 
Scene 
Triggers CUDA 
/ GLSL 
/ DX-Compute 
Kernel 
Display result 
As a fullscreen 
Quad 
2 
3 
4 
Scene Graph 
Material Effect 1 
Metal Pass 
Material Effect 2 
Plastic pass 
Other ‘Effects’… 
nvFx-managed Resources 
RGBA 
Texture 
Backbuffer
Demo 
Convolution 
Bokeh Filter
Fire (Navier-Stokes equations) 
Simulation passes 
Advect Color 
Advect Velocity 
Vorticity 
Confinement 
Emit 
(Gaussian ball) 
Fire Up-force 
Vel. divergence 
Comp. pressure 
Proj. Velocity 
Proj. Vel. edges 
Technique 
Rasterize 
Techniques 
passes 
1 
Volume depth 
Volume bound 1 
Volume bound 2 
2 
Volume depth 
Smoke Ray-cast 
Water Ray-cast 
Fire Ray-cast 
3 
Rasterize result 
4 
nvFx-managed Resources
Demo
Experiment : Pure Ray Tracing With OptiX 
 Most OptiX runtime code 
— nvFx runtime 
 Most OptiX Shader code 
— In nvFx files 
— In CUDA/PTX files 
 nvFx Needs 
— OptiX NVIDIA SDK 
— Few OptiX setup from the 
application 
Scene Effect passes 
Triggers OptiX 
Context 
Display result 
As a fullscreen 
Quad 
1 
2 
nvFx-managed Resources 
RGBA 
Texture 
Backbuffer
Hybrid Rendering : Mixing OpenGL & OptiX 
Scene Effect passes 
1 
Render 
Skybox 
Render The 
Scene 
Triggers OptiX 
Ray Tracing 
For Reflections 
and shadow 
Compositing 
OpenGL + 
reflection & 
shadow 
2 
3 
4 
Scene Graph 
Material Effect 1 
Metal Pass 
Material Effect 2 
Plastic pass 
Other ‘Effects’… 
nvFx-managed resources
Demo
Example: GS Sparkling Effect 
1 
Scene Effect 
Render 
Scene 
For 2 targets 
Copy Texture 
To Backbuffer 
1 
2 
Scene Graph 
Material Effect 1 
Metal Pass 
Material Effect 2 
Plastic pass 
Other ‘Effects’… 
RGBA8 
Texture 
Backbuffer 
R32F 
Texture 
(depth) 
Render Sparkles 
With GS 
3 
2 
3 
nvFx-managed resources 
backbuffer
Demo (Last one…)
Shader Code In Effect 
 GLSL, D3D, CUDA, GLSL-Compute, DX-Compute… Not Parsed 
 We rely on existing compilers 
— D3D Driver : for Gfx Shaders and Compute 
— GLSL OpenGL driver : for Gfx Shaders and Compute 
— CUDA compiler 
 nvFX invokes APIs to compile shaders 
— No redundant work 
— But nvFX doesn’t know what is inside (did not parse the code) 
 nvFxcc.exe : check errors (and will generate C++ code)
Shader Code 
 Declared within a section : 
GLSLShader myShader { 
layout(location=0) in vec4 Position; 
void main(void) {…} 
} 
CUDAKernel Blur(unsigned int* data, int imgw,…) { 
…CUDA code… 
} 
D3D10Shader myD3DShader { 
…HLSL code… 
}
Shared Code sections 
No name == is shared by all (implicit header) 
GLSLShader { 
// used by myVShader and myFShader 
#version 430 compatibility 
vec3 someVectorMath(vec3 a, vec3 b) 
{…} 
… 
} 
GLSLShader myVShader { 
Void Main() { … } 
} 
GLSLShader myFShader { 
Void Main() {…} 
} 
CUDACode { 
__device__ float clamp(float x, float a, float b); 
… 
} 
CUDACode CUDACode1 
{ … } 
CUDACode CUDACode2 
{ … }
Techniques & Passes 
 A technique hosts passes. Nothing new 
 A Pass carries render-pipeline setup and actions 
• Clear mode (glClear mode…) 
• Clear color 
• Rendering Mode 
• Render Group Id 
• Blit action of a resource to a target 
• Current Target for rendering 
• Viewport Size 
• Swap of 2 resources 
• Loop count (to repeat passes) 
• Activate Pass On/Off 
• CUDA Module; Shared Mem. Grid/Block… 
• GLSL Compute Groups 
— References to State-Groups 
— Or direct References to render-states (old style as CgFX) 
— References to many Shaders (Vertex, Fragment etc.) 
— Value assignment to uniform parameters 
 GLSL sub-routine 
  each pass can setup a set of default uniform values 
— Connection of samplers/textures with resources & Sampler-states 
— Connection of images (ARB_shader_image_load_store) with resources 
— Lots of other special states to drive the runtime behavior
Pass example 
Pass myPass { 
RasterizationState = myRasterState; 
POLYGON_MODE = {GL_FRONT_AND_BACK, GL_FILL}; 
VertexShader = {MainVtxProg, HelperFunctions, InputAttribFunc}; 
FragmentShader = MainFragmentShader 
FragmentShader<‘LightShaders’>= {LightSpotFunc, LightDirFunc,…}; 
Uniform(mySubroutineArray) = {sr_spot, sr_point, sr_dir}; 
Uniform(myOtherSubroutineArray[0]) = srFunc32; 
Uniform(myOtherSubroutineArray[1]) = srFunc6; 
Uniform(mySimpleUniform) = {1.3, 2.2, 5.2}; 
SamplerResource(quadSampler) = myRenderTexture; 
SamplerTexUnit(quadSampler) = 0; 
SamplerState(quadSampler) = nearestSampler; 
… 
} 
Clarify the “Pass” definition
Linkage of Shader Modules 
 Pass : Link Shader Modules to a program Object 
— Done at Validation time 
— In Non-Separable Shader mode : 1 Pass hosts 1 program 
— In Separable Shader Mode: 1 Pass hosts many programs 
 OpenGL 4.2/4.3 : nvFx uses GLSL linkage 
 OpenGL ES: nvFx fakes linkage with concatenation 
VertexProgram = {VtxMain, ShaderHelpers, ShaderA, ShaderB, …}; 
FragmentProgram = {FragMain, ShaderHelpers, …}; 
…
Linkage Of Shaders : Groups 
 We can group shaders by name : 
VertexShader = myVtxShaderMain; 
VertexShader<”Lighting”> = {VtxLight0, VtxLight1, …} 
 Groups allows to Change some behavior at runtime 
Example: 
1. Gather the group of shaders named “Lighting” 
2. Remove these shaders from the Pass (Pass’s program) 
3. Add other shaders to this “Lighting” Group (for different 
lighting…) 
4. Link the program with new Shader Objects
Linkage Use-Case Example 
IA 
Same Shading design 
With OR without 
Tessellation 
Vtx Shader 
Body 
Fragment 
Shader 
attributes 
Attributes 
Abstration (a) 
Vertex Shader 
interpolators 
attributes 
Vertex Shader 
(passthrough) 
Hull 
(TCS) 
HW Tess. 
Attributes 
Abstration (b) 
Domain 
(TES) 
interpolators 
getNormal() 
… 
Attrib. passthrough abstraction
Resources in nvFX 
 Visual Effects resources : often inter-dependent 
 Example : deferred shading 
— G-Buffer really depends on how the effect does deferred shading 
 Compute  Graphics : interaction through resources 
— Compute reading from a rendered image and writing into a 
Textures… 
— Compute kernels sometimes need temporary storage… 
 nvFx allows creation of resources within an effect
Resource Creation And Use 
Create resources : 
RenderTexture myRTex1 
{ 
MSAA = {0,0}; 
Size = ApplicationDefined;// or {800,600}; 
Format = RGBA8; 
} 
RenderTexture myRTex2 
{ … } 
RenderBuffer myDST 
{ 
MSAA = {0,0}; 
Size = ApplicationDefined;// or {800,600}; 
Format = DEPTH24STENCIL8; 
} 
Create Frame Buffer Object 
FBO myFBO 
{ 
Color = { myRTex1, myRTex2 }; 
DST = myDST; 
} 
Use this in Passes 
CurrentTarget = myFBO;//(can be backbuffer) 
BlitFBOToActiveTarget = myFBOSrc; 
swapResources( mFBO1, myFBO2 ); 
samplerResource(mySampler) = myRTex1; 
You can query all from your 
Application, too
Scene-Level / Multi-Level Effects 
 pre/post-processing are Effects, too : at scene level 
 Scene-level Effects and material Effects must be consistent 
— Deferred shading : Material RT’s must match the G-Buffer 
— Shadowing of the scene : must tell materials how to use Shadowing 
— Special scene lighting to tell material Shaders how to do lighting 
 nvFX Allows Effect (Scene-level) to override some Shader 
Modules of lower levels effects 
— lower Effect’s shaders code adapted for higher Effects 
 Leads to instances of shader programs matching scene-level passes
Example of Scene-level override 
Scene-level Effect 
… 
Pass renderScene { 
ClearMode = all; 
FragmentProgramOverride<"out“> = forGBuff; 
FragmentProgramOverride<“light“> = noLight; 
CurrentTarget = myGBuffer; 
renderMode = render_scenegraph_shaded; 
} 
Pass deferredLighting { 
VertexProgram = deferredLightingVS; 
FragmentProgram = deferredLightingPS; 
renderMode = render_fullscreen_quad; 
CurrentTarget = backbuffer; 
} 
Material Effect in the scene 
… 
Pass myMatPass1 { 
VertexProgram = myVtxProg; 
FragmentProgram = {helpers, mainEntry}; 
FragmentProgram<out> = simpleOutput; 
FragmentProgram<light> = defaultLighting; 
… 
} 
New instance of myMatPass1 
FragmentProgram = {helpers, mainEntry}; 
FragmentProgram<out> = forGBuff; 
FragmentProgram<light> = noLight;
GLSLShader forGBuff 
{ 
layout(location=0) out vec4 outColor; 
layout(location=1) out vec4 outNormal; 
void finalColor(vec3 normal, vec4 colorSrc, 
Example of Scene-level override 
Scene-level Effect 
… 
Pass renderScene { 
ClearMode = all; 
FragmentProgramOverride<"out“> = forGBuff; 
FragmentProgramOverride<“light“> = noLight; 
CurrentTarget = myGBuffer; 
renderMode = render_scenegraph_shaded; 
} 
Pass deferredLighting { 
VertexProgram = deferredLightingVS; 
FragmentProgram = deferredLightingPS; 
renderMode = render_fullscreen_quad; 
CurrentTarget = backbuffer; 
} 
Material Effect in the scene 
vec3 tc, vec3 p, int matID) 
… 
{ 
Pass outNormal myMatPass1 = { 
… 
VertexProgram outColor … 
= myVtxProg; 
FragmentProgram … 
= {helpers, mainEntry}; 
FragmentProgram<} 
out> = simpleOutput; 
} 
FragmentProgram<light> = defaultLighting; 
… 
} 
New instance of myMatPass1 
FragmentProgram = {helpers, mainEntry}; 
FragmentProgram<out> = forGBuff; 
FragmentProgram<light> = noLight; 
GLSLShader defaultLighting 
{ 
void lighting_compute(LIGHTINFOS infos, 
inout LIGHTRES res) { 
…Some OpenGL-style lighting… 
} 
} 
GLSLShader mainEntry 
{ 
void main() 
{ 
… 
lighting_compute(lightInfos, res); 
… 
finalColor(N, color, tc, p, matID); 
} 
} 
GLSLShader simpleOutput 
{ 
layout(location=0) out vec4 outColor; 
void finalColor(vec3 normal, vec4 colorSrc, 
vec3 tc, vec3 p, int matID) 
{ 
outColor = colorSrc; 
} 
} 
GLSLShader noLight 
{ 
void lighting_compute(LIGHTINFOS infos, 
inout LIGHTRES res) {/*empty*/} 
}
Example of Scene-level override 
Scene-level Effect 
… 
Pass renderScene { 
ClearMode = all; 
FragmentProgramOverride<"out“> = forGBuff; 
FragmentProgramOverride<“light“> = noLight; 
CurrentTarget = myGBuffer; 
renderMode = render_scenegraph_shaded; 
} 
Pass deferredLighting { 
VertexProgram = deferredLightingVS; 
FragmentProgram = deferredLightingPS; 
renderMode = render_fullscreen_quad; 
CurrentTarget = backbuffer; 
} 
Material Effect in the scene 
… 
Pass myMatPass1 { 
VertexProgram = myVtxProg; 
FragmentProgram = {helpers, mainEntry}; 
FragmentProgram<out> = simpleOutput; 
FragmentProgram<light> = defaultLighting; 
… 
} 
New instance of myMatPass1 
FragmentProgram = {helpers, mainEntry}; 
FragmentProgram<out> = forGBuff; 
FragmentProgram<light> = noLight;
State Groups 
 The modern way to use renderstate : DX10/11 default way 
 OpenGL : maybe… extension 
— Rasterization States 
— Color Sample States 
— Depth-Stencil States 
Remove? 
 Define many of them in the effect : 
rasterization_state myRasterState1 { POINT_SIZE=1.2; …} 
rasterization_state myRasterState2 { CULL_FACE=FALSE; …} 
color_sample_state myCSState1 { BLEND=TRUE; ALPHA_TEST=FALSE;…} 
dst_state myDSTState { DEPTH_TEST=TRUE; DEPTH_WRITEMASK=TRUE;…} 
 State groups can then used in Passes
Sampler States 
 Sampler state is an nvFx Object 
— Maintained by nvFX and mapped to the API 
— Eventually translated as GLSL Samplers state (extension) 
 Can be connected in a Pass or via Textures or Resources 
GLSLShader myShader { 
uniform sampler2D colorSampler; 
… 
} 
sampler_state mySamplerState { 
MIN_FILTER = GL_LINEAR_MIPMAP_LINEAR; 
MAG_FILTER = GL_NEAREST; 
}; 
Pass myPass { 
SamplerState(colorSampler) = mySamplerState ; 
}; 
REMOVE?
Uniforms 
GLSLShader myFragShader 
{ 
uniform vec3 diffCol; 
uniform sampler2D mySampler 
main() {…using diffCol… } 
} 
Target 1 
Make them 1 SLIDE 
Application nvFX runtime 
createUniform() 
set…() 
update…() 
Uniform 
Binding point 
“diffCol” 
Load Effect & 
& initialize it 
GLSLShader myVtxShader 
{ 
uniform vec3 diffCol; 
main() {…using diffCol… } 
} 
Target 2 
(Other targets) 
createUniform() 
set…() 
update…() 
Uniform 
Binding point 
“foo” 
Effect 
Effect 
Obj.
Uniforms 
GLSLShader myFragShader 
{ 
; 
uniform vec3 diffCol 
uniform sampler2D mySampler 
main() {…using diffCol… } 
} 
Target 1 
Application nvFX runtime 
findUniform(‘diffCol’) Uniform 
set…() 
update…() 
Binding point 
“diffCol” 
Load Effect & 
& initialize it 
GLSLShader myVtxShader 
{ 
; 
main() {…using diffCol… } 
} 
Target 2 
Effect 
Effect 
Obj. 
uniform vec3 diffCol 
: SEMDIFF;
Uniforms 
Effect 
Effect 
Obj. uniform vec3 diffCol; 
GLSLShader myFShader 
{ 
uniform sampler2D mySampler 
main() { …using diffCol… } 
} 
Target 1 
Application nvFX runtime 
findUniform(‘diffCol’) 
set…() 
update…() 
Uniform 
Binding point 
“diffCol” 
Load Effect & 
& initialize it 
Technque tech1 { 
Pass p1 
{ 
fragmentShader = myFShader 
diffCol = {0.3, 0.5, 1.0}; 
} 
} 
Pass’s uniform 
Binding point 
“diffCol”
Buffers of Uniforms (Buffer Objects) 
 Direct mapping to 
— OpenGL Uniform Buffer Object (UBO + GLSL std140) 
— D3D10/11 Cst Buffers (cbuffer token in HLSL) 
 A constant Buffer is made of uniforms 
— Can be targeted by a Uniform Object 
 Can have default values specified by nvFX code 
 Two ways for buffer’s resource creation : 
— application created : pass the handle to nvFX 
— nvFX creates the buffer for you
Performances 
 Possible performance issues 
— Runtime implementation 
— Pass execution 
— Update of Uniform / Cst. Buffer / sampler / resource 
 More CPU optimization can be done (Open-Source helps) 
— This first version prioritizes nvFx’s proof of concept 
 Users will always need to be careful 
— Avoid too many pass executions 
— Avoid too many uniform update 
 NSight Custom Markers in nvFx
Conclusion 
 Less code in Application 
 More flexibility 
 Consistency of Effect code. Helps for maintenance and 
creativity 
 Updated Effect paradigm for modern API’s 
 Open-Source approach to allow developers to 
— Easily debug it 
— Improve it 
— Customize it
Questions ? 
Feedback welcome : tlorach@nvidia.com 
References: 
- http://developer.nvidia.com 
- https://github.com/p3/regal 
- https://github.com/tlorach/nvFX 
(Soon available)

More Related Content

What's hot

DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIsDX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIsAMD Developer Central
 
OpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering TechniquesOpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering TechniquesNarann29
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityMark Kilgard
 
Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Mark Kilgard
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMark Kilgard
 
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John MelonakosPT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John MelonakosAMD Developer Central
 
CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing StuffMark Kilgard
 
Approaching zero driver overhead
Approaching zero driver overheadApproaching zero driver overhead
Approaching zero driver overheadCass Everitt
 
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...AMD Developer Central
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016Mark Kilgard
 
Borderless Per Face Texture Mapping
Borderless Per Face Texture MappingBorderless Per Face Texture Mapping
Borderless Per Face Texture Mappingbasisspace
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learnedbasisspace
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCQLOC
 
GS-4108, Direct Compute in Gaming, by Bill Bilodeau
GS-4108, Direct Compute in Gaming, by Bill BilodeauGS-4108, Direct Compute in Gaming, by Bill Bilodeau
GS-4108, Direct Compute in Gaming, by Bill BilodeauAMD Developer Central
 
PG-4034, Using OpenGL and DirectX for Heterogeneous Compute, by Karl Hillesland
PG-4034, Using OpenGL and DirectX for Heterogeneous Compute, by Karl HilleslandPG-4034, Using OpenGL and DirectX for Heterogeneous Compute, by Karl Hillesland
PG-4034, Using OpenGL and DirectX for Heterogeneous Compute, by Karl HilleslandAMD Developer Central
 
GDC 2012: Advanced Procedural Rendering in DX11
GDC 2012: Advanced Procedural Rendering in DX11GDC 2012: Advanced Procedural Rendering in DX11
GDC 2012: Advanced Procedural Rendering in DX11smashflt
 
Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparencyacbess
 

What's hot (20)

DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIsDX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 
OpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering TechniquesOpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering Techniques
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
 
Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well
 
OpenGL 4 for 2010
OpenGL 4 for 2010OpenGL 4 for 2010
OpenGL 4 for 2010
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to Vulkan
 
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John MelonakosPT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
 
CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing Stuff
 
Beyond porting
Beyond portingBeyond porting
Beyond porting
 
Approaching zero driver overhead
Approaching zero driver overheadApproaching zero driver overhead
Approaching zero driver overhead
 
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...
Keynote (Mike Muller) - Is There Anything New in Heterogeneous Computing - by...
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
 
Borderless Per Face Texture Mapping
Borderless Per Face Texture MappingBorderless Per Face Texture Mapping
Borderless Per Face Texture Mapping
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learned
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOC
 
GS-4108, Direct Compute in Gaming, by Bill Bilodeau
GS-4108, Direct Compute in Gaming, by Bill BilodeauGS-4108, Direct Compute in Gaming, by Bill Bilodeau
GS-4108, Direct Compute in Gaming, by Bill Bilodeau
 
PG-4034, Using OpenGL and DirectX for Heterogeneous Compute, by Karl Hillesland
PG-4034, Using OpenGL and DirectX for Heterogeneous Compute, by Karl HilleslandPG-4034, Using OpenGL and DirectX for Heterogeneous Compute, by Karl Hillesland
PG-4034, Using OpenGL and DirectX for Heterogeneous Compute, by Karl Hillesland
 
GDC 2012: Advanced Procedural Rendering in DX11
GDC 2012: Advanced Procedural Rendering in DX11GDC 2012: Advanced Procedural Rendering in DX11
GDC 2012: Advanced Procedural Rendering in DX11
 
Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparency
 

Similar to NvFX GTC 2013

Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Alexander Dolbilov
 
SE2016 BigData Vitalii Bondarenko "HD insight spark. Advanced in-memory Big D...
SE2016 BigData Vitalii Bondarenko "HD insight spark. Advanced in-memory Big D...SE2016 BigData Vitalii Bondarenko "HD insight spark. Advanced in-memory Big D...
SE2016 BigData Vitalii Bondarenko "HD insight spark. Advanced in-memory Big D...Inhacking
 
Vitalii Bondarenko HDinsight: spark. advanced in memory big-data analytics wi...
Vitalii Bondarenko HDinsight: spark. advanced in memory big-data analytics wi...Vitalii Bondarenko HDinsight: spark. advanced in memory big-data analytics wi...
Vitalii Bondarenko HDinsight: spark. advanced in memory big-data analytics wi...Аліна Шепшелей
 
CS 354 Programmable Shading
CS 354 Programmable ShadingCS 354 Programmable Shading
CS 354 Programmable ShadingMark Kilgard
 
02 direct3 d_pipeline
02 direct3 d_pipeline02 direct3 d_pipeline
02 direct3 d_pipelineGirish Ghate
 
Deep dive into deeplearn.js
Deep dive into deeplearn.jsDeep dive into deeplearn.js
Deep dive into deeplearn.jsKai Sasaki
 
NVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読みNVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読みNVIDIA Japan
 
Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!Johan Andersson
 
D3 D10 Unleashed New Features And Effects
D3 D10 Unleashed   New Features And EffectsD3 D10 Unleashed   New Features And Effects
D3 D10 Unleashed New Features And EffectsThomas Goddard
 
FrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteFrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteElectronic Arts / DICE
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)JiandSon
 
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...David Walker
 
Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Prabindh Sundareson
 
Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019
Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019
Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019Unity Technologies
 
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSLMinko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSLMinko3D
 
PySpark in practice slides
PySpark in practice slidesPySpark in practice slides
PySpark in practice slidesDat Tran
 
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Raffi Khatchadourian
 

Similar to NvFX GTC 2013 (20)

Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)
 
SE2016 BigData Vitalii Bondarenko "HD insight spark. Advanced in-memory Big D...
SE2016 BigData Vitalii Bondarenko "HD insight spark. Advanced in-memory Big D...SE2016 BigData Vitalii Bondarenko "HD insight spark. Advanced in-memory Big D...
SE2016 BigData Vitalii Bondarenko "HD insight spark. Advanced in-memory Big D...
 
Vitalii Bondarenko HDinsight: spark. advanced in memory big-data analytics wi...
Vitalii Bondarenko HDinsight: spark. advanced in memory big-data analytics wi...Vitalii Bondarenko HDinsight: spark. advanced in memory big-data analytics wi...
Vitalii Bondarenko HDinsight: spark. advanced in memory big-data analytics wi...
 
Shaders in Unity
Shaders in UnityShaders in Unity
Shaders in Unity
 
CS 354 Programmable Shading
CS 354 Programmable ShadingCS 354 Programmable Shading
CS 354 Programmable Shading
 
Arvindsujeeth scaladays12
Arvindsujeeth scaladays12Arvindsujeeth scaladays12
Arvindsujeeth scaladays12
 
02 direct3 d_pipeline
02 direct3 d_pipeline02 direct3 d_pipeline
02 direct3 d_pipeline
 
Deep dive into deeplearn.js
Deep dive into deeplearn.jsDeep dive into deeplearn.js
Deep dive into deeplearn.js
 
NVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読みNVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読み
 
Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!Your Game Needs Direct3D 11, So Get Started Now!
Your Game Needs Direct3D 11, So Get Started Now!
 
D3 D10 Unleashed New Features And Effects
D3 D10 Unleashed   New Features And EffectsD3 D10 Unleashed   New Features And Effects
D3 D10 Unleashed New Features And Effects
 
FrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteFrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in Frostbite
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
 
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
The Effect of Hierarchical Memory on the Design of Parallel Algorithms and th...
 
Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011
 
Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019
Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019
Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019
 
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSLMinko - Targeting Flash/Stage3D with C++ and GLSL
Minko - Targeting Flash/Stage3D with C++ and GLSL
 
PySpark in practice slides
PySpark in practice slidesPySpark in practice slides
PySpark in practice slides
 
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
 
Apache spark core
Apache spark coreApache spark core
Apache spark core
 

Recently uploaded

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 

Recently uploaded (20)

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 

NvFX GTC 2013

  • 1. nvFX: A New Shader-Effect Framework for OpenGL, DirectX and Even Compute Tristan Lorach ( tlorach@nvidia.com )
  • 2. Plan  What is an Effect  How to redefine the “Effect” paradigm  Examples  More Details on concepts  Conclusion
  • 3. What Is An “Effect” ?  Higher level management: packages things together — Of Shader Code — Uniforms / Parameters — Samplers, Textures and Sampler States  Concept of Techniques and Passes — Passes : setup Shaders and render states for a rendering pass — Techniques : groups Passes  NOTE : Effect is mostly CPU runtime work — Maintains the Effect Database and updates/binds GPU
  • 4. What Is An “Effect” ? (Cont’)  In 2002 — Cg and CgFX created by NVIDIA — Microsoft followed on the idea, for HLSL : HLSLFx Check out NVIDIA SDK Samples & Microsoft SDK Samples  In 2013 : — Game Developers often have their own shader-builders — Cg 3.1 in maintenance mode… not expected to evolve Why ? Issues of maintenance… — Microsoft D3D Effect: No significant evolution
  • 5. Anatomy Of An Effect someFunction(args…) { Shader code } Samplers / Textures … someOtherFunction(args…) { Shader code } Technique myTechName { } Pass myPassName { } Render / Shader States Pass myPassName2 {…} Technique myTechName2 { … } Uniforms / Parameters Uniforms / Parameters … …
  • 6. Anatomy Of Effect’s Runtime Uniforms / Parameters someFunction(args…) { Shader code } Samplers / Textures Technique myTechName { } Pass myPassName { } Render / Shader States Pass myPassName2 {…} CPU GPU handle = loadEffect(…) handle = getXXX(…) setXXX(handle,…) Vertex Prg Fragment Prg Vertex Prg Fragment Prg … validatePass() executePass() Uniforms Effect DB … Create & send Render-states Bind/set
  • 7. Standard Effect design Application Parameters Shader func’s Effect file Texture Samplers Textures (D3D) Sampler-states Techniques Passes Render-states GPU Render states Shaders … Initialization Effect runtime Render loop Resources /uniforms • Set/Get parameters • Validate passes (builds shaders) • Bind textures/samplers • Activate (executes) a Pass
  • 8. Generic Effect Container : Motivations  Revive ‘Effect’ concept for today’s needs & HW  Be a Generic ‘Container’ for GLSL, D3D, Compute, OptiX…  Add new concepts and features (Add resource creation; etc.)  Use latest 3D API features (OpenGL 4.3 or DX11.x and >)  Help to simplify applications and C++ code  Runtime efficiency  Multi-Platform (Windows, Linux, OSX, iOS, Android)  Make it Open-Source
  • 9. What nvFx Can *Not* do  Few cool CgFX features not in nvFx — One unified language (Cg language) for all (D3D, OpenGL…) — CgFx Interfaces ( ~== Abstract classes)  nvFx can’t modify shading languages grammar — nvFx relies on GLSL, D3D, CUDA compilers  nvFx shader code not unified — OpenGL != GL-ES != D3D != CUDA features  Doesn’t sort and optimize Drawcalls for you  “Regal” could help on OpenGL <> GL-ES
  • 10. Potential User Target  Workstation CAD/DCC — Convenient to expose some programmability to the end-user — Helps for maintenance of heavy projects  Labs / research (Prototype for a Siggraph paper !) — Helps to perform rapid and flexible prototyping — Convenient for Demos, Samples showcasing Shaders  Games — Helps highly combinatorial Shaders — Avoids heavy pre-processor code (#ifdef/#else/#endif everywhere)
  • 11. nvFX Effect Integration Application nvFX runtime nvFX files Shader code Shader code Techs/passes … Techs/passes nvFX files Application nvFX runtime Techs/passes Techs/passes Shader code … Application nvFX runtime TTeecchhss//ppaassseess … Pre-compiled shaders C++ nvFX Effects nvFX files SShhaaddeerr c cooddee SShhaaddeerr c cooddee Pre-compiled shaders nvFxcc.exe –omyFx.cpp myFx.glslfx Make better diagram on details (loop, resource)
  • 12. API Design  Front-End : parser (Bison/Flex) — Parses the effect — Does not parse the shader/compute code in Modules !  Back-End : the library to build the effect data — Used by the Front-End to create parsed data — Used by the application to drive the effects  Works on PC, Android… iOS etc. Front-End (nvFX parser) Custom Grammar & Token API (C++ interfaces) C++ Back-End (nvFX runtime) Application Your Front-End Parser OpenGL DX CUDA Your Gfx API layer
  • 13. Inside An nvFX Effect GLSL-Compute DXCompute Resources nvFX file Sampler-states Uniform Parameters Techniques Passes New Pass-states Texture Bind point Render state-groups Shader Code Modules GLSL D3D CUDA (render targets) Frame buffers Constant Buffers Resources description CUDA/OptiX/Compute [shared] Memory
  • 14. Simple nvFX Example GLSLShader { #version 410 compatibility #extension GL_ARB_separate_shader_objects : enable … } GLSLShader ObjectVS { layout(location=0) in vec4 Position; layout(location=0) out vec3 v2fWorldNormal; void main() { … } } GLSLShader ObjectPS { layout(location=0) in vec3 v2fWorldNormal; Main() { … } } rasterization_state myRStates { POLYGON_MODE = FILL; … } sampler_state defaultSamplerState { TEXTURE_MIN_FILTER = LINEAR_MIPMAP_LINEAR; TEXTURE_MAG_FILTER = LINEAR; } Resource2D diffTex { samplerState = defaultSamplerState; defaultFile = "gargoyleMossyDiffuse.dds"; } technique BasicTechnique { pass p1 { rasterization_state = myRStates; samplerResource(diffSampler) = { diffTex, 0 }; VertexProgram = ObjectVS; FragmentProgram = ObjectPS; Uniform(attenuation) = 0.9; CurrentTarget = backbuffer; }
  • 15. Simple nvFX Example : On C++ Side Initialization:  Validate effect’s passes (Checks errors, compile shaders…)  Create/Gather any object we need for update (Uniforms to set etc.) Rendering Loop:  Loop in a Technique (taken from a material id, for example)  Set some Uniform values (projection matrix…)  Loop in the Passes  For each pass : ‘Execute’ it — Optionally update Uniforms/Cst Buffers afterward  Render your geometry
  • 16. Example : HDR Rendering With Glow 1 Scene Effect Render Skybox in HDR Render The Scene in HDR Down-scale the texture 2x, 4x Blur texture Horizontal Then Vertical 1 2 3 4 5 6 nvFx-managed 775 6 Scene Graph Material Effect 1 Metal Pass Material Effect 2 Plastic pass Other ‘Effects’… RGBA32F Texture (HDR) Compositing: tone-mapping And radial Blur 7 RGBA 32F Texture + Backbuffer 2 3 4 Resources
  • 17. Demo
  • 18. Example : Compute Post-Processing Scene Effect passes 1 Render Skybox Render The Scene Triggers CUDA / GLSL / DX-Compute Kernel Display result As a fullscreen Quad 2 3 4 Scene Graph Material Effect 1 Metal Pass Material Effect 2 Plastic pass Other ‘Effects’… nvFx-managed Resources RGBA Texture Backbuffer
  • 20. Fire (Navier-Stokes equations) Simulation passes Advect Color Advect Velocity Vorticity Confinement Emit (Gaussian ball) Fire Up-force Vel. divergence Comp. pressure Proj. Velocity Proj. Vel. edges Technique Rasterize Techniques passes 1 Volume depth Volume bound 1 Volume bound 2 2 Volume depth Smoke Ray-cast Water Ray-cast Fire Ray-cast 3 Rasterize result 4 nvFx-managed Resources
  • 21. Demo
  • 22. Experiment : Pure Ray Tracing With OptiX  Most OptiX runtime code — nvFx runtime  Most OptiX Shader code — In nvFx files — In CUDA/PTX files  nvFx Needs — OptiX NVIDIA SDK — Few OptiX setup from the application Scene Effect passes Triggers OptiX Context Display result As a fullscreen Quad 1 2 nvFx-managed Resources RGBA Texture Backbuffer
  • 23. Hybrid Rendering : Mixing OpenGL & OptiX Scene Effect passes 1 Render Skybox Render The Scene Triggers OptiX Ray Tracing For Reflections and shadow Compositing OpenGL + reflection & shadow 2 3 4 Scene Graph Material Effect 1 Metal Pass Material Effect 2 Plastic pass Other ‘Effects’… nvFx-managed resources
  • 24. Demo
  • 25. Example: GS Sparkling Effect 1 Scene Effect Render Scene For 2 targets Copy Texture To Backbuffer 1 2 Scene Graph Material Effect 1 Metal Pass Material Effect 2 Plastic pass Other ‘Effects’… RGBA8 Texture Backbuffer R32F Texture (depth) Render Sparkles With GS 3 2 3 nvFx-managed resources backbuffer
  • 27. Shader Code In Effect  GLSL, D3D, CUDA, GLSL-Compute, DX-Compute… Not Parsed  We rely on existing compilers — D3D Driver : for Gfx Shaders and Compute — GLSL OpenGL driver : for Gfx Shaders and Compute — CUDA compiler  nvFX invokes APIs to compile shaders — No redundant work — But nvFX doesn’t know what is inside (did not parse the code)  nvFxcc.exe : check errors (and will generate C++ code)
  • 28. Shader Code  Declared within a section : GLSLShader myShader { layout(location=0) in vec4 Position; void main(void) {…} } CUDAKernel Blur(unsigned int* data, int imgw,…) { …CUDA code… } D3D10Shader myD3DShader { …HLSL code… }
  • 29. Shared Code sections No name == is shared by all (implicit header) GLSLShader { // used by myVShader and myFShader #version 430 compatibility vec3 someVectorMath(vec3 a, vec3 b) {…} … } GLSLShader myVShader { Void Main() { … } } GLSLShader myFShader { Void Main() {…} } CUDACode { __device__ float clamp(float x, float a, float b); … } CUDACode CUDACode1 { … } CUDACode CUDACode2 { … }
  • 30. Techniques & Passes  A technique hosts passes. Nothing new  A Pass carries render-pipeline setup and actions • Clear mode (glClear mode…) • Clear color • Rendering Mode • Render Group Id • Blit action of a resource to a target • Current Target for rendering • Viewport Size • Swap of 2 resources • Loop count (to repeat passes) • Activate Pass On/Off • CUDA Module; Shared Mem. Grid/Block… • GLSL Compute Groups — References to State-Groups — Or direct References to render-states (old style as CgFX) — References to many Shaders (Vertex, Fragment etc.) — Value assignment to uniform parameters  GLSL sub-routine   each pass can setup a set of default uniform values — Connection of samplers/textures with resources & Sampler-states — Connection of images (ARB_shader_image_load_store) with resources — Lots of other special states to drive the runtime behavior
  • 31. Pass example Pass myPass { RasterizationState = myRasterState; POLYGON_MODE = {GL_FRONT_AND_BACK, GL_FILL}; VertexShader = {MainVtxProg, HelperFunctions, InputAttribFunc}; FragmentShader = MainFragmentShader FragmentShader<‘LightShaders’>= {LightSpotFunc, LightDirFunc,…}; Uniform(mySubroutineArray) = {sr_spot, sr_point, sr_dir}; Uniform(myOtherSubroutineArray[0]) = srFunc32; Uniform(myOtherSubroutineArray[1]) = srFunc6; Uniform(mySimpleUniform) = {1.3, 2.2, 5.2}; SamplerResource(quadSampler) = myRenderTexture; SamplerTexUnit(quadSampler) = 0; SamplerState(quadSampler) = nearestSampler; … } Clarify the “Pass” definition
  • 32. Linkage of Shader Modules  Pass : Link Shader Modules to a program Object — Done at Validation time — In Non-Separable Shader mode : 1 Pass hosts 1 program — In Separable Shader Mode: 1 Pass hosts many programs  OpenGL 4.2/4.3 : nvFx uses GLSL linkage  OpenGL ES: nvFx fakes linkage with concatenation VertexProgram = {VtxMain, ShaderHelpers, ShaderA, ShaderB, …}; FragmentProgram = {FragMain, ShaderHelpers, …}; …
  • 33. Linkage Of Shaders : Groups  We can group shaders by name : VertexShader = myVtxShaderMain; VertexShader<”Lighting”> = {VtxLight0, VtxLight1, …}  Groups allows to Change some behavior at runtime Example: 1. Gather the group of shaders named “Lighting” 2. Remove these shaders from the Pass (Pass’s program) 3. Add other shaders to this “Lighting” Group (for different lighting…) 4. Link the program with new Shader Objects
  • 34. Linkage Use-Case Example IA Same Shading design With OR without Tessellation Vtx Shader Body Fragment Shader attributes Attributes Abstration (a) Vertex Shader interpolators attributes Vertex Shader (passthrough) Hull (TCS) HW Tess. Attributes Abstration (b) Domain (TES) interpolators getNormal() … Attrib. passthrough abstraction
  • 35. Resources in nvFX  Visual Effects resources : often inter-dependent  Example : deferred shading — G-Buffer really depends on how the effect does deferred shading  Compute  Graphics : interaction through resources — Compute reading from a rendered image and writing into a Textures… — Compute kernels sometimes need temporary storage…  nvFx allows creation of resources within an effect
  • 36. Resource Creation And Use Create resources : RenderTexture myRTex1 { MSAA = {0,0}; Size = ApplicationDefined;// or {800,600}; Format = RGBA8; } RenderTexture myRTex2 { … } RenderBuffer myDST { MSAA = {0,0}; Size = ApplicationDefined;// or {800,600}; Format = DEPTH24STENCIL8; } Create Frame Buffer Object FBO myFBO { Color = { myRTex1, myRTex2 }; DST = myDST; } Use this in Passes CurrentTarget = myFBO;//(can be backbuffer) BlitFBOToActiveTarget = myFBOSrc; swapResources( mFBO1, myFBO2 ); samplerResource(mySampler) = myRTex1; You can query all from your Application, too
  • 37. Scene-Level / Multi-Level Effects  pre/post-processing are Effects, too : at scene level  Scene-level Effects and material Effects must be consistent — Deferred shading : Material RT’s must match the G-Buffer — Shadowing of the scene : must tell materials how to use Shadowing — Special scene lighting to tell material Shaders how to do lighting  nvFX Allows Effect (Scene-level) to override some Shader Modules of lower levels effects — lower Effect’s shaders code adapted for higher Effects  Leads to instances of shader programs matching scene-level passes
  • 38. Example of Scene-level override Scene-level Effect … Pass renderScene { ClearMode = all; FragmentProgramOverride<"out“> = forGBuff; FragmentProgramOverride<“light“> = noLight; CurrentTarget = myGBuffer; renderMode = render_scenegraph_shaded; } Pass deferredLighting { VertexProgram = deferredLightingVS; FragmentProgram = deferredLightingPS; renderMode = render_fullscreen_quad; CurrentTarget = backbuffer; } Material Effect in the scene … Pass myMatPass1 { VertexProgram = myVtxProg; FragmentProgram = {helpers, mainEntry}; FragmentProgram<out> = simpleOutput; FragmentProgram<light> = defaultLighting; … } New instance of myMatPass1 FragmentProgram = {helpers, mainEntry}; FragmentProgram<out> = forGBuff; FragmentProgram<light> = noLight;
  • 39. GLSLShader forGBuff { layout(location=0) out vec4 outColor; layout(location=1) out vec4 outNormal; void finalColor(vec3 normal, vec4 colorSrc, Example of Scene-level override Scene-level Effect … Pass renderScene { ClearMode = all; FragmentProgramOverride<"out“> = forGBuff; FragmentProgramOverride<“light“> = noLight; CurrentTarget = myGBuffer; renderMode = render_scenegraph_shaded; } Pass deferredLighting { VertexProgram = deferredLightingVS; FragmentProgram = deferredLightingPS; renderMode = render_fullscreen_quad; CurrentTarget = backbuffer; } Material Effect in the scene vec3 tc, vec3 p, int matID) … { Pass outNormal myMatPass1 = { … VertexProgram outColor … = myVtxProg; FragmentProgram … = {helpers, mainEntry}; FragmentProgram<} out> = simpleOutput; } FragmentProgram<light> = defaultLighting; … } New instance of myMatPass1 FragmentProgram = {helpers, mainEntry}; FragmentProgram<out> = forGBuff; FragmentProgram<light> = noLight; GLSLShader defaultLighting { void lighting_compute(LIGHTINFOS infos, inout LIGHTRES res) { …Some OpenGL-style lighting… } } GLSLShader mainEntry { void main() { … lighting_compute(lightInfos, res); … finalColor(N, color, tc, p, matID); } } GLSLShader simpleOutput { layout(location=0) out vec4 outColor; void finalColor(vec3 normal, vec4 colorSrc, vec3 tc, vec3 p, int matID) { outColor = colorSrc; } } GLSLShader noLight { void lighting_compute(LIGHTINFOS infos, inout LIGHTRES res) {/*empty*/} }
  • 40. Example of Scene-level override Scene-level Effect … Pass renderScene { ClearMode = all; FragmentProgramOverride<"out“> = forGBuff; FragmentProgramOverride<“light“> = noLight; CurrentTarget = myGBuffer; renderMode = render_scenegraph_shaded; } Pass deferredLighting { VertexProgram = deferredLightingVS; FragmentProgram = deferredLightingPS; renderMode = render_fullscreen_quad; CurrentTarget = backbuffer; } Material Effect in the scene … Pass myMatPass1 { VertexProgram = myVtxProg; FragmentProgram = {helpers, mainEntry}; FragmentProgram<out> = simpleOutput; FragmentProgram<light> = defaultLighting; … } New instance of myMatPass1 FragmentProgram = {helpers, mainEntry}; FragmentProgram<out> = forGBuff; FragmentProgram<light> = noLight;
  • 41. State Groups  The modern way to use renderstate : DX10/11 default way  OpenGL : maybe… extension — Rasterization States — Color Sample States — Depth-Stencil States Remove?  Define many of them in the effect : rasterization_state myRasterState1 { POINT_SIZE=1.2; …} rasterization_state myRasterState2 { CULL_FACE=FALSE; …} color_sample_state myCSState1 { BLEND=TRUE; ALPHA_TEST=FALSE;…} dst_state myDSTState { DEPTH_TEST=TRUE; DEPTH_WRITEMASK=TRUE;…}  State groups can then used in Passes
  • 42. Sampler States  Sampler state is an nvFx Object — Maintained by nvFX and mapped to the API — Eventually translated as GLSL Samplers state (extension)  Can be connected in a Pass or via Textures or Resources GLSLShader myShader { uniform sampler2D colorSampler; … } sampler_state mySamplerState { MIN_FILTER = GL_LINEAR_MIPMAP_LINEAR; MAG_FILTER = GL_NEAREST; }; Pass myPass { SamplerState(colorSampler) = mySamplerState ; }; REMOVE?
  • 43. Uniforms GLSLShader myFragShader { uniform vec3 diffCol; uniform sampler2D mySampler main() {…using diffCol… } } Target 1 Make them 1 SLIDE Application nvFX runtime createUniform() set…() update…() Uniform Binding point “diffCol” Load Effect & & initialize it GLSLShader myVtxShader { uniform vec3 diffCol; main() {…using diffCol… } } Target 2 (Other targets) createUniform() set…() update…() Uniform Binding point “foo” Effect Effect Obj.
  • 44. Uniforms GLSLShader myFragShader { ; uniform vec3 diffCol uniform sampler2D mySampler main() {…using diffCol… } } Target 1 Application nvFX runtime findUniform(‘diffCol’) Uniform set…() update…() Binding point “diffCol” Load Effect & & initialize it GLSLShader myVtxShader { ; main() {…using diffCol… } } Target 2 Effect Effect Obj. uniform vec3 diffCol : SEMDIFF;
  • 45. Uniforms Effect Effect Obj. uniform vec3 diffCol; GLSLShader myFShader { uniform sampler2D mySampler main() { …using diffCol… } } Target 1 Application nvFX runtime findUniform(‘diffCol’) set…() update…() Uniform Binding point “diffCol” Load Effect & & initialize it Technque tech1 { Pass p1 { fragmentShader = myFShader diffCol = {0.3, 0.5, 1.0}; } } Pass’s uniform Binding point “diffCol”
  • 46. Buffers of Uniforms (Buffer Objects)  Direct mapping to — OpenGL Uniform Buffer Object (UBO + GLSL std140) — D3D10/11 Cst Buffers (cbuffer token in HLSL)  A constant Buffer is made of uniforms — Can be targeted by a Uniform Object  Can have default values specified by nvFX code  Two ways for buffer’s resource creation : — application created : pass the handle to nvFX — nvFX creates the buffer for you
  • 47. Performances  Possible performance issues — Runtime implementation — Pass execution — Update of Uniform / Cst. Buffer / sampler / resource  More CPU optimization can be done (Open-Source helps) — This first version prioritizes nvFx’s proof of concept  Users will always need to be careful — Avoid too many pass executions — Avoid too many uniform update  NSight Custom Markers in nvFx
  • 48. Conclusion  Less code in Application  More flexibility  Consistency of Effect code. Helps for maintenance and creativity  Updated Effect paradigm for modern API’s  Open-Source approach to allow developers to — Easily debug it — Improve it — Customize it
  • 49. Questions ? Feedback welcome : tlorach@nvidia.com References: - http://developer.nvidia.com - https://github.com/p3/regal - https://github.com/tlorach/nvFX (Soon available)

Editor's Notes

  1. Effect filles + nvFX runtime + app 100% flexible. Good for prototyping and development process Precompiled Shaders + Effect files + App Checksum to make sure compiled shaders match effects Precompiled Shaders + { App + .C++ Translated Effects } Perfect for shipping in a game Hides the effect & shaders you don’t want to share Faster to load and execute
  2. Add missing modules (OptiX, CUDA…)
  3. ~2500 C++ lines of code saved More code on nvFX file More flexibility outside of the C++ compiled part
  4. Linkage is an offline action (validation time) As opposed to sub-routine case where the changes can be made at runtime (with an extra cost in the shader code)
  5. Basic way of doing: For each Pass of a scene, we call a “setupOverrides(ptech, N)”, with an array of sub-techniques that need instancing of their passes Each sub-technique will get a special instance of their pass depending on the override And only if necessary Each instance of those sub-techniques are identified with a Hash ID : the same ID that the main scene-technique will have given