├── Common
├── DXUT
│ ├── Core
│ │ ├── DXUT.cpp
│ │ ├── DXUTCore_2008.vcproj
│ │ ├── DXUTDevice11.cpp
│ │ ├── DXUTDevice9.cpp
│ │ ├── DXUTenum.cpp
│ │ └── DXUTmisc.cpp
│ └── Optional
│ │ ├── DXUTOptional_2008.vcproj
│ │ ├── DXUTShapes.cpp
│ │ ├── DXUTcamera.cpp
│ │ ├── DXUTgui.cpp
│ │ ├── DXUTguiIME.cpp
│ │ ├── DXUTlockfreepipe.h
│ │ ├── DXUTres.cpp
│ │ ├── DXUTsettingsdlg.cpp
│ │ ├── DXUTsettingsdlg.h
│ │ ├── ImeUi.cpp
│ │ ├── SDKmesh.cpp
│ │ ├── SDKmisc.cpp
│ │ ├── SDKsound.cpp
│ │ ├── SDKwavefile.cpp
│ │ └── directx.ico
├── DXUT10
│ ├── Core
│ │ ├── DXUT.cpp
│ │ ├── DXUT.h
│ │ ├── DXUTCore10_2008.vcproj
│ │ ├── DXUTenum.cpp
│ │ ├── DXUTenum.h
│ │ ├── DXUTmisc.cpp
│ │ ├── DXUTmisc.h
│ │ └── dpiaware.manifest
│ └── Optional
│ │ ├── DXUTOptional10_2008.vcproj
│ │ ├── DXUTShapes.cpp
│ │ ├── DXUTShapes.h
│ │ ├── DXUTcamera.cpp
│ │ ├── DXUTcamera.h
│ │ ├── DXUTgui.cpp
│ │ ├── DXUTgui.h
│ │ ├── DXUTguiIME.cpp
│ │ ├── DXUTguiIME.h
│ │ ├── DXUTlockfreepipe.h
│ │ ├── DXUTres.cpp
│ │ ├── DXUTres.h
│ │ ├── DXUTsettingsdlg.cpp
│ │ ├── DXUTsettingsdlg.h
│ │ ├── ImeUi.cpp
│ │ ├── ImeUi.h
│ │ ├── SDKmesh.cpp
│ │ ├── SDKmesh.h
│ │ ├── SDKmisc.cpp
│ │ ├── SDKmisc.h
│ │ ├── SDKsound.cpp
│ │ ├── SDKsound.h
│ │ ├── SDKwavefile.cpp
│ │ ├── SDKwavefile.h
│ │ └── directx.ico
├── Effects11
│ ├── Binary
│ │ ├── EffectBinaryFormat.h
│ │ ├── EffectStateBase11.h
│ │ ├── EffectStates11.h
│ │ └── SOParser.h
│ ├── D3DXCore
│ │ ├── d3dx11dbg.cpp
│ │ ├── d3dxGlobal.cpp
│ │ └── pchcore.h
│ ├── Effect.h
│ ├── EffectAPI.cpp
│ ├── EffectLoad.cpp
│ ├── EffectLoad.h
│ ├── EffectNonRuntime.cpp
│ ├── EffectReflection.cpp
│ ├── EffectRuntime.cpp
│ ├── EffectVariable.inl
│ ├── Effects11_2008.vcproj
│ ├── Inc
│ │ ├── D3dxGlobal.h
│ │ ├── d3dx11dbg.h
│ │ └── d3dx11effect.h
│ └── pchfx.h
├── FXC.props
├── FXC.rules
├── FXC.targets
├── FXC.xml
├── Release_2008.sln
└── nv_d3dh
│ ├── Buffer.cpp
│ ├── D3DH.vcproj
│ ├── D3DHelpers.cpp
│ ├── Pipeline.cpp
│ └── Quad.cpp
├── ConstantTimeGaussianBlur
├── Gaussian_2008.vcproj
├── doc
│ ├── ConstantTimeGaussian_SDKWhitePaper.doc
│ ├── ConstantTimeGaussian_SDKWhitePaper.pdf
│ ├── ConstantTimeGaussian_lg.jpg
│ ├── ConstantTimeGaussian_md.jpg
│ └── ConstantTimeGaussian_sm.jpg
├── gaussian.rc
├── gaussian_color_cs.fx
├── gaussian_mono_cs.fx
├── gaussian_vs_ps.fx
├── info.xml
├── main.cpp
├── resource.h
├── skybox11.cpp
├── skybox11.h
└── skybox11.hlsl
├── DiffuseGlobalIllumination
├── CoreLPVandRSM.cpp
├── Defines.h
├── DiffuseGlobalIllumination.rc
├── DiffuseGlobalIllumination_2008.vcproj
├── Grid.cpp
├── Hierarchy.hlsl
├── LPV.hlsl
├── LPV_Accumulate.hlsl
├── LPV_Accumulate4.hlsl
├── LPV_Propagate.hlsl
├── Lighting.cpp
├── Lighting.h
├── Mesh.cpp
├── Mesh.h
├── ReadMe.txt
├── ScreenQuad.hlsl
├── SimpleRT.h
├── SimpleShading.hlsl
├── doc
│ ├── DiffuseGlobalIllumination_lg.jpg
│ ├── DiffuseGlobalIllumination_md.jpg
│ └── DiffuseGlobalIllumination_sm.jpg
├── grid.h
├── info.xml
└── resource.h
├── FXAA
├── FXAA.cpp
├── FXAA.hlsl
├── FXAA.manifest
├── FXAA.rc
├── FXAA_2008.vcproj
├── FxaaShader.h
├── ModifiedJitteredShadowSampling.hlsl
├── doc
│ ├── FXAA_WhitePaper.docx
│ ├── FXAA_WhitePaper.pdf
│ ├── Fxaa_lg.png
│ ├── Fxaa_md.png
│ └── Fxaa_sm.png
├── info.xml
└── resource.h
├── GregoryAccTessellation11
├── BzrFile_stencil.cpp
├── Bzrfile_stencil.h
├── DynamicMesh.cpp
├── DynamicMesh.h
├── GPUPatchUtils.cpp
├── GPUPatchUtils.h
├── Globals.h
├── GregoryACC11.rc
├── GregoryACC11_2008.vcproj
├── GregoryACC11_WhitePaper.doc
├── IMesh.h
├── StaticMesh.cpp
├── StaticMesh.h
├── doc
│ ├── GregoryACC11_WhitePaper.doc
│ ├── GregoryACC11_WhitePaper.pdf
│ ├── GregoryACC11_lg.jpg
│ ├── GregoryACC11_md.jpg
│ ├── GregoryACC11_sm.jpg
│ ├── README.txt
│ └── screenshot.jpg
├── info.xml
├── main.cpp
├── readme.txt
├── resource.h
├── screenshot.jpg
└── typedef.h
├── Hair
├── Common.cpp
├── Common.h
├── DensityGrid.cpp
├── DensityGrid.h
├── Fluid.cpp
├── Fluid.h
├── FluidCommon.fxh
├── FluidSim.fx
├── Grid.cpp
├── Hair.cpp
├── Hair.fx
├── Hair.fxo
├── Hair.h
├── Hair.rc
├── Hair.vcproj
├── HairShadows.h
├── HairSimulateCS.hlsl
├── HairTextures
│ ├── HairSpecMap01.DDS
│ ├── HairSpecMap02.DDS
│ ├── HairSpecMap03.DDS
│ ├── HairSpecMap04.DDS
│ └── specNoise.dds
├── Hair_vc2008.vcproj
├── LoadHairFile.cpp
├── LongHairResources
│ ├── ClumpMapBarycentric.raw
│ ├── DensityMapBarycentric.raw
│ ├── Face.sdkmesh
│ ├── MeshAOMap.dds
│ ├── README.txt
│ ├── ScalpTexture.dds
│ ├── collision_objects.txt
│ ├── densityThicknessMapBarycentric.dds
│ ├── densityThicknessMapClump.dds
│ ├── full_model.sdkmesh
│ ├── full_model2.sdkmesh
│ ├── hair_vertices.txt
│ ├── hairbase.dds
│ ├── hairbaseBrown.dds
│ ├── hairbaseRed.dds
│ ├── scalp_mesh.sdkmesh
│ └── stiffnessMap.dds
├── ReadMe.txt
├── RecordedTransforms.txt
├── RecordedTransforms1.txt
├── RecordedTransforms2.txt
├── SimpleRT.h
├── doc
│ ├── HairSDKWhitePaper.doc
│ ├── HairSDKWhitePaper.pdf
│ ├── Hair_lg.png
│ ├── Hair_md.png
│ ├── Hair_sm.png
│ └── images
│ │ ├── Hair0.jpg
│ │ ├── Hair1.jpg
│ │ ├── Hair2.jpg
│ │ ├── Hair3.jpg
│ │ ├── Hair4.jpg
│ │ ├── Hair5.jpg
│ │ ├── Hair6.jpg
│ │ └── Hair7.jpg
├── grid.h
├── hair.txt
├── hairData.txt
├── info.xml
└── resource.h
├── Island11
├── Island11.cpp
├── Island11.fx
├── Island11.h
├── Island11.rc
├── Island11_2008.vcproj
├── common.fx
├── directx.ico
├── doc
│ ├── Island11_lg.jpg
│ ├── Island11_md.jpg
│ └── Island11_sm.jpg
├── info.xml
├── resource.h
├── terrain.cpp
└── terrain.h
├── MultiViewSoftShadows
├── MultiViewSoftShadows.cpp
├── MultiViewSoftShadows.h
├── MultiViewSoftShadows.manifest
├── MultiViewSoftShadows.rc
├── MultiViewSoftShadows_2008.vcproj
├── doc
│ ├── MultiViewSoftShadows.doc
│ ├── MultiViewSoftShadows.pdf
│ ├── MultiViewSoftShadows.wmv
│ ├── MultiViewSoftShadows_128.png
│ ├── MultiViewSoftShadows_256.png
│ ├── MultiViewSoftShadows_512.png
│ └── Readme.txt
├── info.xml
└── shaders
│ ├── MVSS_Common.hlsl
│ ├── MVSS_ForwardRendering.hlsl
│ ├── MVSS_ShadowMapRendering.hlsl
│ └── MVSS_ShadowMapVisualization.hlsl
├── OceanCS
├── CSFFT
│ ├── fft_512x512.h
│ ├── fft_512x512_c2c.cpp
│ └── fft_512x512_c2c.hlsl
├── OceanCS.rc
├── OceanCS_2008.vcproj
├── doc
│ ├── OceanCS_Slides.pdf
│ ├── OceanCS_Slides.pptx
│ ├── OceanCS_lg.jpg
│ ├── OceanCS_md.jpg
│ └── OceanCS_sm.jpg
├── info.xml
├── main.cpp
├── ocean_shading.hlsl
├── ocean_simulator.cpp
├── ocean_simulator.h
├── ocean_simulator_cs.hlsl
├── ocean_simulator_vs_ps.hlsl
├── render.cpp
├── resource.h
├── skybox11.cpp
├── skybox11.h
└── skybox11.hlsl
├── OpacityMapping
├── Camera.cpp
├── Camera.h
├── CameraState.bin
├── DepthReduction.fx
├── Floor.cpp
├── Floor.fx
├── Floor.h
├── Globals.fx
├── LightSource.cpp
├── LightSource.fx
├── LightSource.h
├── LineDraw.cpp
├── LineDraw.fx
├── LineDraw.h
├── LowResOffscreen.cpp
├── LowResOffscreen.fx
├── LowResOffscreen.h
├── Main.cpp
├── Main.fx
├── Main.fxo
├── OpacityMapping.fx
├── OpacityMapping.manifest
├── OpacityMapping.rc
├── OpacityMapping_2008.vcproj
├── OpaqueObject.cpp
├── OpaqueObject.fx
├── OpaqueObject.h
├── ParticleState.bin
├── ParticleSystem.cpp
├── ParticleSystem.fx
├── ParticleSystem.h
├── ScreenAlignedQuad.fx
├── SharedDefines.h
├── Util.cpp
├── Util.h
├── doc
│ ├── OpacityMappingSDKWhitePaper.docx
│ ├── OpacityMappingSDKWhitePaper.pdf
│ ├── OpacityMapping_lg.jpg
│ ├── OpacityMapping_md.jpg
│ └── OpacityMapping_sm.jpg
├── info.xml
└── resource.h
├── PNPatches
├── PNPatches.rc
├── PNPatches_2008.vcproj
├── Preprocessor.fx
├── PreprocessorCS.fx
├── ProgressBar.cpp
├── ProgressBar.h
├── common.fx
├── doc
│ ├── PNPatches_lg.jpg
│ ├── PNPatches_md.jpg
│ ├── PNPatches_sm.jpg
│ ├── pnpatches.doc
│ ├── pnpatches.pdf
│ └── readme.txt
├── info.xml
├── meshloader
│ ├── AllocHierarchy.cpp
│ ├── DX9AnimationLoader.cpp
│ ├── DX9AnimationLoader.h
│ ├── MultiAnimation.h
│ ├── MultiAnimationLib.cpp
│ └── bone_weights.h
├── mymath
│ ├── mymath.h
│ ├── mymath.vcproj
│ ├── mymath_2008.vcproj
│ ├── mymath_ext.cpp
│ ├── mymath_ext.h
│ └── tsort.hpp
├── mymesh.cpp
├── mymesh.h
├── mymesh_backedge.cpp
├── pnpatches.cpp
├── pnpatches.fx
├── pnpatches.fxh
├── pnpatches.h
├── resource.h
├── wsnormalmap.h
└── wsnormalmap_gpu.cpp
├── README.md
├── SSAO11
├── NVSDK_D3D11_SSAO
│ ├── HBAO_DX11_LIB.cpp
│ ├── HBAO_DX11_LIB.h
│ ├── HBAO_DX11_LIB_2008.vcproj
│ ├── NVSSAO
│ │ ├── NVSDK_D3D11_SSAO.h
│ │ ├── NVSDK_D3D11_SSAO_MD.lib
│ │ ├── NVSDK_D3D11_SSAO_MDd.lib
│ │ ├── NVSDK_D3D11_SSAO_MT.lib
│ │ └── NVSDK_D3D11_SSAO_MTd.lib
│ └── Shaders
│ │ ├── Bin
│ │ ├── BlurX_CS_0.h
│ │ ├── BlurX_CS_10.h
│ │ ├── BlurX_CS_12.h
│ │ ├── BlurX_CS_14.h
│ │ ├── BlurX_CS_16.h
│ │ ├── BlurX_CS_2.h
│ │ ├── BlurX_CS_4.h
│ │ ├── BlurX_CS_6.h
│ │ ├── BlurX_CS_8.h
│ │ ├── BlurY_CS_0.h
│ │ ├── BlurY_CS_10.h
│ │ ├── BlurY_CS_12.h
│ │ ├── BlurY_CS_14.h
│ │ ├── BlurY_CS_16.h
│ │ ├── BlurY_CS_2.h
│ │ ├── BlurY_CS_4.h
│ │ ├── BlurY_CS_6.h
│ │ ├── BlurY_CS_8.h
│ │ ├── Blur_Composite.h
│ │ ├── DownsampleDepth_PS.h
│ │ ├── FullScreenTriangle_VS.h
│ │ ├── HBAOX_CS_1.h
│ │ ├── HBAOX_CS_2.h
│ │ ├── HBAOX_CS_3.h
│ │ ├── HBAOX_CS_4.h
│ │ ├── HBAOX_CS_5.h
│ │ ├── HBAOX_CS_6.h
│ │ ├── HBAOX_CS_7.h
│ │ ├── HBAOX_CS_8.h
│ │ ├── HBAOY_CS_1.h
│ │ ├── HBAOY_CS_2.h
│ │ ├── HBAOY_CS_3.h
│ │ ├── HBAOY_CS_4.h
│ │ ├── HBAOY_CS_5.h
│ │ ├── HBAOY_CS_6.h
│ │ ├── HBAOY_CS_7.h
│ │ ├── HBAOY_CS_8.h
│ │ ├── HBAO_PS.h
│ │ ├── LinearizeDepthNoMSAA_PS.h
│ │ ├── ResolveAndLinearizeDepthMSAA_PS.h
│ │ ├── UpsampleAndBlurX_CS_0.h
│ │ ├── UpsampleAndBlurX_CS_10.h
│ │ ├── UpsampleAndBlurX_CS_12.h
│ │ ├── UpsampleAndBlurX_CS_14.h
│ │ ├── UpsampleAndBlurX_CS_16.h
│ │ ├── UpsampleAndBlurX_CS_2.h
│ │ ├── UpsampleAndBlurX_CS_4.h
│ │ ├── UpsampleAndBlurX_CS_6.h
│ │ └── UpsampleAndBlurX_CS_8.h
│ │ ├── Source
│ │ ├── BlurX_CS.hlsl
│ │ ├── BlurY_CS.hlsl
│ │ ├── Blur_Common.hlsl
│ │ ├── Blur_Composite_PS.hlsl
│ │ ├── ConstantBuffer.hlsl
│ │ ├── DownsampleDepth_PS.hlsl
│ │ ├── FullScreenTriangle_VS.hlsl
│ │ ├── HBAO_CS.hlsl
│ │ ├── HBAO_PS.hlsl
│ │ ├── LinearizeDepthNoMSAA_PS.hlsl
│ │ └── ResolveAndLinearizeDepthMSAA_PS.hlsl
│ │ ├── compile_all.bat
│ │ ├── compile_blur.bat
│ │ ├── compile_hbao.bat
│ │ ├── fxc.exe
│ │ ├── helper_blur_cs.bat
│ │ └── helper_hbao_cs.bat
├── SSAO11.cpp
├── SSAO11.manifest
├── SSAO11.rc
├── SSAO11_2008.vcproj
├── Scene3D.cpp
├── Scene3D.fx
├── Scene3D.h
├── SceneBinFile.h
├── doc
│ ├── SSAO11.docx
│ ├── SSAO11.pdf
│ ├── SSAO11.wmv
│ ├── SSAO11_128.png
│ ├── SSAO11_256.png
│ └── SSAO11_512.png
└── info.xml
├── Samples_2008.sln
├── ShowTessellationPatterns
├── PatternMain.cpp
├── TessPattern.hlsl
├── TessPattern.rc
├── TessPattern11_2008.vcproj
├── doc
│ ├── README.txt
│ ├── ShowTessellationPatterns_lg.jpg
│ ├── ShowTessellationPatterns_md.jpg
│ └── ShowTessellationPatterns_sm.jpg
├── info.xml
└── resource.h
├── StereoIssues
├── Scene.h
├── StanfordBunnyScene.h
├── StanfordBunnyScene10.fx
├── StereoIssues.cpp
├── StereoIssues.rc
├── StereoIssues_2008.vcproj
├── doc
│ ├── 3DV - BestPracticesGuide.pdf
│ ├── StereoIssues_lg.jpg
│ ├── StereoIssues_md.jpg
│ └── StereoIssues_sm.jpg
├── info.xml
├── nvapi.h
├── nvapi.lib
├── nvstereo.cpp
├── nvstereo.h
└── resource.h
├── StochasticTransparency
├── BaseTechnique.h
├── BaseTechnique.hlsl
├── DualDepthPeeling11.h
├── DualDepthPeeling11.hlsl
├── MersenneTwister.h
├── OIT.manifest
├── OIT.rc
├── PlainAlphaBlending.h
├── PlainAlphaBlending.hlsl
├── RandomColors.h
├── Scene.h
├── SimpleRT.h
├── StochasticTransparency11.h
├── StochasticTransparency11.hlsl
├── StochasticTransparency_2008.vcproj
├── doc
│ ├── ConstantMemoryOIT.pdf
│ ├── StochasticTransparency_128.png
│ ├── StochasticTransparency_256.png
│ └── StochasticTransparency_512.png
└── main.cpp
├── TerrainTessellation
├── Common.fxh
├── Deformation.fx
├── Doc
│ ├── TerrainTessellation_WhitePaper.docx
│ ├── TerrainTessellation_WhitePaper.pdf
│ ├── TerrainTessellation_lg.jpg
│ ├── TerrainTessellation_md.jpg
│ ├── TerrainTessellation_sm.jpg
│ └── TriangleSizeVsPerf.xlsx
├── INoise.fxh
├── Picking.fx
├── SkyBox11.cpp
├── SkyBox11.h
├── SkyBox11.hlsl
├── Stars.cpp
├── Stars.fx
├── Stars.h
├── TerrainTessellation.cpp
├── TerrainTessellation.fx
├── TerrainTessellation.manifest
├── TerrainTessellation.rc
├── TerrainTessellation_2008.vcproj
├── TileRing.cpp
├── TileRing.h
├── Wireframe.fx
├── info.xml
└── resource.h
└── nBodyCS
├── RenderParticles.hlsl
├── UpdateParticlesCS.hlsl
├── doc
├── nBodyCS_lg.jpg
├── nBodyCS_md.jpg
├── nBodyCS_sm.jpg
└── readme.txt
├── info.xml
├── nBodyCS.cpp
├── nBodyCS.h
├── nBodyCS.hlsl
├── nBodyCS.manifest
├── nBodyCS.rc
├── nBodyCS_2008.vcproj
├── nBodySystemCS.cpp
├── nBodySystemCS.h
└── resource.h
/Common/DXUT/Optional/directx.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Common/DXUT/Optional/directx.ico
--------------------------------------------------------------------------------
/Common/DXUT10/Core/dpiaware.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Common/DXUT10/Optional/DXUTShapes.h:
--------------------------------------------------------------------------------
1 | //--------------------------------------------------------------------------------------
2 | // File: DXUTShapes.h
3 | //
4 | // Shape creation functions for DXUT
5 | //
6 | // Copyright (c) Microsoft Corporation. All rights reserved
7 | //--------------------------------------------------------------------------------------
8 | #pragma once
9 | #ifndef DXUT_SHAPES_H
10 | #define DXUT_SHAPES_H
11 |
12 | HRESULT WINAPI DXUTCreateBox( ID3D10Device* pDevice, float fWidth, float fHeight, float fDepth, ID3DX10Mesh** ppMesh );
13 | HRESULT WINAPI DXUTCreateCylinder( ID3D10Device* pDevice, float fRadius1, float fRadius2, float fLength, UINT uSlices,
14 | UINT uStacks, ID3DX10Mesh** ppMesh );
15 | HRESULT WINAPI DXUTCreatePolygon( ID3D10Device* pDevice, float fLength, UINT uSides, ID3DX10Mesh** ppMesh );
16 | HRESULT WINAPI DXUTCreateSphere( ID3D10Device* pDevice, float fRadius, UINT uSlices, UINT uStacks,
17 | ID3DX10Mesh** ppMesh );
18 | HRESULT WINAPI DXUTCreateTorus( ID3D10Device* pDevice, float fInnerRadius, float fOuterRadius, UINT uSides,
19 | UINT uRings, ID3DX10Mesh** ppMesh );
20 | HRESULT WINAPI DXUTCreateTeapot( ID3D10Device* pDevice, ID3DX10Mesh** ppMesh );
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/Common/DXUT10/Optional/DXUTres.h:
--------------------------------------------------------------------------------
1 | //----------------------------------------------------------------------------
2 | // File: dxutres.h
3 | //
4 | // Functions to create DXUT media from arrays in memory
5 | //
6 | // Copyright (c) Microsoft Corp. All rights reserved.
7 | //-----------------------------------------------------------------------------
8 | #pragma once
9 | #ifndef DXUT_RES_H
10 | #define DXUT_RES_H
11 |
12 | HRESULT WINAPI DXUTCreateGUITextureFromInternalArray9( LPDIRECT3DDEVICE9 pd3dDevice, IDirect3DTexture9** ppTexture,
13 | D3DXIMAGE_INFO* pInfo );
14 | HRESULT WINAPI DXUTCreateGUITextureFromInternalArray10( ID3D10Device* pd3dDevice, ID3D10Texture2D** ppTexture,
15 | D3DX10_IMAGE_INFO* pInfo );
16 | HRESULT WINAPI DXUTCreateArrowMeshFromInternalArray( LPDIRECT3DDEVICE9 pd3dDevice, ID3DXMesh** ppMesh );
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/Common/DXUT10/Optional/SDKwavefile.h:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // File: WaveFile.h
3 | //
4 | // Copyright (c) Microsoft Corp. All rights reserved.
5 | //-----------------------------------------------------------------------------
6 | #ifndef DXUTWAVEFILE_H
7 | #define DXUTWAVEFILE_H
8 |
9 | //-----------------------------------------------------------------------------
10 | // Typing macros
11 | //-----------------------------------------------------------------------------
12 | #define WAVEFILE_READ 1
13 | #define WAVEFILE_WRITE 2
14 |
15 | //-----------------------------------------------------------------------------
16 | // Name: class CWaveFile
17 | // Desc: Encapsulates reading or writing sound data to or from a wave file
18 | //-----------------------------------------------------------------------------
19 | class CWaveFile
20 | {
21 | public:
22 | WAVEFORMATEX* m_pwfx; // Pointer to WAVEFORMATEX structure
23 | HMMIO m_hmmio; // MM I/O handle for the WAVE
24 | MMCKINFO m_ck; // Multimedia RIFF chunk
25 | MMCKINFO m_ckRiff; // Use in opening a WAVE file
26 | DWORD m_dwSize; // The size of the wave file
27 | MMIOINFO m_mmioinfoOut;
28 | DWORD m_dwFlags;
29 | BOOL m_bIsReadingFromMemory;
30 | BYTE* m_pbData;
31 | BYTE* m_pbDataCur;
32 | ULONG m_ulDataSize;
33 | CHAR* m_pResourceBuffer;
34 |
35 | protected:
36 | HRESULT ReadMMIO();
37 | HRESULT WriteMMIO( WAVEFORMATEX* pwfxDest );
38 |
39 | public:
40 | CWaveFile();
41 | ~CWaveFile();
42 |
43 | HRESULT Open( LPWSTR strFileName, WAVEFORMATEX* pwfx, DWORD dwFlags );
44 | HRESULT OpenFromMemory( BYTE* pbData, ULONG ulDataSize, WAVEFORMATEX* pwfx, DWORD dwFlags );
45 | HRESULT Close();
46 |
47 | HRESULT Read( BYTE* pBuffer, DWORD dwSizeToRead, DWORD* pdwSizeRead );
48 | HRESULT Write( UINT nSizeToWrite, BYTE* pbData, UINT* pnSizeWrote );
49 |
50 | DWORD GetSize();
51 | HRESULT ResetFile();
52 | WAVEFORMATEX* GetFormat()
53 | {
54 | return m_pwfx;
55 | };
56 | };
57 |
58 |
59 | #endif // DXUTWAVEFILE_H
60 |
--------------------------------------------------------------------------------
/Common/DXUT10/Optional/directx.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Common/DXUT10/Optional/directx.ico
--------------------------------------------------------------------------------
/Common/Effects11/Binary/EffectStateBase11.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (C) 2009 Microsoft Corporation. All Rights Reserved.
4 | //
5 | // File: EffectStateBase11.h
6 | // Content: D3D@11 Effects States Header
7 | //
8 | //////////////////////////////////////////////////////////////////////////////
9 |
10 | #pragma once
11 |
12 | namespace D3DX11Effects
13 | {
14 |
15 | //////////////////////////////////////////////////////////////////////////
16 | // Effect HLSL states and late resolve lists
17 | //////////////////////////////////////////////////////////////////////////
18 |
19 | struct RValue
20 | {
21 | const char *m_pName;
22 | UINT m_Value;
23 | };
24 |
25 | #define RVALUE_END() { NULL, 0 }
26 | #define RVALUE_ENTRY(prefix, x) { #x, prefix##x }
27 |
28 | enum ELhsType;
29 |
30 | struct LValue
31 | {
32 | const char *m_pName; // name of the LHS side of expression
33 | EBlockType m_BlockType; // type of block it can appear in
34 | D3D10_SHADER_VARIABLE_TYPE m_Type; // data type allows
35 | UINT m_Cols; // number of [m_Type]'s required (1 for a scalar, 4 for a vector)
36 | UINT m_Indices; // max index allowable (if LHS is an array; otherwise this is 1)
37 | BOOL m_VectorScalar; // can be both vector and scalar (setting as a scalar sets all m_Indices values simultaneously)
38 | CONST RValue *m_pRValue; // pointer to table of allowable RHS "late resolve" values
39 | ELhsType m_LhsType; // ELHS_* enum value that corresponds to this entry
40 | UINT m_Offset; // offset into the given block type where this value should be written
41 | UINT m_Stride; // for vectors, byte stride between two consecutive values. if 0, m_Type's size is used
42 | };
43 |
44 | #define LVALUE_END() { NULL, D3D10_SVT_UINT, 0, 0, 0, NULL }
45 |
46 | extern CONST LValue g_lvGeneral[];
47 | extern CONST UINT g_lvGeneralCount;
48 |
49 | } // end namespace D3DX11Effects
50 |
--------------------------------------------------------------------------------
/Common/Effects11/D3DXCore/d3dx11dbg.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (C) 2009 Microsoft Corporation. All Rights Reserved.
4 | //
5 | // File: d3dx11dbg.cpp
6 | // Content: D3DX11 Effects debugging functions
7 | //
8 | ///////////////////////////////////////////////////////////////////////////
9 |
10 | #include "pchcore.h"
11 |
12 |
13 | #ifdef FXDPF
14 |
15 | //
16 | // DPF
17 | //
18 |
19 | void cdecl D3DXDebugPrintf(UINT lvl, LPCSTR szFormat, ...)
20 | {
21 | static UINT uDebugLevel = (UINT) -1;
22 |
23 | char strA[4096];
24 | char strB[4096];
25 |
26 | va_list ap;
27 | va_start(ap, szFormat);
28 | StringCchVPrintfA(strA, sizeof(strA), szFormat, ap);
29 | strA[4095] = '\0';
30 | va_end(ap);
31 |
32 | StringCchPrintfA(strB, sizeof(strB), "Effects11: %s\r\n", strA);
33 |
34 | strB[4095] = '\0';
35 |
36 | OutputDebugStringA(strB);
37 | }
38 | #else
39 | // This is defined so warning LNK4211 is not generated (object file has no public symbols)
40 | void cdecl D3DXDebugPrintf(UINT lvl, LPCSTR szFormat, ...) {}
41 | #endif
42 |
43 |
44 | //
45 | // D3DXASSERT
46 | //
47 |
48 | #ifdef _DEBUG
49 |
50 | int WINAPI D3DXDebugAssert(LPCSTR szFile, int nLine, LPCSTR szCondition)
51 | {
52 | char str[512];
53 |
54 | // Print message to debug console
55 | StringCchPrintfA(str, sizeof(str), "Assertion failure! (%s %d): %s\r\n", szFile, nLine, szCondition);
56 | str[511] = 0;
57 | OutputDebugStringA(str);
58 |
59 | return 0;
60 | }
61 | #endif
62 |
63 |
--------------------------------------------------------------------------------
/Common/Effects11/D3DXCore/pchcore.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (C) 2001 Microsoft Corporation. All Rights Reserved.
4 | //
5 | // File: pchcore.h
6 | // Content: D3DX11 core precompiled header
7 | //
8 | //////////////////////////////////////////////////////////////////////////////
9 |
10 | #ifndef __D3DX11CORE_PCHCORE_H__
11 | #define __D3DX11CORE_PCHCORE_H__
12 |
13 | #include "usp10.h"
14 |
15 | #include "d3d11.h"
16 | #include "d3dx11.h"
17 |
18 | #include "D3dxGlobal.h"
19 |
20 | #endif //__D3DX11CORE_PCHCORE_H__
21 |
--------------------------------------------------------------------------------
/Common/Effects11/EffectAPI.cpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (C) 2009 Microsoft Corporation. All Rights Reserved.
4 | //
5 | // File: EffectAPI.cpp
6 | // Content: D3DX11 Effect DLL entry points
7 | //
8 | //////////////////////////////////////////////////////////////////////////////
9 |
10 | #include "pchfx.h"
11 |
12 | using namespace D3DX11Effects;
13 |
14 | HRESULT WINAPI D3DX11CreateEffectFromMemory(void *pData, SIZE_T DataLength, UINT FXFlags, ID3D11Device *pDevice, ID3DX11Effect **ppEffect)
15 | {
16 | HRESULT hr = S_OK;
17 |
18 | // Note that pData must point to a compiled effect, not HLSL
19 | VN( *ppEffect = NEW CEffect( FXFlags & D3DX11_EFFECT_RUNTIME_VALID_FLAGS) );
20 | VH( ((CEffect*)(*ppEffect))->LoadEffect(pData, static_cast(DataLength)) );
21 | VH( ((CEffect*)(*ppEffect))->BindToDevice(pDevice) );
22 |
23 | lExit:
24 | if (FAILED(hr))
25 | {
26 | SAFE_RELEASE(*ppEffect);
27 | }
28 | return hr;
29 | }
30 |
--------------------------------------------------------------------------------
/Common/Effects11/Inc/d3dx11dbg.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (C) 2009 Microsoft Corporation. All Rights Reserved.
4 | //
5 | // File: d3dx11dbg.h
6 | // Content: D3DX11 debugging functions
7 | //
8 | //////////////////////////////////////////////////////////////////////////////
9 |
10 |
11 | #ifndef __D3DX11DBG_H__
12 | #define __D3DX11DBG_H__
13 |
14 | #ifndef _PREFAST_
15 |
16 | #pragma warning( disable: 4068 )
17 |
18 | #endif
19 |
20 |
21 | #include
22 | #include
23 |
24 | #undef NEW
25 | #undef DELETE
26 |
27 | #define NEW new (std::nothrow)
28 | #define NEW_PROTO_ARGS size_t s, const std::nothrow_t& t
29 |
30 |
31 |
32 | typedef signed char INT8;
33 | typedef signed short INT16;
34 | typedef unsigned char UINT8;
35 | typedef unsigned short UINT16;
36 |
37 |
38 | //----------------------------------------------------------------------------
39 | // DPF
40 | //----------------------------------------------------------------------------
41 |
42 | #ifdef FXDPF
43 | void cdecl D3DXDebugPrintf(UINT lvl, LPCSTR szFormat, ...);
44 | #define DPF D3DXDebugPrintf
45 | #else // !FXDPF
46 | #pragma warning(disable:4002)
47 | #define DPF() 0
48 | #endif // !FXDPF
49 |
50 |
51 | //----------------------------------------------------------------------------
52 | // D3DXASSERT
53 | //----------------------------------------------------------------------------
54 |
55 | #if _DEBUG
56 | int WINAPI D3DXDebugAssert(LPCSTR szFile, int nLine, LPCSTR szCondition);
57 | #define D3DXASSERT(condition) \
58 | do { if(!(condition)) D3DXDebugAssert(__FILE__, __LINE__, #condition); } while(0)
59 | #else // !_DEBUG
60 | #define D3DXASSERT(condition) 0
61 | #endif // !_DEBUG
62 |
63 |
64 |
65 | #endif // __D3DX11DBG_H__
66 |
67 |
--------------------------------------------------------------------------------
/Common/Effects11/pchfx.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////
2 | //
3 | // Copyright (C) 2001 Microsoft Corporation. All Rights Reserved.
4 | //
5 | // File: pchfx.h
6 | // Content: D3D shader effects precompiled header
7 | //
8 | //////////////////////////////////////////////////////////////////////////////
9 |
10 | #ifndef __D3DX11_PCHFX_H__
11 | #define __D3DX11_PCHFX_H__
12 |
13 | #include "d3d11.h"
14 | #include "d3dx11.h"
15 | #undef DEFINE_GUID
16 | #include "INITGUID.h"
17 | #include "d3dx11effect.h"
18 |
19 | #define UNUSED -1
20 |
21 | //////////////////////////////////////////////////////////////////////////
22 |
23 | #define offsetof_fx( a, b ) (UINT)offsetof( a, b )
24 |
25 | #include "d3dxGlobal.h"
26 |
27 | #include
28 | #include
29 |
30 | #include "Effect.h"
31 | #include "EffectStateBase11.h"
32 | #include "EffectLoad.h"
33 |
34 | #include "D3DCompiler.h"
35 |
36 | //////////////////////////////////////////////////////////////////////////
37 |
38 | namespace D3DX11Effects
39 | {
40 | } // end namespace D3DX11Effects
41 |
42 | #endif // __D3DX11_PCHFX_H__
43 |
--------------------------------------------------------------------------------
/Common/FXC.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 | Midl
6 | CustomBuild
7 |
8 |
9 | _SelectedFiles;$(FXCDependsOn)
11 |
12 |
13 |
14 | true
15 | False
16 | False
17 | False
18 | False
19 | False
20 | $(IntDir)
21 |
22 | 0
23 | fxc.exe [output] [target] [strict] [compat] [perf] [noopt] [nopre] [child] [Inputs]
24 | [outputdir]\%(Filename).o
25 | Executing tool...
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Common/nv_d3dh/Buffer.cpp:
--------------------------------------------------------------------------------
1 | #include "PrecompiledHeader.h"
2 | #include "Buffer.h"
3 | #include
4 |
5 | using namespace d3d11;
6 |
7 |
8 | /////////////////////////////////////////////////////////////////////////////////
9 | ////
10 | void d3d11::IndexBuffer::Attach(ID3D11DeviceContext* pContext)
11 | {
12 | if(pContext == 0)
13 | throw std::runtime_error("IndexBuffer::Attach(): zero immediate context pointer");
14 |
15 | uint offset = 0;
16 | uint stride = sizeof(uint);
17 |
18 | pContext->IASetIndexBuffer(m_pD3DBuffer, DXGI_FORMAT_R32_UINT, 0);
19 | }
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Common/nv_d3dh/D3DHelpers.cpp:
--------------------------------------------------------------------------------
1 | #include "PrecompiledHeader.h"
2 | #include "D3DHelpers.h"
3 |
4 | std::wstring ToWideString(const char* pStr)
5 | {
6 | int len = strlen(pStr);
7 |
8 | //ASSERT_PTR( pStr ) ;
9 | //ASSERT( len >= 0 || len == -1 , _T("Invalid string length: ") << len ) ;
10 |
11 | // figure out how many wide characters we are going to get
12 |
13 | int nChars = MultiByteToWideChar( CP_ACP , 0 , pStr , len , NULL , 0 ) ;
14 | if ( len == -1 )
15 | -- nChars ;
16 | if ( nChars == 0 )
17 | return L"" ;
18 |
19 | // convert the narrow string to a wide string
20 | // nb: slightly naughty to write directly into the string like this
21 | std::wstring buf ;
22 | buf.resize( nChars ) ;
23 | MultiByteToWideChar( CP_ACP , 0 , pStr , len ,
24 | const_cast(buf.c_str()) , nChars ) ;
25 |
26 | return buf ;
27 | }
28 |
29 |
30 | std::string ToNarrowString(const wchar_t* pStr)
31 | {
32 | int len = wcslen(pStr);
33 | //ASSERT( pStr!=0 ) ;
34 | //ASSERT( len >= 0 || len == -1 , _T("Invalid string length: ") << len ) ;
35 |
36 | // figure out how many narrow characters we are going to get
37 |
38 | int nChars = WideCharToMultiByte( CP_ACP , 0 ,
39 | pStr , len , NULL , 0 , NULL , NULL ) ;
40 | if ( len == -1 )
41 | -- nChars ;
42 | if ( nChars == 0 )
43 | return "" ;
44 |
45 | // convert the wide string to a narrow string
46 |
47 | // nb: slightly naughty to write directly into the string like this
48 |
49 | std::string buf ;
50 | buf.resize( nChars ) ;
51 | WideCharToMultiByte( CP_ACP , 0 , pStr , len ,
52 | const_cast(buf.c_str()) , nChars , NULL , NULL ) ;
53 |
54 | return buf ;
55 | }
56 |
57 | void ThrowStdRuntimeError(const char* file, int line, const char* err_msg)
58 | {
59 | char lineStr[64];
60 |
61 | _itoa(line,lineStr,10);
62 |
63 | throw std::runtime_error( std::string("file: ") + std::string(file) +
64 | std::string(", line: ") + lineStr + std::string(": ") + err_msg);
65 | }
66 |
67 | /*static void ThrowStdRuntimeError(const wchar_t* file, int line, const wchar_t* err_msg)
68 | {
69 | char lineStr[64];
70 | _itoa(line,lineStr,10);
71 |
72 | std::string fileName = ToNarrowString(file);
73 | std::string errMsg = ToNarrowString(file);
74 |
75 | throw std::runtime_error( std::string("file: ") + fileName +
76 | std::string(", line: ") + lineStr + std::string(": ") + errMsg);
77 | }*/
78 |
79 | void ThrowStdRuntimeErrorU(const wchar_t* file, int line, const wchar_t* err_msg)
80 | {
81 | char lineStr[64];
82 | _itoa(line,lineStr,10);
83 |
84 | std::string fileName = ToNarrowString(file);
85 | std::string errMsg = ToNarrowString(err_msg);
86 |
87 | throw std::runtime_error( std::string("file: ") + fileName +
88 | std::string(", line: ") + lineStr + std::string(": ") + errMsg);
89 | }
90 |
--------------------------------------------------------------------------------
/ConstantTimeGaussianBlur/doc/ConstantTimeGaussian_SDKWhitePaper.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/ConstantTimeGaussianBlur/doc/ConstantTimeGaussian_SDKWhitePaper.doc
--------------------------------------------------------------------------------
/ConstantTimeGaussianBlur/doc/ConstantTimeGaussian_SDKWhitePaper.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/ConstantTimeGaussianBlur/doc/ConstantTimeGaussian_SDKWhitePaper.pdf
--------------------------------------------------------------------------------
/ConstantTimeGaussianBlur/doc/ConstantTimeGaussian_lg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/ConstantTimeGaussianBlur/doc/ConstantTimeGaussian_lg.jpg
--------------------------------------------------------------------------------
/ConstantTimeGaussianBlur/doc/ConstantTimeGaussian_md.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/ConstantTimeGaussianBlur/doc/ConstantTimeGaussian_md.jpg
--------------------------------------------------------------------------------
/ConstantTimeGaussianBlur/doc/ConstantTimeGaussian_sm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/ConstantTimeGaussianBlur/doc/ConstantTimeGaussian_sm.jpg
--------------------------------------------------------------------------------
/ConstantTimeGaussianBlur/gaussian.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #define IDC_STATIC -1
11 | #include
12 |
13 |
14 | /////////////////////////////////////////////////////////////////////////////
15 | #undef APSTUDIO_READONLY_SYMBOLS
16 |
17 | /////////////////////////////////////////////////////////////////////////////
18 | // English (U.S.) resources
19 |
20 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
21 | #ifdef _WIN32
22 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
23 | #pragma code_page(1252)
24 | #endif //_WIN32
25 |
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // Icon
29 | //
30 |
31 | // Icon with lowest ID value placed first to ensure application icon
32 | // remains consistent on all systems.
33 | IDI_MAIN_ICON ICON "..\\..\\media\\directx.ico"
34 |
35 | #ifdef APSTUDIO_INVOKED
36 | /////////////////////////////////////////////////////////////////////////////
37 | //
38 | // TEXTINCLUDE
39 | //
40 |
41 | 1 TEXTINCLUDE
42 | BEGIN
43 | "resource.h\0"
44 | END
45 |
46 | 2 TEXTINCLUDE
47 | BEGIN
48 | "#define IDC_STATIC -1\r\n"
49 | "#include \r\n"
50 | "\r\n"
51 | "\r\n"
52 | "\0"
53 | END
54 |
55 | 3 TEXTINCLUDE
56 | BEGIN
57 | "\r\n"
58 | "\0"
59 | END
60 |
61 | #endif // APSTUDIO_INVOKED
62 |
63 | #endif // English (U.S.) resources
64 | /////////////////////////////////////////////////////////////////////////////
65 |
66 |
67 |
68 | #ifndef APSTUDIO_INVOKED
69 | /////////////////////////////////////////////////////////////////////////////
70 | //
71 | // Generated from the TEXTINCLUDE 3 resource.
72 | //
73 |
74 |
75 | /////////////////////////////////////////////////////////////////////////////
76 | #endif // not APSTUDIO_INVOKED
77 |
78 |
--------------------------------------------------------------------------------
/ConstantTimeGaussianBlur/info.xml:
--------------------------------------------------------------------------------
1 |
2 | Constant Time Gaussian Blur
3 | Lin Nan
4 | DirectX 11
5 |
6 | Source\ConstantTimeGaussianBlur
7 | doc\ConstantTimeGaussian_sm.jpg
8 | doc\ConstantTimeGaussian_md.jpg
9 | doc\ConstantTimeGaussian_lg.jpg
10 |
11 |
12 |
13 | Bin\ConstantTimeGaussianBlur.exe
14 | GeForce GTX 400
15 | Compute Shader, Image Processing
16 | 3D Graphics
17 | 110304
18 |
19 | ..\..\media\GaussianBlur
20 | ..\..\media\UI
21 | ..\ConstantTimeGaussianBlur
22 |
23 |
24 |
--------------------------------------------------------------------------------
/ConstantTimeGaussianBlur/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Gaussian.rc
4 | //
5 | #define IDI_MAIN_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 113
12 | #define _APS_NEXT_COMMAND_VALUE 40029
13 | #define _APS_NEXT_CONTROL_VALUE 1000
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/ConstantTimeGaussianBlur/skybox11.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef _SKYBOX11_H
16 | #define _SKYBOX11_H
17 |
18 | class CSkybox11
19 | {
20 | public:
21 | CSkybox11();
22 |
23 | HRESULT CALLBACK OnD3D11CreateDevice( ID3D11Device* pd3dDevice, float fSize,
24 | ID3D11Texture2D* pCubeTexture, ID3D11ShaderResourceView* pCubeRV );
25 |
26 | void OnD3D11ResizedSwapChain( const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc );
27 | void D3D11Render( D3DXMATRIX* pmWorldViewProj, BOOL bColor, ID3D11DeviceContext* pd3dImmediateContext );
28 | void OnD3D11ReleasingSwapChain();
29 | void OnD3D11DestroyDevice();
30 |
31 | ID3D11Texture2D* GetD3D10EnvironmentMap()
32 | {
33 | return m_pEnvironmentMap11;
34 | }
35 | ID3D11ShaderResourceView* GetD3D10EnvironmentMapRV()
36 | {
37 | return m_pEnvironmentRV11;
38 | }
39 | void SetD3D11EnvironmentMap( ID3D11Texture2D* pCubeTexture )
40 | {
41 | m_pEnvironmentMap11 = pCubeTexture;
42 | }
43 |
44 | protected:
45 | struct CB_VS_PER_OBJECT
46 | {
47 | D3DXMATRIX m_WorldViewProj;
48 | };
49 |
50 | ID3D11Texture2D* m_pEnvironmentMap11;
51 | ID3D11ShaderResourceView* m_pEnvironmentRV11;
52 | ID3D11Device* m_pd3dDevice11;
53 | ID3D11VertexShader* m_pVertexShader;
54 | ID3D11PixelShader* m_pPixelShader_Color;
55 | ID3D11PixelShader* m_pPixelShader_Gray;
56 | ID3D11SamplerState* m_pSam;
57 | ID3D11InputLayout* m_pVertexLayout11;
58 | ID3D11Buffer* m_pcbVSPerObject;
59 | ID3D11Buffer* m_pVB11;
60 | ID3D11DepthStencilState* m_pDepthStencilState11;
61 |
62 | float m_fSize;
63 | };
64 |
65 | #endif
--------------------------------------------------------------------------------
/ConstantTimeGaussianBlur/skybox11.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | // RGB color space is device-dependent, but here we neglect this issue and just
16 | // use RGB709 spec. More precise usage should be involved with a color profile
17 | // for display device.
18 | static const float3 RGB709_to_CIE_Y = float3(0.212671f, 0.715160f, 0.072169f);
19 |
20 |
21 | cbuffer cbPerObject : register( b0 )
22 | {
23 | row_major matrix g_mWorldViewProjection : packoffset( c0 );
24 | }
25 |
26 | TextureCube g_EnvironmentTexture : register( t0 );
27 | SamplerState g_sam : register( s0 );
28 |
29 | struct SkyboxVS_Input
30 | {
31 | float4 Pos : POSITION;
32 | };
33 |
34 | struct SkyboxVS_Output
35 | {
36 | float4 Pos : SV_POSITION;
37 | float3 Tex : TEXCOORD0;
38 | };
39 |
40 | SkyboxVS_Output SkyboxVS( SkyboxVS_Input Input )
41 | {
42 | SkyboxVS_Output Output;
43 |
44 | Output.Pos = Input.Pos;
45 | Output.Tex = normalize( mul(Input.Pos, g_mWorldViewProjection) );
46 |
47 | return Output;
48 | }
49 |
50 | float4 SkyboxPS_Color( SkyboxVS_Output Input ) : SV_TARGET
51 | {
52 | float4 color = g_EnvironmentTexture.Sample( g_sam, Input.Tex );
53 |
54 | return color;
55 | }
56 |
57 | float4 SkyboxPS_Gray( SkyboxVS_Output Input ) : SV_TARGET
58 | {
59 | float4 color = g_EnvironmentTexture.Sample( g_sam, Input.Tex );
60 | float gray = dot(color, RGB709_to_CIE_Y);
61 |
62 | return gray;
63 | }
64 |
--------------------------------------------------------------------------------
/DiffuseGlobalIllumination/Defines.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | //block size for the LPV propagation code
16 | #define X_BLOCK_SIZE 8
17 | #define Y_BLOCK_SIZE 8
18 | #define Z_BLOCK_SIZE 4
19 | #define TOTAL_BLOCK_SIZE 405 //(8+1)*(8+1)*(4+1)
20 |
21 | #define SM_SIZE 1024 //the resolution of the shadow map for the scene
22 |
23 | #define RSM_RES 512 //the resolution of the RSMs (this has to be a power of two, see note below)
24 | #define RSM_RES_M_1 RSM_RES-1 //one RSM_RES-1 (to be used for doing modulus with RSM_RES - note that any code using this assumes RSM_RES is a power of two)
25 | #define RSM_RES_SQR RSM_RES*RSM_RES
26 | #define RSM_RES_SQR_M_1 RSM_RES_SQR-1
27 |
28 | #define g_LPVWIDTH 32 //resolution of the 3D LPV
29 | #define g_LPVHEIGHT 32 //resolution of the 3D LPV
30 | #define g_LPVDEPTH 32 //resolution of the 3D LPV
31 |
32 | #define USE_MULTIPLE_BOUNCES
33 |
34 | #define HIERARCHICAL_INIT_LEVEL 0 //if we are using the hiearchy model we always initialize the top level, and downsample down to the other levels
35 |
36 | //#define USE_SINGLE_CHANNELS
37 |
38 | #define MAX_P_SAMPLES 32
--------------------------------------------------------------------------------
/DiffuseGlobalIllumination/DiffuseGlobalIllumination.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "WinResRc.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | #ifdef _WIN32
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 | #pragma code_page(1252)
22 | #endif //_WIN32
23 |
24 |
25 | #ifdef APSTUDIO_INVOKED
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // TEXTINCLUDE
29 | //
30 |
31 | 1 TEXTINCLUDE
32 | BEGIN
33 | "resource.h\0"
34 | END
35 |
36 | 2 TEXTINCLUDE
37 | BEGIN
38 | "#include ""WinResRc.h""\r\n"
39 | "\0"
40 | END
41 |
42 | 3 TEXTINCLUDE
43 | BEGIN
44 | "\r\n"
45 | "\0"
46 | END
47 |
48 | #endif // APSTUDIO_INVOKED
49 |
50 |
51 | /////////////////////////////////////////////////////////////////////////////
52 | //
53 | // Icon
54 | //
55 |
56 | // Icon with lowest ID value placed first to ensure application icon
57 | // remains consistent on all systems.
58 | IDI_ICON1 ICON "..\\..\\Media\\directx.ico"
59 | #endif // English (U.S.) resources
60 | /////////////////////////////////////////////////////////////////////////////
61 |
62 |
63 |
64 | #ifndef APSTUDIO_INVOKED
65 | /////////////////////////////////////////////////////////////////////////////
66 | //
67 | // Generated from the TEXTINCLUDE 3 resource.
68 | //
69 |
70 |
71 | /////////////////////////////////////////////////////////////////////////////
72 | #endif // not APSTUDIO_INVOKED
73 |
74 |
--------------------------------------------------------------------------------
/DiffuseGlobalIllumination/Mesh.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef MESH_H
16 | #define MESH_H
17 |
18 | //#include "SDKMesh.h"
19 |
20 |
21 | #endif
--------------------------------------------------------------------------------
/DiffuseGlobalIllumination/doc/DiffuseGlobalIllumination_lg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/DiffuseGlobalIllumination/doc/DiffuseGlobalIllumination_lg.jpg
--------------------------------------------------------------------------------
/DiffuseGlobalIllumination/doc/DiffuseGlobalIllumination_md.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/DiffuseGlobalIllumination/doc/DiffuseGlobalIllumination_md.jpg
--------------------------------------------------------------------------------
/DiffuseGlobalIllumination/doc/DiffuseGlobalIllumination_sm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/DiffuseGlobalIllumination/doc/DiffuseGlobalIllumination_sm.jpg
--------------------------------------------------------------------------------
/DiffuseGlobalIllumination/info.xml:
--------------------------------------------------------------------------------
1 |
2 | Diffuse Global Illumination
3 | Sarah Tariq
4 | DirectX 11
5 |
6 | Source\DiffuseGlobalIllumination
7 | doc\DiffuseGlobalIllumination_sm.jpg
8 | doc\DiffuseGlobalIllumination_md.jpg
9 | doc\DiffuseGlobalIllumination_lg.jpg
10 |
11 |
12 |
13 | Bin\DiffuseGlobalIllumination.exe
14 | GeForce GTX 400
15 | Lighting, Global Illumination, Reflective Shadow Maps
16 | 3D Graphics
17 | 110304
18 |
19 | ..\..\media\sponza
20 | ..\..\media\UI
21 | ..\..\media\arrow.sdkmesh
22 | ..\..\media\box.sdkmesh
23 | ..\..\media\unitSphere.sdkmesh
24 | ..\DiffuseGlobalIllumination
25 |
26 |
27 |
--------------------------------------------------------------------------------
/DiffuseGlobalIllumination/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Cloth.rc
4 | //
5 | #define IDI_ICON1 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/FXAA/FXAA.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 | NVIDIA DX11 SDK Sample Program.
10 |
11 |
12 |
13 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/FXAA/FXAA.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #define IDC_STATIC -1
11 | #include
12 |
13 |
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | #undef APSTUDIO_READONLY_SYMBOLS
17 |
18 | /////////////////////////////////////////////////////////////////////////////
19 | // English (U.S.) resources
20 |
21 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
22 | #ifdef _WIN32
23 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
24 | #pragma code_page(1252)
25 | #endif //_WIN32
26 |
27 | /////////////////////////////////////////////////////////////////////////////
28 | //
29 | // Icon
30 | //
31 |
32 | // Icon with lowest ID value placed first to ensure application icon
33 | // remains consistent on all systems.
34 | IDI_MAIN_ICON ICON "..\\..\\Media\\directx.ico"
35 |
36 | #ifdef APSTUDIO_INVOKED
37 | /////////////////////////////////////////////////////////////////////////////
38 | //
39 | // TEXTINCLUDE
40 | //
41 |
42 | 1 TEXTINCLUDE
43 | BEGIN
44 | "resource.h\0"
45 | END
46 |
47 | 2 TEXTINCLUDE
48 | BEGIN
49 | "#define IDC_STATIC -1\r\n"
50 | "#include \r\n"
51 | "\r\n"
52 | "\r\n"
53 | "\0"
54 | END
55 |
56 | 3 TEXTINCLUDE
57 | BEGIN
58 | "\r\n"
59 | "\0"
60 | END
61 |
62 | #endif // APSTUDIO_INVOKED
63 |
64 | #endif // English (U.S.) resources
65 | /////////////////////////////////////////////////////////////////////////////
66 |
67 |
68 |
69 | #ifndef APSTUDIO_INVOKED
70 | /////////////////////////////////////////////////////////////////////////////
71 | //
72 | // Generated from the TEXTINCLUDE 3 resource.
73 | //
74 |
75 |
76 | /////////////////////////////////////////////////////////////////////////////
77 | #endif // not APSTUDIO_INVOKED
78 |
79 |
--------------------------------------------------------------------------------
/FXAA/doc/FXAA_WhitePaper.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/FXAA/doc/FXAA_WhitePaper.docx
--------------------------------------------------------------------------------
/FXAA/doc/FXAA_WhitePaper.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/FXAA/doc/FXAA_WhitePaper.pdf
--------------------------------------------------------------------------------
/FXAA/doc/Fxaa_lg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/FXAA/doc/Fxaa_lg.png
--------------------------------------------------------------------------------
/FXAA/doc/Fxaa_md.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/FXAA/doc/Fxaa_md.png
--------------------------------------------------------------------------------
/FXAA/doc/Fxaa_sm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/FXAA/doc/Fxaa_sm.png
--------------------------------------------------------------------------------
/FXAA/info.xml:
--------------------------------------------------------------------------------
1 |
2 | Image-Based Anti-Aliasing
3 | Timothy Lottes
4 | DirectX 11
5 |
7 | Source\FXAA
8 | doc\Fxaa_sm.png
9 | doc\Fxaa_md.png
10 | doc\Fxaa_lg.png
11 |
12 |
13 | doc\FXAA_WhitePaper.pdf
14 | Bin\FXAA.exe
15 | GeForce GTX 200
16 | FXAA, Anti-Aliasing
17 | 3D Graphics
18 | 110304
19 |
20 | ..\..\media\Crypt
21 | ..\..\media\UI
22 | ..\FXAA
23 |
24 |
25 |
--------------------------------------------------------------------------------
/FXAA/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by FXAA.rc
4 | //
5 | #define IDI_MAIN_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 113
12 | #define _APS_NEXT_COMMAND_VALUE 40029
13 | #define _APS_NEXT_CONTROL_VALUE 1000
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/GregoryAccTessellation11/DynamicMesh.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #pragma once
16 |
17 | #include "Bzrfile_stencil.h"
18 | #include "IMesh.h"
19 |
20 | class DynamicMesh : public IMesh
21 | {
22 | public:
23 | DynamicMesh(const wchar_t* filename);
24 | ~DynamicMesh(void);
25 |
26 | BzrFile Bzr() const { return m_bzr; }
27 | HRESULT Init();
28 |
29 | void Render(ID3D11DeviceContext* pd3dDeviceContext, UINT32 mode, UINT32 offset);
30 | void GenerateShadowMap( ID3D11DeviceContext* pd3dDeviceContext, int offsetVertex );
31 | void adjustWorldPosition(D3DXMATRIX & mWorld);
32 |
33 | private:
34 | // prevent copying
35 | DynamicMesh(const DynamicMesh&);
36 |
37 | DynamicMesh& operator =(const DynamicMesh&);
38 |
39 | // Data members
40 | BzrFile m_bzr;
41 | int m_RegularPatchCount;
42 | int m_QuadPatchCount;
43 | int m_TriPatchCount;
44 | int m_IndexCount;
45 | int m_IndexCount2;
46 | int m_VertexCount;
47 | float3 m_center;
48 | int m_faceTopologyCount;
49 | int m_primitiveSize;
50 | D3D11_PRIMITIVE_TOPOLOGY m_topologyType;
51 | ID3D11Buffer* m_pConstructionVertexBuffer;
52 | ID3D11Buffer* m_pRegIndexBuffer;
53 | ID3D11Buffer* m_pQuadIndexBuffer;
54 | ID3D11Buffer* m_pInputMeshIndexBuffer;
55 | ID3D11Buffer* m_pcbPerPatch;
56 | ID3D11Buffer* m_pcbPerMesh;
57 | ID3D11ShaderResourceView* m_pQuadIntDataTextureSRV;
58 | ID3D11Texture2D* m_pQuadIntDataTexture;
59 | ID3D11ShaderResourceView* m_pGregoryStencilTextureSRV;
60 | ID3D11Texture2D* m_pGregoryStencilTexture;
61 | ID3D11Texture2D* m_pQuadWatertightTex;
62 | ID3D11ShaderResourceView* m_pQuadWatertightTexSRV;
63 | ID3D11Texture2D* m_pRegularWatertightTex;
64 | ID3D11ShaderResourceView* m_pRegularWatertightTexSRV;
65 | };
66 |
--------------------------------------------------------------------------------
/GregoryAccTessellation11/GPUPatchUtils.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #pragma once
16 | #include "DXUT.h"
17 |
18 | void CreateABuffer( ID3D11Device* pd3dDevice, UINT bindFlags, UINT width, UINT cpuAccessFlag, D3D11_USAGE usage, ID3D11Buffer* &pBuffer, void* pData);
19 | HRESULT CreateABufferWithView( ID3D11Device* pd3dDevice, UINT bindFlags, UINT width, ID3D11Buffer* &pBuffer, void* pData, UINT elementWidth, ID3D11ShaderResourceView* &pBufferRV);
20 | HRESULT CreateDataTexture( ID3D11Device* pd3dDevice, UINT width, UINT height, DXGI_FORMAT format, const void* pData, UINT size, ID3D11Texture2D** ppTexture2D, ID3D11ShaderResourceView** out_ppRV);
21 | VOID CreateSolidTexture( ID3D11Device* pd3dDevice, DWORD ColorRGBA, ID3D11Texture2D** ppTexture2D, ID3D11ShaderResourceView** ppSRV );
22 |
--------------------------------------------------------------------------------
/GregoryAccTessellation11/GregoryACC11.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #define IDC_STATIC -1
11 | #include
12 |
13 |
14 | /////////////////////////////////////////////////////////////////////////////
15 | #undef APSTUDIO_READONLY_SYMBOLS
16 |
17 | /////////////////////////////////////////////////////////////////////////////
18 | // English (U.S.) resources
19 |
20 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
21 | #ifdef _WIN32
22 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
23 | #pragma code_page(1252)
24 | #endif //_WIN32
25 |
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // Icon
29 | //
30 |
31 | // Icon with lowest ID value placed first to ensure application icon
32 | // remains consistent on all systems.
33 | IDI_MAIN_ICON ICON "..\\..\\Media\\directx.ico"
34 |
35 | #ifdef APSTUDIO_INVOKED
36 | /////////////////////////////////////////////////////////////////////////////
37 | //
38 | // TEXTINCLUDE
39 | //
40 |
41 | 1 TEXTINCLUDE
42 | BEGIN
43 | "resource.h\0"
44 | END
45 |
46 | 2 TEXTINCLUDE
47 | BEGIN
48 | "#define IDC_STATIC -1\r\n"
49 | "#include \r\n"
50 | "\r\n"
51 | "\r\n"
52 | "\0"
53 | END
54 |
55 | 3 TEXTINCLUDE
56 | BEGIN
57 | "\r\n"
58 | "\0"
59 | END
60 |
61 | #endif // APSTUDIO_INVOKED
62 |
63 | #endif // English (U.S.) resources
64 | /////////////////////////////////////////////////////////////////////////////
65 |
66 |
67 |
68 | #ifndef APSTUDIO_INVOKED
69 | /////////////////////////////////////////////////////////////////////////////
70 | //
71 | // Generated from the TEXTINCLUDE 3 resource.
72 | //
73 |
74 |
75 | /////////////////////////////////////////////////////////////////////////////
76 | #endif // not APSTUDIO_INVOKED
77 |
78 |
--------------------------------------------------------------------------------
/GregoryAccTessellation11/GregoryACC11_WhitePaper.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/GregoryAccTessellation11/GregoryACC11_WhitePaper.doc
--------------------------------------------------------------------------------
/GregoryAccTessellation11/IMesh.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #pragma once
16 |
17 | class IMesh
18 | {
19 | public:
20 | virtual HRESULT Init() = 0;
21 | virtual void Render(ID3D11DeviceContext* pd3dDeviceContext, UINT32 mode, UINT32 offset) = 0;
22 | virtual void GenerateShadowMap( ID3D11DeviceContext* pd3dDeviceContext, int offsetVertex )=0;
23 |
24 | virtual ~IMesh(void){}
25 | };
26 |
--------------------------------------------------------------------------------
/GregoryAccTessellation11/StaticMesh.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #pragma once
16 |
17 | #include "Bzrfile_stencil.h"
18 | #include "IMesh.h"
19 |
20 | class StaticMesh : public IMesh
21 | {
22 | public:
23 | StaticMesh(const wchar_t* filename);
24 | ~StaticMesh(void);
25 |
26 | BzrFile Bzr() const { return m_bzr; }
27 | HRESULT Init();
28 |
29 | void Render(ID3D11DeviceContext* pd3dDeviceContext, UINT32 mode, UINT32 offset );
30 | void adjustWorldPosition(D3DXMATRIX & mWorld);
31 | void GenerateShadowMap( ID3D11DeviceContext* pd3dDeviceContext, int offsetVertex );
32 |
33 | private:
34 | // prevent copying
35 | StaticMesh(const StaticMesh&);
36 |
37 | StaticMesh& operator =(const StaticMesh&);
38 |
39 | // Data members
40 | BzrFile m_bzr;
41 | int m_regularPatchCount;
42 | int m_quadPatchCount;
43 | int m_triPatchCount;
44 | int m_vertexCount;
45 | int m_indexCount;
46 | int m_indexCount2;
47 | float3 m_center;
48 | ID3D11Buffer* m_pVertexBuffer;
49 | ID3D11Buffer* m_pRegIndexBuffer;
50 | ID3D11Buffer* m_pQuadIndexBuffer;
51 | ID3D11Buffer* m_pInputMeshIndexBuffer;
52 | ID3D11Buffer* m_pcbPerMesh;
53 | ID3D11ShaderResourceView* m_pControlPointsTextureSRV;
54 | ID3D11Texture2D* m_pControlPointsTexture;
55 | ID3D11ShaderResourceView* m_pGregoryControlPointsTextureSRV;
56 | ID3D11Texture2D* m_pGregoryControlPointsTexture;
57 | };
58 |
--------------------------------------------------------------------------------
/GregoryAccTessellation11/doc/GregoryACC11_WhitePaper.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/GregoryAccTessellation11/doc/GregoryACC11_WhitePaper.doc
--------------------------------------------------------------------------------
/GregoryAccTessellation11/doc/GregoryACC11_WhitePaper.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/GregoryAccTessellation11/doc/GregoryACC11_WhitePaper.pdf
--------------------------------------------------------------------------------
/GregoryAccTessellation11/doc/GregoryACC11_lg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/GregoryAccTessellation11/doc/GregoryACC11_lg.jpg
--------------------------------------------------------------------------------
/GregoryAccTessellation11/doc/GregoryACC11_md.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/GregoryAccTessellation11/doc/GregoryACC11_md.jpg
--------------------------------------------------------------------------------
/GregoryAccTessellation11/doc/GregoryACC11_sm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/GregoryAccTessellation11/doc/GregoryACC11_sm.jpg
--------------------------------------------------------------------------------
/GregoryAccTessellation11/doc/README.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/GregoryAccTessellation11/doc/README.txt
--------------------------------------------------------------------------------
/GregoryAccTessellation11/doc/screenshot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/GregoryAccTessellation11/doc/screenshot.jpg
--------------------------------------------------------------------------------
/GregoryAccTessellation11/info.xml:
--------------------------------------------------------------------------------
1 |
2 | Gregory ACC
3 | Tianyun Ni
4 | DirectX 11
5 |
6 | Source\GregoryAccTessellation11
7 | doc\GregoryACC11_sm.jpg
8 | doc\GregoryACC11_md.jpg
9 | doc\GregoryACC11_lg.jpg
10 | doc\readme.txt
11 |
12 | doc\GregoryACC11_WhitePaper.pdf
13 | Bin\GregoryACC11.exe
14 | GeForce GTX 400
15 | DirectX 11, Tessellation, ACC, Gregory patches
16 | 3D Graphics
17 | 110304
18 |
19 | ..\..\media\GregoryAccTessellation11
20 | ..\..\media\UI
21 | ..\GregoryAccTessellation11
22 |
23 |
24 |
--------------------------------------------------------------------------------
/GregoryAccTessellation11/readme.txt:
--------------------------------------------------------------------------------
1 | Set working directory to
2 | $(ProjectDir)\..\..\Media\GregoryAccTessellation11\
--------------------------------------------------------------------------------
/GregoryAccTessellation11/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Patch10.rc
4 | //
5 | #define IDI_MAIN_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 113
12 | #define _APS_NEXT_COMMAND_VALUE 40029
13 | #define _APS_NEXT_CONTROL_VALUE 1000
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/GregoryAccTessellation11/screenshot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/GregoryAccTessellation11/screenshot.jpg
--------------------------------------------------------------------------------
/GregoryAccTessellation11/typedef.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #pragma once
16 |
17 | //constant data per frame
18 | struct CB_PER_FRAME_CONSTANTS
19 | {
20 | D3DXVECTOR4 vEyeDir;
21 | D3DXVECTOR4 vLightPos;
22 | D3DXVECTOR4 vLightDir;
23 | D3DXVECTOR4 vRandom;
24 | float fLightAngle;
25 | float fTessellationFactor;
26 | float fDisplacementHeight;
27 | DWORD dwPadding[1];
28 | };
29 | struct CB_PER_DRAW_CONSTANTS
30 | {
31 | D3DXMATRIX world;
32 | D3DXMATRIX worldView;
33 | D3DXMATRIX viewProjection;
34 | D3DXMATRIX mLightViewProjection;
35 | };
36 | //constant data per mesh
37 | struct CB_PER_PATCH_CONSTANTS
38 | {
39 | float weightsForRegularPatches[256][4];
40 | };
41 | struct CB_PER_MESH_CONSTANTS
42 | {
43 | D3DXVECTOR4 diffuse;
44 | D3DXVECTOR4 center;
45 | };
46 | //vertex type for vertex shader
47 | struct Vertex
48 | {
49 | D3DXVECTOR3 m_Position;
50 | D3DXVECTOR3 m_Tangent;
51 | D3DXVECTOR3 m_Bitangent;
52 | D3DXVECTOR2 m_Texcoord;
53 | };
54 | struct PlaneVertex
55 | {
56 | D3DXVECTOR3 m_Position;
57 | D3DXVECTOR2 m_Texcoord;
58 | };
59 | struct TESSELLATION_MODEL_STRUCT
60 | {
61 | WCHAR* modelFileName;
62 | WCHAR* NormalHeightMap; // Normal and height map (normal in .xyz, height in .w)
63 | bool isAnimated;
64 | float3 diffuse;
65 | };
66 | typedef enum _ADAPTIVETESSELLATION_METRIC
67 | {
68 | MESH_TYPE_DISTANCE = 0,
69 | MESH_TYPE_GEOMTRY = 1,
70 | MESH_TYPE_IMAGESPACE = 2,
71 | }ADAPTIVETESSELLATION_METRIC;
72 |
--------------------------------------------------------------------------------
/Hair/FluidCommon.fxh:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef FLUIDCOMMON_FXH
16 | #define FLUIDCOMMON_FXH
17 |
18 | // Definitions common to C++ and HLSL code
19 | //========================================
20 |
21 | // These are the values used when filling the obstacle textures
22 | #define OBSTACLE_EXTERIOR 1.0f
23 | #define OBSTACLE_BOUNDARY 128.0f/255.0f
24 | #define OBSTACLE_INTERIOR 0.0f
25 |
26 | #ifndef __cplusplus
27 |
28 | // HLSL-only code
29 | //========================================
30 |
31 | #endif
32 |
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/Hair/Hair.fxo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/Hair.fxo
--------------------------------------------------------------------------------
/Hair/Hair.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "WinResRc.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | #ifdef _WIN32
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 | #pragma code_page(1252)
22 | #endif //_WIN32
23 |
24 |
25 | #ifdef APSTUDIO_INVOKED
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // TEXTINCLUDE
29 | //
30 |
31 | 1 TEXTINCLUDE
32 | BEGIN
33 | "resource.h\0"
34 | END
35 |
36 | 2 TEXTINCLUDE
37 | BEGIN
38 | "#include ""WinResRc.h""\r\n"
39 | "\0"
40 | END
41 |
42 | 3 TEXTINCLUDE
43 | BEGIN
44 | "\r\n"
45 | "\0"
46 | END
47 |
48 | #endif // APSTUDIO_INVOKED
49 |
50 |
51 | /////////////////////////////////////////////////////////////////////////////
52 | //
53 | // Icon
54 | //
55 |
56 | // Icon with lowest ID value placed first to ensure application icon
57 | // remains consistent on all systems.
58 | IDI_ICON1 ICON "..\\..\\Media\\directx.ico"
59 | #endif // English (U.S.) resources
60 | /////////////////////////////////////////////////////////////////////////////
61 |
62 |
63 |
64 | #ifndef APSTUDIO_INVOKED
65 | /////////////////////////////////////////////////////////////////////////////
66 | //
67 | // Generated from the TEXTINCLUDE 3 resource.
68 | //
69 |
70 |
71 | /////////////////////////////////////////////////////////////////////////////
72 | #endif // not APSTUDIO_INVOKED
73 |
74 |
--------------------------------------------------------------------------------
/Hair/HairTextures/HairSpecMap01.DDS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/HairTextures/HairSpecMap01.DDS
--------------------------------------------------------------------------------
/Hair/HairTextures/HairSpecMap02.DDS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/HairTextures/HairSpecMap02.DDS
--------------------------------------------------------------------------------
/Hair/HairTextures/HairSpecMap03.DDS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/HairTextures/HairSpecMap03.DDS
--------------------------------------------------------------------------------
/Hair/HairTextures/HairSpecMap04.DDS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/HairTextures/HairSpecMap04.DDS
--------------------------------------------------------------------------------
/Hair/HairTextures/specNoise.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/HairTextures/specNoise.dds
--------------------------------------------------------------------------------
/Hair/LongHairResources/ClumpMapBarycentric.raw:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/ClumpMapBarycentric.raw
--------------------------------------------------------------------------------
/Hair/LongHairResources/DensityMapBarycentric.raw:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/DensityMapBarycentric.raw
--------------------------------------------------------------------------------
/Hair/LongHairResources/Face.sdkmesh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/Face.sdkmesh
--------------------------------------------------------------------------------
/Hair/LongHairResources/MeshAOMap.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/MeshAOMap.dds
--------------------------------------------------------------------------------
/Hair/LongHairResources/README.txt:
--------------------------------------------------------------------------------
1 |
2 | To create another maya hair project you need to create another folder, with the following four files, named exactly
3 |
4 | scalp_mesh.obj
5 | The roots of the hair strands tessellated into a mesh. Refer to Hair\MeshProcess for how to create this file
6 |
7 | hair_vertices.txt
8 | The actual hair strands, with the hair strands ordered the *same* way as scalp_mesh orders the roots. Refer to Hair\MeshProcess for how to create this file
9 |
10 | collision_objects.txt
11 | txt file containing all the collision implicits representing the model. Refer to LongMayaHairResources\collision_objects for the syntax
12 | These implicits will be all that the hair will collide against
13 |
14 | full_model.x
15 | the model to render, this can be the whole characrter, just the scalp, or anything in between
16 | this model is used for rendering and shadowing purposes, not simulation
17 |
18 |
--------------------------------------------------------------------------------
/Hair/LongHairResources/ScalpTexture.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/ScalpTexture.dds
--------------------------------------------------------------------------------
/Hair/LongHairResources/collision_objects.txt:
--------------------------------------------------------------------------------
1 | #these are the collision objects for the long hair from maya
2 | #spheres have to be specified with 's', cylinders with 'c'
3 | #in addition, the sphere that denotes the head has to have a special qualifier called 'head'
4 | #any implicit that also has to be used as a barycentric interpolant hair obstacle should be labeled with 'barycentricObstacle'
5 |
6 | #for implicits:
7 | #scale
8 | #rotation (in radians)
9 | #translation
10 |
11 |
12 | // 's' this is the 'head'
13 | // 'barycentricObstacle'
14 | // 'basePoseToMeshBind'
15 | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
16 | 2.4 2.788 3.002
17 | 0.0 0.0 0.0
18 | 0.018 1.109 -0.157
19 |
20 | // 's' this is the 'chin'
21 | // 'barycentricObstacle'
22 | // 'basePoseToMeshBind'
23 | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
24 | 1.2 1.0 1.1
25 | 0.0 0.0 0.0
26 | 0.0 -0.8 1.3
27 |
28 |
29 | // 's' 'X' this is the 'body'
30 | // 'barycentricObstacle'
31 | // 'basePoseToMeshBind'
32 | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
33 | 4.497 1.797 1.95
34 | 0.0 0.0 0.0
35 | 0 -4.454 -1.3
36 |
37 | // 's' 'X' this is the 'neck'
38 | // 'barycentricObstacle'
39 | // 'basePoseToMeshBind'
40 | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
41 | 1.597 2.797 1.597
42 | 0.0 0.0 0
43 | 0 -1.5 -0.5
44 |
45 | // 's' 'X' this is the 'left breast'
46 | // 'barycentricObstacle'
47 | // 'basePoseToMeshBind'
48 | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
49 | 2.0 1.497 2.45
50 | 0.0 0.0 0.0
51 | -1.6 -5.3 -0.7
52 |
53 |
54 | // 's' 'X' this is the 'right breast'
55 | // 'barycentricObstacle'
56 | // 'basePoseToMeshBind'
57 | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
58 | 2.0 1.497 2.45
59 | 0.0 0.0 0.0
60 | 1.6 -5.3 -0.7
61 |
62 |
63 | // 's' 'X' this is the 'left shoulder'
64 | // 'barycentricObstacle'
65 | // 'basePoseToMeshBind'
66 | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
67 | 2.55 1.497 1.7
68 | 0.0 0.0 0.0
69 | -2.513 -5.0 -1.4
70 |
71 | // 's' 'X' this is the 'right shoulder'
72 | // 'barycentricObstacle'
73 | // 'basePoseToMeshBind'
74 | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
75 | 2.55 1.497 1.7
76 | 0.0 0.0 0.0
77 | 2.513 -5.0 -1.4
78 |
79 | // 'scalpToMesh'
80 | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
81 |
82 | // 'InitialTotalTransform'
83 | 1 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 1
--------------------------------------------------------------------------------
/Hair/LongHairResources/densityThicknessMapBarycentric.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/densityThicknessMapBarycentric.dds
--------------------------------------------------------------------------------
/Hair/LongHairResources/densityThicknessMapClump.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/densityThicknessMapClump.dds
--------------------------------------------------------------------------------
/Hair/LongHairResources/full_model.sdkmesh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/full_model.sdkmesh
--------------------------------------------------------------------------------
/Hair/LongHairResources/full_model2.sdkmesh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/full_model2.sdkmesh
--------------------------------------------------------------------------------
/Hair/LongHairResources/hairbase.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/hairbase.dds
--------------------------------------------------------------------------------
/Hair/LongHairResources/hairbaseBrown.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/hairbaseBrown.dds
--------------------------------------------------------------------------------
/Hair/LongHairResources/hairbaseRed.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/hairbaseRed.dds
--------------------------------------------------------------------------------
/Hair/LongHairResources/scalp_mesh.sdkmesh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/scalp_mesh.sdkmesh
--------------------------------------------------------------------------------
/Hair/LongHairResources/stiffnessMap.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/LongHairResources/stiffnessMap.dds
--------------------------------------------------------------------------------
/Hair/ReadMe.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/ReadMe.txt
--------------------------------------------------------------------------------
/Hair/doc/HairSDKWhitePaper.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/HairSDKWhitePaper.doc
--------------------------------------------------------------------------------
/Hair/doc/HairSDKWhitePaper.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/HairSDKWhitePaper.pdf
--------------------------------------------------------------------------------
/Hair/doc/Hair_lg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/Hair_lg.png
--------------------------------------------------------------------------------
/Hair/doc/Hair_md.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/Hair_md.png
--------------------------------------------------------------------------------
/Hair/doc/Hair_sm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/Hair_sm.png
--------------------------------------------------------------------------------
/Hair/doc/images/Hair0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/images/Hair0.jpg
--------------------------------------------------------------------------------
/Hair/doc/images/Hair1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/images/Hair1.jpg
--------------------------------------------------------------------------------
/Hair/doc/images/Hair2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/images/Hair2.jpg
--------------------------------------------------------------------------------
/Hair/doc/images/Hair3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/images/Hair3.jpg
--------------------------------------------------------------------------------
/Hair/doc/images/Hair4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/images/Hair4.jpg
--------------------------------------------------------------------------------
/Hair/doc/images/Hair5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/images/Hair5.jpg
--------------------------------------------------------------------------------
/Hair/doc/images/Hair6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/images/Hair6.jpg
--------------------------------------------------------------------------------
/Hair/doc/images/Hair7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Hair/doc/images/Hair7.jpg
--------------------------------------------------------------------------------
/Hair/info.xml:
--------------------------------------------------------------------------------
1 |
2 | Hair
3 | Sarah Tariq
4 | DirectX 11
5 |
6 | Source\Hair
7 | doc\Hair_sm.png
8 | doc\Hair_md.png
9 | doc\Hair_lg.png
10 | ReadMe.txt
11 |
12 | doc\HairSDKWhitePaper.pdf
13 | Bin\Hair.exe
14 | GeForce GTX 400
15 | Tessellation, Hair, Compute, Animation
16 | 3D Graphics
17 | 110304
18 |
19 | LongHairResources
20 | HairTextures
21 | hairData.txt
22 | RecordedTransforms.txt
23 | RecordedTransforms1.txt
24 | RecordedTransforms2.txt
25 | ..\..\media\arrow.sdkmesh
26 | ..\..\media\unitSphere.sdkmesh
27 | ..\..\media\UI
28 | Hair.fxo
29 | ..\Hair
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Hair/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Cloth.rc
4 | //
5 | #define IDI_ICON1 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/Island11/Island11.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef __ISLANDSAMPLE11_H_
16 | #define __ISLANDSAMPLE11_H_
17 |
18 | #pragma warning(disable: 4995)
19 |
20 | HRESULT CompileShaderFromFile(WCHAR* szFileName, LPCSTR szEntryPoint, LPCSTR szShaderModel, ID3DBlob** ppBlobOut);
21 |
22 | #endif // __ISLANDSAMPLE11_H_
23 |
--------------------------------------------------------------------------------
/Island11/Island11.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "WinResRc.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | #ifdef _WIN32
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 | #pragma code_page(1252)
22 | #endif //_WIN32
23 |
24 |
25 | #ifdef APSTUDIO_INVOKED
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // TEXTINCLUDE
29 | //
30 |
31 | 1 TEXTINCLUDE
32 | BEGIN
33 | "resource.h\0"
34 | END
35 |
36 | 2 TEXTINCLUDE
37 | BEGIN
38 | "#include ""WinResRc.h""\r\n"
39 | "\0"
40 | END
41 |
42 | 3 TEXTINCLUDE
43 | BEGIN
44 | "\r\n"
45 | "\0"
46 | END
47 |
48 | #endif // APSTUDIO_INVOKED
49 |
50 |
51 | /////////////////////////////////////////////////////////////////////////////
52 | //
53 | // Icon
54 | //
55 |
56 | // Icon with lowest ID value placed first to ensure application icon
57 | // remains consistent on all systems.
58 | IDI_ICON1 ICON "..\\..\\Media\\directx.ico"
59 | #endif // English (U.S.) resources
60 | /////////////////////////////////////////////////////////////////////////////
61 |
62 |
63 |
64 | #ifndef APSTUDIO_INVOKED
65 | /////////////////////////////////////////////////////////////////////////////
66 | //
67 | // Generated from the TEXTINCLUDE 3 resource.
68 | //
69 |
70 |
71 | /////////////////////////////////////////////////////////////////////////////
72 | #endif // not APSTUDIO_INVOKED
73 |
74 |
--------------------------------------------------------------------------------
/Island11/directx.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Island11/directx.ico
--------------------------------------------------------------------------------
/Island11/doc/Island11_lg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Island11/doc/Island11_lg.jpg
--------------------------------------------------------------------------------
/Island11/doc/Island11_md.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Island11/doc/Island11_md.jpg
--------------------------------------------------------------------------------
/Island11/doc/Island11_sm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/Island11/doc/Island11_sm.jpg
--------------------------------------------------------------------------------
/Island11/info.xml:
--------------------------------------------------------------------------------
1 |
2 | Island
3 | Tim Tcheblokov
4 | DirectX 11
5 |
6 | Source\Island11
7 | doc\Island11_sm.jpg
8 | doc\Island11_md.jpg
9 | doc\Island11_lg.jpg
10 |
11 |
12 |
13 | Bin\Island11.exe
14 | GeForce GTX 400
15 | Tessellation, terrain, hull shader, domain shader, displacement mapping
16 | 3D Graphics
17 | 110204
18 |
19 | ..\..\media\UI
20 | ..\..\media\TerrainTextures
21 | ..\Island11
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Island11/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Island11_2005.rc
4 | //
5 | #define IDI_MAIN_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 101
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/MultiViewSoftShadows/MultiViewSoftShadows.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | MVSS
10 |
11 |
12 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/MultiViewSoftShadows/MultiViewSoftShadows.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | //#include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "WinResRc.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | #ifdef _WIN32
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 | #pragma code_page(1252)
22 | #endif //_WIN32
23 |
24 |
25 | #ifdef APSTUDIO_INVOKED
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // TEXTINCLUDE
29 | //
30 |
31 | 1 TEXTINCLUDE
32 | BEGIN
33 | "resource.h\0"
34 | END
35 |
36 | 2 TEXTINCLUDE
37 | BEGIN
38 | "#include ""WinResRc.h""\r\n"
39 | "\0"
40 | END
41 |
42 | 3 TEXTINCLUDE
43 | BEGIN
44 | "\r\n"
45 | "\0"
46 | END
47 |
48 | #endif // APSTUDIO_INVOKED
49 |
50 |
51 | /////////////////////////////////////////////////////////////////////////////
52 | //
53 | // Icon
54 | //
55 |
56 | // Icon with lowest ID value placed first to ensure application icon
57 | // remains consistent on all systems.
58 | IDI_ICON1 ICON "..\\..\\Media\\directx.ico"
59 | #endif // English (U.S.) resources
60 | /////////////////////////////////////////////////////////////////////////////
61 |
62 |
63 |
64 | #ifndef APSTUDIO_INVOKED
65 | /////////////////////////////////////////////////////////////////////////////
66 | //
67 | // Generated from the TEXTINCLUDE 3 resource.
68 | //
69 |
70 |
71 | /////////////////////////////////////////////////////////////////////////////
72 | #endif // not APSTUDIO_INVOKED
73 |
74 |
--------------------------------------------------------------------------------
/MultiViewSoftShadows/doc/MultiViewSoftShadows.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/MultiViewSoftShadows/doc/MultiViewSoftShadows.doc
--------------------------------------------------------------------------------
/MultiViewSoftShadows/doc/MultiViewSoftShadows.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/MultiViewSoftShadows/doc/MultiViewSoftShadows.pdf
--------------------------------------------------------------------------------
/MultiViewSoftShadows/doc/MultiViewSoftShadows.wmv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/MultiViewSoftShadows/doc/MultiViewSoftShadows.wmv
--------------------------------------------------------------------------------
/MultiViewSoftShadows/doc/MultiViewSoftShadows_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/MultiViewSoftShadows/doc/MultiViewSoftShadows_128.png
--------------------------------------------------------------------------------
/MultiViewSoftShadows/doc/MultiViewSoftShadows_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/MultiViewSoftShadows/doc/MultiViewSoftShadows_256.png
--------------------------------------------------------------------------------
/MultiViewSoftShadows/doc/MultiViewSoftShadows_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/MultiViewSoftShadows/doc/MultiViewSoftShadows_512.png
--------------------------------------------------------------------------------
/MultiViewSoftShadows/doc/Readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/MultiViewSoftShadows/doc/Readme.txt
--------------------------------------------------------------------------------
/MultiViewSoftShadows/info.xml:
--------------------------------------------------------------------------------
1 |
2 | Multi-View Soft Shadows
3 | Louis Bavoil
4 | DirectX 11
5 | here.]]>
8 | Source\MultiViewSoftShadows
9 | doc\MultiViewSoftShadows_128.png
10 | doc\MultiViewSoftShadows_256.png
11 | doc\MultiViewSoftShadows_512.png
12 |
13 |
14 | doc\MultiViewSoftShadows.pdf
15 | bin\MultiViewSoftShadows.exe
16 | GeForce GTX 400
17 | HLSL,Pixel shader,MSFT FX,Soft Shadows
18 | 3D Graphics
19 | 110304
20 |
21 | shaders
22 | nvapi.h
23 | nvapi.lib
24 | nvstereo.h
25 | ..\..\media\goof_knight.sdkmesh
26 | ..\..\media\goof_knight1.sdkmesh
27 | ..\..\media\goof_knight2.sdkmesh
28 | ..\..\media\goof_knight3.sdkmesh
29 | ..\..\media\goof_knight4.sdkmesh
30 | ..\..\media\goof_knight5.sdkmesh
31 | ..\..\media\goof_knight6.sdkmesh
32 | ..\..\media\lichen6.dds
33 | ..\..\media\lichen6_normal.dds
34 | ..\..\media\lichen6_rock.dds
35 | ..\..\media\UI
36 | ..\MultiViewSoftShadows
37 |
38 |
39 |
--------------------------------------------------------------------------------
/MultiViewSoftShadows/shaders/MVSS_ShadowMapRendering.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #pragma pack_matrix( row_major )
16 |
17 | //--------------------------------------------------------------------------------------
18 | // Shadow-map generation vertex shader
19 | //--------------------------------------------------------------------------------------
20 |
21 | cbuffer shadowmapconstants : register(b0)
22 | {
23 | float4x4 g_WorldToLightClip;
24 | };
25 |
26 | struct Geometry_VSIn
27 | {
28 | float4 WorldPos : position;
29 | };
30 |
31 | float4 RenderShadowMapVS(Geometry_VSIn IN) : SV_Position
32 | {
33 | return mul(IN.WorldPos, g_WorldToLightClip);
34 | }
35 |
--------------------------------------------------------------------------------
/MultiViewSoftShadows/shaders/MVSS_ShadowMapVisualization.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #include "MVSS_Common.hlsl"
16 |
17 | //--------------------------------------------------------------------------------------
18 | // Vertex shader
19 | //--------------------------------------------------------------------------------------
20 |
21 | struct PostProc_VSOut
22 | {
23 | float4 pos : SV_Position;
24 | float2 uv : TEXCOORD;
25 | };
26 |
27 | // Vertex shader that generates a full screen triangle with texcoords
28 | // To use, draw 3 vertices with primitive type triangle
29 | PostProc_VSOut FullScreenTriangleVS(uint id : SV_VertexID)
30 | {
31 | PostProc_VSOut output = (PostProc_VSOut)0.0f;
32 | output.uv = float2( (id << 1) & 2, id & 2 );
33 | output.pos = float4( output.uv * float2( 2.0f, -2.0f ) + float2( -1.0f, 1.0f), 0.0f, 1.0f );
34 | return output;
35 | }
36 |
37 | //--------------------------------------------------------------------------------------
38 | // Pixel shader
39 | //--------------------------------------------------------------------------------------
40 |
41 | float ZClipToZEye(float zClip)
42 | {
43 | return g_LightZFar*g_LightZNear / (g_LightZFar - zClip*(g_LightZFar-g_LightZNear));
44 | }
45 |
46 | float4 VisShadowMapPS(PostProc_VSOut IN) : SV_TARGET
47 | {
48 | float z = tShadowMapArray.Sample(PointSampler, float3(IN.uv, 0));
49 | z = (ZClipToZEye(z) - g_LightZNear) / (g_LightZFar - g_LightZNear);
50 | return z * 10;
51 | }
52 |
--------------------------------------------------------------------------------
/OceanCS/CSFFT/fft_512x512.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #include "DXUT.h"
16 |
17 |
18 | //Memory access coherency (in threads)
19 | #define COHERENCY_GRANULARITY 128
20 |
21 |
22 | ///////////////////////////////////////////////////////////////////////////////
23 | // Common types
24 | ///////////////////////////////////////////////////////////////////////////////
25 |
26 | typedef struct CSFFT_512x512_Data_t
27 | {
28 | // D3D11 objects
29 | ID3D11DeviceContext* pd3dImmediateContext;
30 | ID3D11ComputeShader* pRadix008A_CS;
31 | ID3D11ComputeShader* pRadix008A_CS2;
32 |
33 | // More than one array can be transformed at same time
34 | UINT slices;
35 |
36 | // For 512x512 config, we need 6 constant buffers
37 | ID3D11Buffer* pRadix008A_CB[6];
38 |
39 | // Temporary buffers
40 | ID3D11Buffer* pBuffer_Tmp;
41 | ID3D11UnorderedAccessView* pUAV_Tmp;
42 | ID3D11ShaderResourceView* pSRV_Tmp;
43 | } CSFFT512x512_Plan;
44 |
45 | ////////////////////////////////////////////////////////////////////////////////
46 | // Common constants
47 | ////////////////////////////////////////////////////////////////////////////////
48 | #define TWO_PI 6.283185307179586476925286766559
49 |
50 | #define FFT_DIMENSIONS 3U
51 | #define FFT_PLAN_SIZE_LIMIT (1U << 27)
52 |
53 | #define FFT_FORWARD -1
54 | #define FFT_INVERSE 1
55 |
56 |
57 | void fft512x512_create_plan(CSFFT512x512_Plan* plan, ID3D11Device* pd3dDevice, UINT slices);
58 | void fft512x512_destroy_plan(CSFFT512x512_Plan* plan);
59 |
60 | void fft_512x512_c2c(CSFFT512x512_Plan* fft_plan,
61 | ID3D11UnorderedAccessView* pUAV_Dst,
62 | ID3D11ShaderResourceView* pSRV_Dst,
63 | ID3D11ShaderResourceView* pSRV_Src);
64 |
--------------------------------------------------------------------------------
/OceanCS/OceanCS.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #define IDC_STATIC -1
11 | #include
12 |
13 |
14 | /////////////////////////////////////////////////////////////////////////////
15 | #undef APSTUDIO_READONLY_SYMBOLS
16 |
17 | /////////////////////////////////////////////////////////////////////////////
18 | // English (U.S.) resources
19 |
20 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
21 | #ifdef _WIN32
22 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
23 | #pragma code_page(1252)
24 | #endif //_WIN32
25 |
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // Icon
29 | //
30 |
31 | // Icon with lowest ID value placed first to ensure application icon
32 | // remains consistent on all systems.
33 | IDI_MAIN_ICON ICON "..\\..\\Media\\directx.ico"
34 |
35 | #ifdef APSTUDIO_INVOKED
36 | /////////////////////////////////////////////////////////////////////////////
37 | //
38 | // TEXTINCLUDE
39 | //
40 |
41 | 1 TEXTINCLUDE
42 | BEGIN
43 | "resource.h\0"
44 | END
45 |
46 | 2 TEXTINCLUDE
47 | BEGIN
48 | "#define IDC_STATIC -1\r\n"
49 | "#include \r\n"
50 | "\r\n"
51 | "\r\n"
52 | "\0"
53 | END
54 |
55 | 3 TEXTINCLUDE
56 | BEGIN
57 | "\r\n"
58 | "\0"
59 | END
60 |
61 | #endif // APSTUDIO_INVOKED
62 |
63 | #endif // English (U.S.) resources
64 | /////////////////////////////////////////////////////////////////////////////
65 |
66 |
67 |
68 | #ifndef APSTUDIO_INVOKED
69 | /////////////////////////////////////////////////////////////////////////////
70 | //
71 | // Generated from the TEXTINCLUDE 3 resource.
72 | //
73 |
74 |
75 | /////////////////////////////////////////////////////////////////////////////
76 | #endif // not APSTUDIO_INVOKED
77 |
78 |
--------------------------------------------------------------------------------
/OceanCS/doc/OceanCS_Slides.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OceanCS/doc/OceanCS_Slides.pdf
--------------------------------------------------------------------------------
/OceanCS/doc/OceanCS_Slides.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OceanCS/doc/OceanCS_Slides.pptx
--------------------------------------------------------------------------------
/OceanCS/doc/OceanCS_lg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OceanCS/doc/OceanCS_lg.jpg
--------------------------------------------------------------------------------
/OceanCS/doc/OceanCS_md.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OceanCS/doc/OceanCS_md.jpg
--------------------------------------------------------------------------------
/OceanCS/doc/OceanCS_sm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OceanCS/doc/OceanCS_sm.jpg
--------------------------------------------------------------------------------
/OceanCS/info.xml:
--------------------------------------------------------------------------------
1 |
2 | FFT Ocean
3 | Lin Nan, Victor Podlozhnyuk
4 | DirectX 11
5 |
6 | Source\OceanCS
7 | doc\OceanCS_sm.jpg
8 | doc\OceanCS_md.jpg
9 | doc\OceanCS_lg.jpg
10 |
11 |
12 | doc\OceanCS_Slides.pdf
13 | Bin\OceanCS.exe
14 | GeForce GTX 400
15 | DirectCompute
16 | 3D Graphics
17 | 110304
18 |
19 | ..\..\media\OceanCS
20 | ..\..\media\UI
21 | ..\OceanCS
22 |
23 |
24 |
--------------------------------------------------------------------------------
/OceanCS/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by HDRToneMappingCS11.rc
4 | //
5 | #define IDI_MAIN_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 113
12 | #define _APS_NEXT_COMMAND_VALUE 40029
13 | #define _APS_NEXT_CONTROL_VALUE 1000
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/OceanCS/skybox11.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef _SKYBOX11_H
16 | #define _SKYBOX11_H
17 |
18 | class CSkybox11
19 | {
20 | public:
21 | CSkybox11();
22 |
23 | HRESULT CALLBACK OnD3D11CreateDevice( ID3D11Device* pd3dDevice, float fSize,
24 | ID3D11Texture2D* pCubeTexture, ID3D11ShaderResourceView* pCubeRV );
25 |
26 | void OnD3D11ResizedSwapChain( const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc );
27 | void D3D11Render( D3DXMATRIX* pmWorldViewProj, ID3D11DeviceContext* pd3dImmediateContext );
28 | void OnD3D11ReleasingSwapChain();
29 | void OnD3D11DestroyDevice();
30 |
31 | ID3D11Texture2D* GetD3D10EnvironmentMap()
32 | {
33 | return m_pEnvironmentMap11;
34 | }
35 | ID3D11ShaderResourceView* GetD3D10EnvironmentMapRV()
36 | {
37 | return m_pEnvironmentRV11;
38 | }
39 | void SetD3D11EnvironmentMap( ID3D11Texture2D* pCubeTexture )
40 | {
41 | m_pEnvironmentMap11 = pCubeTexture;
42 | }
43 |
44 | protected:
45 | struct CB_VS_PER_OBJECT
46 | {
47 | D3DXMATRIX m_WorldViewProj;
48 | };
49 |
50 | ID3D11Texture2D* m_pEnvironmentMap11;
51 | ID3D11ShaderResourceView* m_pEnvironmentRV11;
52 | ID3D11Device* m_pd3dDevice11;
53 | ID3D11VertexShader* m_pVertexShader;
54 | ID3D11PixelShader* m_pPixelShader;
55 | ID3D11SamplerState* m_pSam;
56 | ID3D11InputLayout* m_pVertexLayout11;
57 | ID3D11Buffer* m_pcbVSPerObject;
58 | ID3D11Buffer* m_pVB11;
59 | ID3D11DepthStencilState* m_pDepthStencilState11;
60 |
61 | float m_fSize;
62 | };
63 |
64 | #endif
--------------------------------------------------------------------------------
/OceanCS/skybox11.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | cbuffer cbPerObject : register( b0 )
16 | {
17 | row_major matrix g_mWorldViewProjection : packoffset( c0 );
18 | }
19 |
20 | TextureCube g_EnvironmentTexture : register( t0 );
21 | SamplerState g_sam : register( s0 );
22 |
23 | struct SkyboxVS_Input
24 | {
25 | float4 Pos : POSITION;
26 | };
27 |
28 | struct SkyboxVS_Output
29 | {
30 | float4 Pos : SV_POSITION;
31 | float3 Tex : TEXCOORD0;
32 | };
33 |
34 | SkyboxVS_Output SkyboxVS( SkyboxVS_Input Input )
35 | {
36 | SkyboxVS_Output Output;
37 |
38 | Output.Pos = Input.Pos;
39 | Output.Tex = normalize( mul(Input.Pos, g_mWorldViewProjection) );
40 |
41 | return Output;
42 | }
43 |
44 | float4 SkyboxPS( SkyboxVS_Output Input ) : SV_TARGET
45 | {
46 | float4 color = g_EnvironmentTexture.Sample( g_sam, Input.Tex );
47 | return color;
48 | }
49 |
--------------------------------------------------------------------------------
/OpacityMapping/Camera.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef CUSTOM_CAMERA_H
16 | #define CUSTOM_CAMERA_H
17 |
18 | #include "DXUT.h"
19 |
20 | #include "DXUTCamera.h"
21 |
22 | class CCustomCamera : public CModelViewerCamera
23 | {
24 | public:
25 |
26 | CCustomCamera();
27 |
28 | const D3DXMATRIX* GetViewMatrix() const
29 | {
30 | return &m_mWorldToView;
31 | }
32 |
33 | void FrameMove(double fTime, float fElapsedTime, const D3DXVECTOR3& LookAt);
34 |
35 | virtual LRESULT HandleMessages( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
36 |
37 | HRESULT SaveState(double fTime);
38 |
39 | void ToggleDoAdjust() { m_bDoAdjust = !m_bDoAdjust; }
40 | BOOL GetDoAdjust() const { return m_bDoAdjust; }
41 |
42 | void ToggleCameraOrbit();
43 | void DisableCameraOrbit() { m_OrbitRate = 0.f; }
44 |
45 | // NB: This will hide the function with the same name in the base class, which is intentional
46 | // (so that we can preserve our custom min-radius setting)
47 | void SetViewParams( D3DXVECTOR3* pvEyePt, D3DXVECTOR3* pvLookatPt );
48 |
49 | private:
50 |
51 | HRESULT LoadState(double fTime);
52 | D3DXMATRIX GetOrbitMatrix();
53 |
54 | BOOL m_bMoveIn;
55 | BOOL m_bMoveOut;
56 |
57 | // Automatic adjust state
58 | BOOL m_bDoAdjust;
59 | BOOL m_bIsMoving;
60 | D3DXVECTOR3 m_CurrOffset;
61 | D3DXVECTOR3 m_TargetOffset;
62 | FLOAT m_Speed;
63 | FLOAT m_MaxError;
64 | BOOL m_FirstUpdate;
65 | double m_LastUpdateTime;
66 |
67 | FLOAT m_OrbitRate;
68 | FLOAT m_OrbitAngle;
69 |
70 | D3DXMATRIX m_mWorldToView;
71 | };
72 |
73 | #endif // CUSTOM_CAMERA_H
74 |
--------------------------------------------------------------------------------
/OpacityMapping/CameraState.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OpacityMapping/CameraState.bin
--------------------------------------------------------------------------------
/OpacityMapping/Floor.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef FLOOR_H
16 | #define FLOOR_H
17 |
18 | #include "DXUT.h"
19 |
20 | #include "D3DX11Effect.h"
21 |
22 | class CFloor
23 | {
24 | public:
25 |
26 | CFloor(FLOAT tileSize, FLOAT tileBevelSize, UINT tilesPerEdge);
27 |
28 | HRESULT OnD3D11CreateDevice(ID3D11Device* pd3dDevice);
29 | void OnD3D11DestroyDevice();
30 |
31 | void Draw(ID3D11DeviceContext* pDC, BOOL ShowOverdraw);
32 |
33 | HRESULT BindToEffect(ID3D11Device* pd3dDevice, ID3DX11Effect* pEffect);
34 |
35 | private:
36 |
37 | FLOAT m_TileSize;
38 | FLOAT m_TileBevelSize;
39 | UINT m_TilesPerEdge;
40 |
41 | ID3DX11EffectPass* m_pEffectPass;
42 | ID3DX11EffectPass* m_pEffectPass_OverdrawMeteringOverride;
43 |
44 | ID3DX11EffectMatrixVariable* m_mLocalToWorld_EffectVar;
45 |
46 | ID3D11Buffer* m_pVertexBuffer;
47 | ID3D11Buffer* m_pIndexBuffer;
48 | ID3D11InputLayout* m_pVertexLayout;
49 | };
50 |
51 | #endif // FLOOR_H
52 |
--------------------------------------------------------------------------------
/OpacityMapping/LineDraw.fx:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef LINE_DRAW_FX
16 | #define LINE_DRAW_FX
17 |
18 | #include "Globals.fx"
19 |
20 | //--------------------------------------------------------------------------------------
21 | // Globals
22 | //--------------------------------------------------------------------------------------
23 | float4 g_LineColor;
24 |
25 | //--------------------------------------------------------------------------------------
26 | // Structs
27 | //--------------------------------------------------------------------------------------
28 | struct VS_LINEDRAW_OUTPUT
29 | {
30 | float4 Position : SV_Position;
31 | };
32 |
33 | //--------------------------------------------------------------------------------------
34 | // Functions
35 | //--------------------------------------------------------------------------------------
36 | VS_LINEDRAW_OUTPUT RenderLinesVS( float4 vPos : POSITION )
37 | {
38 | VS_LINEDRAW_OUTPUT Output;
39 |
40 | float4 WorldPos = mul(vPos, g_mLocalToWorld);
41 | float4 ViewPos = mul(WorldPos, g_mWorldToView);
42 | Output.Position = mul(ViewPos,g_mViewToProj);
43 |
44 | return Output;
45 | }
46 |
47 | PS_OUTPUT RenderLinesPS()
48 | {
49 | PS_OUTPUT Output;
50 | Output.RGBColor = g_LineColor;
51 | return Output;
52 | }
53 |
54 | //--------------------------------------------------------------------------------------
55 | // Techniques
56 | //--------------------------------------------------------------------------------------
57 | technique11 RenderLines
58 | {
59 | pass P0
60 | {
61 | SetVertexShader( CompileShader( vs_4_0, RenderLinesVS() ) );
62 | SetGeometryShader( NULL );
63 | SetHullShader( NULL );
64 | SetDomainShader( NULL );
65 | SetPixelShader( CompileShader( ps_4_0, RenderLinesPS() ) );
66 |
67 | SetBlendState( TranslucentBlendRGB, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF );
68 | SetDepthStencilState( DepthReadOnly, 0 );
69 | SetRasterizerState( SolidNoCull );
70 | }
71 | }
72 |
73 | #endif // LINE_DRAW_FX
74 |
--------------------------------------------------------------------------------
/OpacityMapping/LineDraw.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef LINEDRAW_H
16 | #define LINEDRAW_H
17 |
18 | #include "DXUT.h"
19 |
20 | #include "D3DX11Effect.h"
21 |
22 | //--------------------------------------------------------------------------------------
23 | // Convenience class for drawing lines
24 | //--------------------------------------------------------------------------------------
25 | class CLineDraw
26 | {
27 | public:
28 |
29 | // Singleton
30 | static CLineDraw& Instance();
31 |
32 | HRESULT OnD3D11CreateDevice(ID3D11Device* pd3dDevice);
33 | void OnD3D11DestroyDevice();
34 |
35 | HRESULT DrawBounds(ID3D11DeviceContext* pDC, const D3DXMATRIX& mLocalToWorld, const D3DXVECTOR4& minCorner, const D3DXVECTOR4& maxCorner, const D3DXVECTOR4& rgba);
36 | HRESULT DrawBoundsArrows(ID3D11DeviceContext* pDC, const D3DXMATRIX& mLocalToWorld, const D3DXVECTOR4& minCorner, const D3DXVECTOR4& maxCorner, const D3DXVECTOR4& rgba);
37 |
38 | HRESULT SetLineColor(const D3DXVECTOR4& rgba);
39 |
40 | HRESULT BindToEffect(ID3D11Device* pd3dDevice, ID3DX11Effect* pEffect);
41 |
42 | private:
43 |
44 | CLineDraw();
45 |
46 | HRESULT DrawArrow(ID3D11DeviceContext* pDC, const D3DXVECTOR4& start, const D3DXVECTOR4& end, const D3DXVECTOR4& throwVector);
47 |
48 | ID3DX11EffectVectorVariable* m_LineColor_EffectVar;
49 | ID3DX11EffectMatrixVariable* m_mLocalToWorld_EffectVar;
50 | ID3DX11EffectPass* m_pEffectPass;
51 | ID3D11InputLayout* m_pVertexLayout;
52 |
53 | };
54 |
55 |
56 |
57 | #endif // LINEDRAW_H
58 |
--------------------------------------------------------------------------------
/OpacityMapping/Main.fx:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #include "Globals.fx"
16 | #include "ParticleSystem.fx"
17 | #include "LightSource.fx"
18 | #include "Floor.fx"
19 | #include "ScreenAlignedQuad.fx"
20 | #include "LineDraw.fx"
21 | #include "LowResOffscreen.fx"
22 | #include "OpaqueObject.fx"
23 | #include "DepthReduction.fx"
24 |
--------------------------------------------------------------------------------
/OpacityMapping/Main.fxo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OpacityMapping/Main.fxo
--------------------------------------------------------------------------------
/OpacityMapping/OpacityMapping.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | DirectX SDK Sample Program.
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/OpacityMapping/OpacityMapping.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #define IDC_STATIC -1
11 | #include
12 |
13 |
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | #undef APSTUDIO_READONLY_SYMBOLS
17 |
18 | /////////////////////////////////////////////////////////////////////////////
19 | // English (U.S.) resources
20 |
21 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
22 | #ifdef _WIN32
23 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
24 | #pragma code_page(1252)
25 | #endif //_WIN32
26 |
27 | /////////////////////////////////////////////////////////////////////////////
28 | //
29 | // RT_MANIFEST
30 | //
31 |
32 | // 1 RT_MANIFEST "OpacityMapping.manifest"
33 |
34 | /////////////////////////////////////////////////////////////////////////////
35 | //
36 | // Icon
37 | //
38 |
39 | // Icon with lowest ID value placed first to ensure application icon
40 | // remains consistent on all systems.
41 | IDI_MAIN_ICON ICON "..\\..\\Media\\directx.ico"
42 |
43 | #ifdef APSTUDIO_INVOKED
44 | /////////////////////////////////////////////////////////////////////////////
45 | //
46 | // TEXTINCLUDE
47 | //
48 |
49 | 1 TEXTINCLUDE
50 | BEGIN
51 | "resource.h\0"
52 | END
53 |
54 | 2 TEXTINCLUDE
55 | BEGIN
56 | "#define IDC_STATIC -1\r\n"
57 | "#include \r\n"
58 | "\r\n"
59 | "\r\n"
60 | "\0"
61 | END
62 |
63 | 3 TEXTINCLUDE
64 | BEGIN
65 | "\r\n"
66 | "\0"
67 | END
68 |
69 | #endif // APSTUDIO_INVOKED
70 |
71 | #endif // English (U.S.) resources
72 | /////////////////////////////////////////////////////////////////////////////
73 |
74 |
75 |
76 | #ifndef APSTUDIO_INVOKED
77 | /////////////////////////////////////////////////////////////////////////////
78 | //
79 | // Generated from the TEXTINCLUDE 3 resource.
80 | //
81 |
82 |
83 | /////////////////////////////////////////////////////////////////////////////
84 | #endif // not APSTUDIO_INVOKED
85 |
86 |
--------------------------------------------------------------------------------
/OpacityMapping/OpaqueObject.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef OPAQUEOBJECT_H
16 | #define OPAQUEOBJECT_H
17 |
18 | #include "DXUT.h"
19 |
20 | #include "D3DX11Effect.h"
21 |
22 | class CDXUTSDKMesh;
23 |
24 | class COpaqueObject
25 | {
26 | public:
27 |
28 | COpaqueObject(const D3DXVECTOR3& anchorPoint, const D3DXVECTOR3& startPos, double phase);
29 |
30 | HRESULT OnD3D11CreateDevice(ID3D11Device* pd3dDevice);
31 | void OnD3D11DestroyDevice();
32 |
33 | void OnFrameMove( double fTime, float fElapsedTime);
34 |
35 | void DrawToScene(ID3D11DeviceContext* pDC, BOOL ShowOverdraw);
36 |
37 | void DrawToShadowMap(ID3D11DeviceContext* pDC);
38 |
39 | void GetBounds(D3DXVECTOR3& MinCorner, D3DXVECTOR3& MaxCorner);
40 |
41 | HRESULT BindToEffect(ID3D11Device* pd3dDevice, ID3DX11Effect* pEffect);
42 |
43 | private:
44 |
45 | D3DXMATRIX GetLocalToWorld() const;
46 |
47 | double m_phase;
48 |
49 | FLOAT m_Scale;
50 |
51 | D3DXVECTOR3 m_AnchorPoint;
52 | D3DXVECTOR3 m_StartPosition;
53 |
54 | D3DXMATRIX m_CurrWorldMatrix;
55 |
56 | D3DXVECTOR3 m_MeshBoundsMinCorner;
57 | D3DXVECTOR3 m_MeshBoundsMaxCorner;
58 |
59 | CDXUTSDKMesh* m_pMesh;
60 |
61 | ID3DX11EffectPass* m_pEffectPass_RenderToScene;
62 | ID3DX11EffectPass* m_pEffectPass_RenderToShadowMap;
63 | ID3DX11EffectPass* m_pEffectPass_OverdrawMeteringOverride;
64 | ID3DX11EffectPass* m_pEffectPass_RenderThreadOverride;
65 |
66 | ID3DX11EffectMatrixVariable* m_mLocalToWorld_EffectVar;
67 |
68 | ID3D11InputLayout* m_pVertexLayout;
69 | };
70 |
71 | #endif // OPAQUEOBJECT_H
72 |
--------------------------------------------------------------------------------
/OpacityMapping/ParticleState.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OpacityMapping/ParticleState.bin
--------------------------------------------------------------------------------
/OpacityMapping/SharedDefines.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef SHAREDDEFINES_H
16 | #define SHAREDDEFINES_H
17 |
18 | #define NumActiveLights 3
19 |
20 | #endif // SHAREDDEFINES_H
21 |
--------------------------------------------------------------------------------
/OpacityMapping/doc/OpacityMappingSDKWhitePaper.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OpacityMapping/doc/OpacityMappingSDKWhitePaper.docx
--------------------------------------------------------------------------------
/OpacityMapping/doc/OpacityMappingSDKWhitePaper.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OpacityMapping/doc/OpacityMappingSDKWhitePaper.pdf
--------------------------------------------------------------------------------
/OpacityMapping/doc/OpacityMapping_lg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OpacityMapping/doc/OpacityMapping_lg.jpg
--------------------------------------------------------------------------------
/OpacityMapping/doc/OpacityMapping_md.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OpacityMapping/doc/OpacityMapping_md.jpg
--------------------------------------------------------------------------------
/OpacityMapping/doc/OpacityMapping_sm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/OpacityMapping/doc/OpacityMapping_sm.jpg
--------------------------------------------------------------------------------
/OpacityMapping/info.xml:
--------------------------------------------------------------------------------
1 |
2 | Opacity Mapping
3 | Jon Jansen, Louis Bavoil
4 | DirectX 11
5 |
6 | Source\OpacityMapping
7 | doc\OpacityMapping_sm.jpg
8 | doc\OpacityMapping_md.jpg
9 | doc\OpacityMapping_lg.jpg
10 |
11 |
12 | doc\OpacityMappingSDKWhitePaper.pdf
13 | Bin\OpacityMapping.exe
14 | GeForce GTX 400
15 | lighting, shadows, tessellation, particles, opacity mapping, fill rate
16 | 3D Graphics
17 | 110304
18 |
19 | ..\..\media\OpacityMapping
20 | ..\..\media\UI
21 | ..\OpacityMapping
22 |
23 |
24 |
--------------------------------------------------------------------------------
/OpacityMapping/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by OpacityMapping.rc
4 | //
5 | #define IDI_MAIN_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 113
12 | #define _APS_NEXT_COMMAND_VALUE 40029
13 | #define _APS_NEXT_CONTROL_VALUE 1000
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/PNPatches/PNPatches.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "WinResRc.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | #ifdef _WIN32
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 | #pragma code_page(1252)
22 | #endif //_WIN32
23 |
24 |
25 | #ifdef APSTUDIO_INVOKED
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // TEXTINCLUDE
29 | //
30 |
31 | 1 TEXTINCLUDE
32 | BEGIN
33 | "resource.h\0"
34 | END
35 |
36 | 2 TEXTINCLUDE
37 | BEGIN
38 | "#include ""WinResRc.h""\r\n"
39 | "\0"
40 | END
41 |
42 | 3 TEXTINCLUDE
43 | BEGIN
44 | "\r\n"
45 | "\0"
46 | END
47 |
48 | #endif // APSTUDIO_INVOKED
49 |
50 |
51 | /////////////////////////////////////////////////////////////////////////////
52 | //
53 | // Icon
54 | //
55 |
56 | // Icon with lowest ID value placed first to ensure application icon
57 | // remains consistent on all systems.
58 | IDI_ICON1 ICON "..\\..\\Media\\directx.ico"
59 | #endif // English (U.S.) resources
60 | /////////////////////////////////////////////////////////////////////////////
61 |
62 |
63 |
64 | #ifndef APSTUDIO_INVOKED
65 | /////////////////////////////////////////////////////////////////////////////
66 | //
67 | // Generated from the TEXTINCLUDE 3 resource.
68 | //
69 |
70 |
71 | /////////////////////////////////////////////////////////////////////////////
72 | #endif // not APSTUDIO_INVOKED
73 |
74 |
--------------------------------------------------------------------------------
/PNPatches/ProgressBar.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #include
16 |
17 | LRESULT CALLBACK ProgressBarProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
18 | DWORD WINAPI ProgressBarThread(void *lpParameter);
19 | void InitializeProgressBar();
20 | void DestroyProgressBar();
21 | void SetProgress(float fProgress);
22 | void SetProgressString(char *sProgressString);
--------------------------------------------------------------------------------
/PNPatches/doc/PNPatches_lg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/PNPatches/doc/PNPatches_lg.jpg
--------------------------------------------------------------------------------
/PNPatches/doc/PNPatches_md.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/PNPatches/doc/PNPatches_md.jpg
--------------------------------------------------------------------------------
/PNPatches/doc/PNPatches_sm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/PNPatches/doc/PNPatches_sm.jpg
--------------------------------------------------------------------------------
/PNPatches/doc/pnpatches.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/PNPatches/doc/pnpatches.doc
--------------------------------------------------------------------------------
/PNPatches/doc/pnpatches.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/PNPatches/doc/pnpatches.pdf
--------------------------------------------------------------------------------
/PNPatches/doc/readme.txt:
--------------------------------------------------------------------------------
1 | PNPatches sample navigation keys are as follows:
2 | ================================================
3 |
4 | 'W','S','A','D' - move camera (fly mode)
5 | Left mouse button - change camera direction
6 | '1','2','3' - choose one of predefined camera positions
7 | 'Backspace' - switch UI on/off
8 |
9 | UI can be used to:
10 | ==================
11 |
12 | - Choose one of geometry rendering modes:
13 | * no geometry
14 | * coarse model (initial untessellated model)
15 | * tessellated coarse (coarse model tessellated and displaced, with normal map)
16 | * detailed geometry (model with high poly count used to generate
17 | displacement and normal map)
18 | - Increase Tessellation level (only possible when tessellated coarse geometry
19 | is rendered).
20 | - Update Camera. Update internal frustum information used to cull patches in Hull
21 | Shader.
22 | - Show Wireframe.
23 | - Show Normals. Renders normals, tangents, and bitangents as colored lines.
24 | - Fix Displacement Seams. Enable/disable technique used to fix seams between
25 | triangles adjacent in world space but disjoint in texture space.
26 | - Draw Normal Map.
27 | - Draw Texture Coordinates.
28 | - Draw Displacement Map.
29 | - Draw Checker Board. Debug rendering mode allowing to see size of single
30 | displacement texel overlayed on top of rendered geometry.
31 | - Reload Effect. If you changed .fx file, pressing this button will force
32 | application to load, compile, and apply new shaders for rendering geometry.
33 |
--------------------------------------------------------------------------------
/PNPatches/info.xml:
--------------------------------------------------------------------------------
1 |
2 | PN-Patches
3 | Kirill Dmitriev, Evgeny Makarov
4 | DirectX 11
5 |
6 | Source\PNPatches
7 | doc\PNPatches_sm.jpg
8 | doc\PNPatches_md.jpg
9 | doc\PNPatches_lg.jpg
10 | doc\readme.txt
11 |
12 | doc\pnpatches.pdf
13 | Bin\PNPatches.exe
14 | GeForce GTX 400
15 | DirectX 11, Tessellation, PN-Triangles, PN-Quads, PN-Patches
16 | 3D Graphics
17 | 110304
18 |
19 | doc\readme.txt
20 | ..\..\media\PNPatches
21 | ..\..\media\UI
22 | ..\..\media\Tessellation
23 | ..\PNPatches
24 |
25 |
26 |
--------------------------------------------------------------------------------
/PNPatches/meshloader/bone_weights.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #pragma once
16 |
17 | struct BoneWeights
18 | {
19 | std::vector bones;
20 | std::vector weights;
21 | };
22 |
--------------------------------------------------------------------------------
/PNPatches/mymath/mymath_ext.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #include "mymath_ext.h"
16 |
17 | const float Math::TOL_MULT = 1./0x2000;
18 | const double Math::TOL_MULT = 1./0x1000000;
19 | const float Math::MIN_VALUE = 1e-35f;
20 | const double Math::MIN_VALUE = 1e-300;
21 | const float Math::MAX_VALUE = 1e+35f;
22 | const double Math::MAX_VALUE = 1e+300;
23 |
24 | float next_float(float number)
25 | {
26 | if (number != 0)
27 | {
28 | if (number > 0) ++(int &)number;
29 | else
30 | {
31 | if ((int &)number != (0x00800000 | 0x80000000))
32 | --(int &)number;
33 | else number = 0;
34 | }
35 | }
36 | else (int &)number = 0x00800000;
37 | return number;
38 | }
39 |
40 | float prev_float(float number)
41 | {
42 | if (number != 0)
43 | {
44 | if (number < 0) ++(int &)number;
45 | else
46 | {
47 | if ((int &)number != 0x00800000)
48 | --(int &)number;
49 | else number = 0;
50 | }
51 | }
52 | else (int &)number = (0x00800000 | 0x80000000);
53 | return number;
54 | }
55 |
56 | float truncate_double(double val)
57 | {
58 | if (val != 0)
59 | {
60 | unsigned *_val = (unsigned *)&val;
61 | _val[1] -= 0x38000000;
62 | unsigned result = (_val[1] & 0x80000000) | ((_val[1] << 3) & 0x7ffffff8) | (_val[0] >> 29);
63 | return (float &)result;
64 | }
65 | return 0;
66 | }
67 |
--------------------------------------------------------------------------------
/PNPatches/pnpatches.fxh:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | //Work-around for an optimization rule problem in the June 2010 HLSL Compiler
16 | // (9.29.952.3111)
17 | // see http://support.microsoft.com/kb/2448404
18 | #if D3DX_VERSION == 0xa2b
19 | #pragma ruledisable 0x0802405f
20 | #endif
21 |
22 | // Common subroutines
23 |
24 | float4 BernsteinBasis(float t)
25 | {
26 | float invT = 1.0f - t;
27 |
28 | return float4( invT * invT * invT,
29 | 3.0f * t * invT * invT,
30 | 3.0f * t * t * invT,
31 | t * t * t );
32 | }
33 |
34 | float3 EvaluateBezier( float3 p0, float3 p1, float3 p2, float3 p3,
35 | float3 p4, float3 p5, float3 p6, float3 p7,
36 | float3 p8, float3 p9, float3 p10, float3 p11,
37 | float3 p12, float3 p13, float3 p14, float3 p15,
38 | float4 BasisU,
39 | float4 BasisV )
40 | {
41 | float3 Value;
42 | Value = BasisV.x * ( p0 * BasisU.x + p1 * BasisU.y + p2 * BasisU.z + p3 * BasisU.w );
43 | Value += BasisV.y * ( p4 * BasisU.x + p5 * BasisU.y + p6 * BasisU.z + p7 * BasisU.w );
44 | Value += BasisV.z * ( p8 * BasisU.x + p9 * BasisU.y + p10 * BasisU.z + p11 * BasisU.w );
45 | Value += BasisV.w * ( p12 * BasisU.x + p13 * BasisU.y + p14 * BasisU.z + p15 * BasisU.w );
46 | return Value;
47 | }
--------------------------------------------------------------------------------
/PNPatches/pnpatches.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #pragma once
16 |
17 | #pragma warning(disable: 4995)
18 |
19 | #include "mymath/mymath.h"
20 |
--------------------------------------------------------------------------------
/PNPatches/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by EmptyProject10.rc
4 | //
5 | #define IDI_ICON1 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # NVIDIA-Direct3D-SDK-11
2 | NVIDIA Direct3D SDK 11
3 |
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/NVSSAO/NVSDK_D3D11_SSAO_MD.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/SSAO11/NVSDK_D3D11_SSAO/NVSSAO/NVSDK_D3D11_SSAO_MD.lib
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/NVSSAO/NVSDK_D3D11_SSAO_MDd.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/SSAO11/NVSDK_D3D11_SSAO/NVSSAO/NVSDK_D3D11_SSAO_MDd.lib
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/NVSSAO/NVSDK_D3D11_SSAO_MT.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/SSAO11/NVSDK_D3D11_SSAO/NVSSAO/NVSDK_D3D11_SSAO_MT.lib
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/NVSSAO/NVSDK_D3D11_SSAO_MTd.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/SSAO11/NVSDK_D3D11_SSAO/NVSSAO/NVSDK_D3D11_SSAO_MTd.lib
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/Source/Blur_Common.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | sampler PointClampSampler : register(s0);
16 | sampler LinearSamplerClamp : register(s1);
17 |
18 | // Use a static blur radius so the loops can be unrolled by fxc
19 | #define g_BlurRadius KERNEL_RADIUS
20 | #define g_HalfBlurRadius (g_BlurRadius/2)
21 |
22 | //----------------------------------------------------------------------------------
23 | float CrossBilateralWeight(float r, float d, float d0)
24 | {
25 | // The exp2(-r*r*g_BlurFalloff) expression below is pre-computed by fxc.
26 | // On GF100, this ||d-d0|| tAO : register(t0);
19 | sampler PointSampler : register(s0);
20 |
21 | //-------------------------------------------------------------------------
22 | float4 Blur_Composite_PS11( PostProc_VSOut IN) : SV_TARGET
23 | {
24 | float ao = tAO.Sample(PointSampler, IN.uv);
25 | return pow(ao, g_PowExponent);
26 | }
27 |
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/Source/ConstantBuffer.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | cbuffer GlobalConstantBuffer : register(b0)
16 | {
17 | float2 g_FullResolution;
18 | float2 g_InvFullResolution;
19 |
20 | float2 g_AOResolution;
21 | float2 g_InvAOResolution;
22 |
23 | float2 g_FocalLen;
24 | float2 g_InvFocalLen;
25 |
26 | float2 g_UVToViewA;
27 | float2 g_UVToViewB;
28 |
29 | float g_R;
30 | float g_R2;
31 | float g_NegInvR2;
32 | float g_MaxRadiusPixels;
33 |
34 | float g_AngleBias;
35 | float g_TanAngleBias;
36 | float g_PowExponent;
37 | float g_Strength;
38 |
39 | float g_BlurDepthThreshold;
40 | float g_BlurFalloff;
41 | float g_LinA;
42 | float g_LinB;
43 | };
44 |
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/Source/DownsampleDepth_PS.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #include "ConstantBuffer.hlsl"
16 | #include "FullscreenTriangle_VS.hlsl"
17 |
18 | Texture2D tDepth : register(t0);
19 |
20 | //----------------------------------------------------------------------------------
21 | float DownsampleDepth_PS11( PostProc_VSOut IN) : SV_TARGET
22 | {
23 | return tDepth.Load( int3(int2(IN.pos.xy)*2, 0) );
24 | }
25 |
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/Source/FullScreenTriangle_VS.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | struct PostProc_VSOut
16 | {
17 | float4 pos : SV_Position;
18 | float2 uv : TEXCOORD0;
19 | };
20 |
21 | //----------------------------------------------------------------------------------
22 | // Vertex shader that generates a full-screen triangle with texcoords
23 | //----------------------------------------------------------------------------------
24 | PostProc_VSOut FullScreenTriangle_VS11( uint id : SV_VertexID )
25 | {
26 | PostProc_VSOut output = (PostProc_VSOut)0.0f;
27 | output.uv = float2( (id << 1) & 2, id & 2 );
28 | output.pos = float4( output.uv * float2( 2.0f, -2.0f ) + float2( -1.0f, 1.0f) , 0.0f, 1.0f );
29 | return output;
30 | }
31 |
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/Source/LinearizeDepthNoMSAA_PS.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #include "ConstantBuffer.hlsl"
16 | #include "FullscreenTriangle_VS.hlsl"
17 |
18 | Texture2D tDepth : register(t0);
19 | sampler PointSampler : register(s0);
20 |
21 | //----------------------------------------------------------------------------------
22 | float LinearizeDepthNoMSAA_PS11(PostProc_VSOut IN) : SV_TARGET
23 | {
24 | float z = tDepth.Sample(PointSampler, IN.uv);
25 | return 1.0f / (z * g_LinA + g_LinB);
26 | }
27 |
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/Source/ResolveAndLinearizeDepthMSAA_PS.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #include "ConstantBuffer.hlsl"
16 | #include "FullscreenTriangle_VS.hlsl"
17 |
18 | Texture2DMS tDepth : register(t0);
19 |
20 | //----------------------------------------------------------------------------------
21 | float ResolveAndLinearizeDepthMSAA_PS11(PostProc_VSOut IN) : SV_TARGET
22 | {
23 | const int sampleId = 0;
24 | float z = tDepth.Load(int2(IN.pos.xy), sampleId);
25 | return 1.0f / (z * g_LinA + g_LinB);
26 | }
27 |
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/compile_all.bat:
--------------------------------------------------------------------------------
1 | start compile_blur.bat
2 | start compile_hbao.bat
3 |
4 | del "Bin\FullScreenTriangle_VS.h"
5 | fxc /O3 /T vs_5_0 Source/FullScreenTriangle_VS.hlsl /E FullScreenTriangle_VS11 /Fh "Bin/FullScreenTriangle_VS.h"
6 |
7 | del "Bin\DownsampleDepth_PS.h"
8 | fxc /O3 /T ps_5_0 Source/DownsampleDepth_PS.hlsl /E DownsampleDepth_PS11 /Fh "Bin/DownsampleDepth_PS.h"
9 |
10 | del "Bin\LinearizeDepthNoMSAA_PS.h"
11 | fxc /O3 /T ps_5_0 Source/LinearizeDepthNoMSAA_PS.hlsl /E LinearizeDepthNoMSAA_PS11 /Fh "Bin/LinearizeDepthNoMSAA_PS.h"
12 |
13 | del "Bin\ResolveAndLinearizeDepthMSAA_PS.h"
14 | fxc /O3 /T ps_5_0 Source/ResolveAndLinearizeDepthMSAA_PS.hlsl /E ResolveAndLinearizeDepthMSAA_PS11 /Fh "Bin/ResolveAndLinearizeDepthMSAA_PS.h"
15 |
16 | pause
17 |
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/compile_blur.bat:
--------------------------------------------------------------------------------
1 | del "Bin\Blur_Composite.h"
2 | fxc /T ps_5_0 /E Blur_Composite_PS11 "Source/Blur_Composite_PS.hlsl" /Fh "Bin/Blur_Composite.h"
3 |
4 | FOR /L %%A IN (0,2,16) DO helper_blur_cs.bat %%A
5 |
6 | pause
7 |
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/compile_hbao.bat:
--------------------------------------------------------------------------------
1 | del "Bin\HBAO_PS.h"
2 | fxc /O3 /T ps_5_0 Source/HBAO_PS.hlsl /E HBAO_PS11 /Fh "Bin/HBAO_PS.h"
3 |
4 | FOR /L %%A IN (1,1,8) DO helper_hbao_cs.bat %%A
5 |
6 | pause
7 |
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/fxc.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/SSAO11/NVSDK_D3D11_SSAO/Shaders/fxc.exe
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/helper_blur_cs.bat:
--------------------------------------------------------------------------------
1 | del "Bin\BlurX_CS_%1.h
2 | fxc /T cs_5_0 /E BlurX_CS11_%1 "Source/BlurX_CS.hlsl" /Fh Bin/BlurX_CS_%1.h /DKERNEL_RADIUS=%1 /DHALF_RES_AO=0
3 |
4 | del "Bin\UpsampleAndBlurX_CS_%1.h
5 | fxc /T cs_5_0 /E UpsampleAndBlurX_CS11_%1 "Source/BlurX_CS.hlsl" /Fh Bin/UpsampleAndBlurX_CS_%1.h /DKERNEL_RADIUS=%1 /DHALF_RES_AO=1
6 |
7 | del "Bin\BlurY_CS_%1.h"
8 | fxc /T cs_5_0 /E BlurY_CS11_%1 "Source/BlurY_CS.hlsl" /Fh Bin/BlurY_CS_%1.h /DKERNEL_RADIUS=%1
9 |
--------------------------------------------------------------------------------
/SSAO11/NVSDK_D3D11_SSAO/Shaders/helper_hbao_cs.bat:
--------------------------------------------------------------------------------
1 | del "Bin\HBAOX_CS_%1.h"
2 | fxc /T cs_5_0 /E HBAOX_CS11_%1 "Source/HBAO_CS.hlsl" /Fh "Bin/HBAOX_CS_%1.h" /DSTEP_SIZE=%1
3 |
4 | del "Bin\HBAOY_CS_%1.h"
5 | fxc /T cs_5_0 /E HBAOY_CS11_%1 "Source/HBAO_CS.hlsl" /Fh "Bin/HBAOY_CS_%1.h" /DSTEP_SIZE=%1
6 |
--------------------------------------------------------------------------------
/SSAO11/SSAO11.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | SSAO11
10 |
11 |
12 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/SSAO11/SSAO11.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 |
4 | #define APSTUDIO_READONLY_SYMBOLS
5 | /////////////////////////////////////////////////////////////////////////////
6 | //
7 | // Generated from the TEXTINCLUDE 2 resource.
8 | //
9 | #include "WinResRc.h"
10 |
11 | /////////////////////////////////////////////////////////////////////////////
12 | #undef APSTUDIO_READONLY_SYMBOLS
13 |
14 | /////////////////////////////////////////////////////////////////////////////
15 | // English (U.S.) resources
16 |
17 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
18 | #ifdef _WIN32
19 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
20 | #pragma code_page(1252)
21 | #endif //_WIN32
22 |
23 |
24 | #ifdef APSTUDIO_INVOKED
25 | /////////////////////////////////////////////////////////////////////////////
26 | //
27 | // TEXTINCLUDE
28 | //
29 |
30 | 1 TEXTINCLUDE
31 | BEGIN
32 | "resource.h\0"
33 | END
34 |
35 | 2 TEXTINCLUDE
36 | BEGIN
37 | "#include ""WinResRc.h""\r\n"
38 | "\0"
39 | END
40 |
41 | 3 TEXTINCLUDE
42 | BEGIN
43 | "\r\n"
44 | "\0"
45 | END
46 |
47 | #endif // APSTUDIO_INVOKED
48 |
49 |
50 | /////////////////////////////////////////////////////////////////////////////
51 | //
52 | // Icon
53 | //
54 |
55 | // Icon with lowest ID value placed first to ensure application icon
56 | // remains consistent on all systems.
57 | IDI_ICON1 ICON "..\\..\\Media\\directx.ico"
58 | #endif // English (U.S.) resources
59 | /////////////////////////////////////////////////////////////////////////////
60 |
61 |
62 |
63 | #ifndef APSTUDIO_INVOKED
64 | /////////////////////////////////////////////////////////////////////////////
65 | //
66 | // Generated from the TEXTINCLUDE 3 resource.
67 | //
68 |
69 |
70 | /////////////////////////////////////////////////////////////////////////////
71 | #endif // not APSTUDIO_INVOKED
72 |
73 |
--------------------------------------------------------------------------------
/SSAO11/doc/SSAO11.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/SSAO11/doc/SSAO11.docx
--------------------------------------------------------------------------------
/SSAO11/doc/SSAO11.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/SSAO11/doc/SSAO11.pdf
--------------------------------------------------------------------------------
/SSAO11/doc/SSAO11.wmv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/SSAO11/doc/SSAO11.wmv
--------------------------------------------------------------------------------
/SSAO11/doc/SSAO11_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/SSAO11/doc/SSAO11_128.png
--------------------------------------------------------------------------------
/SSAO11/doc/SSAO11_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/SSAO11/doc/SSAO11_256.png
--------------------------------------------------------------------------------
/SSAO11/doc/SSAO11_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/SSAO11/doc/SSAO11_512.png
--------------------------------------------------------------------------------
/SSAO11/info.xml:
--------------------------------------------------------------------------------
1 |
2 | Horizon-Based Ambient Occlusion using Compute Shaders
3 | Louis Bavoil
4 | DirectX 11
5 |
6 | Source\SSAO11
7 | doc\SSAO11_128.png
8 | doc\SSAO11_256.png
9 | doc\SSAO11_512.png
10 |
11 |
12 | doc\SSAO11.pdf
13 | bin\SSAO11.exe
14 | GeForce GTX 400
15 | HLSL,DXSAS
16 | 3D Graphics
17 | 110304
18 |
19 | ..\..\media\directx.ico
20 | ..\..\media\SSAO11
21 | ..\..\media\UI
22 | ..\..\media\AT-AT.sdkmesh
23 | ..\..\media\Sibenik.sdkmesh
24 | ..\..\media\leaves.sdkmesh
25 | ..\SSAO11
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ShowTessellationPatterns/TessPattern.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "WinResRc.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | #ifdef _WIN32
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 | #pragma code_page(1252)
22 | #endif //_WIN32
23 |
24 |
25 | #ifdef APSTUDIO_INVOKED
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // TEXTINCLUDE
29 | //
30 |
31 | 1 TEXTINCLUDE
32 | BEGIN
33 | "resource.h\0"
34 | END
35 |
36 | 2 TEXTINCLUDE
37 | BEGIN
38 | "#include ""WinResRc.h""\r\n"
39 | "\0"
40 | END
41 |
42 | 3 TEXTINCLUDE
43 | BEGIN
44 | "\r\n"
45 | "\0"
46 | END
47 |
48 | #endif // APSTUDIO_INVOKED
49 |
50 |
51 | /////////////////////////////////////////////////////////////////////////////
52 | //
53 | // Icon
54 | //
55 |
56 | // Icon with lowest ID value placed first to ensure application icon
57 | // remains consistent on all systems.
58 | IDI_ICON1 ICON "..\\..\\Media\\directx.ico"
59 | #endif // English (U.S.) resources
60 | /////////////////////////////////////////////////////////////////////////////
61 |
62 |
63 |
64 | #ifndef APSTUDIO_INVOKED
65 | /////////////////////////////////////////////////////////////////////////////
66 | //
67 | // Generated from the TEXTINCLUDE 3 resource.
68 | //
69 |
70 |
71 | /////////////////////////////////////////////////////////////////////////////
72 | #endif // not APSTUDIO_INVOKED
73 |
74 |
--------------------------------------------------------------------------------
/ShowTessellationPatterns/doc/README.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 | Overview:
4 | ==================
5 | This sample demonstrates the tessellation patterns on triangle and quad domain.
6 |
7 |
8 | UI can be used to:
9 | ==================
10 | - Select Tessellation Mode:
11 | * Integer
12 | * power2
13 | * Fractional Odd
14 | * Fractional Even
15 |
16 | - Specify Tessellation Factor per edge
17 | * 3 edges per triangle, 4 edges per quad
18 | * up to 64
19 |
20 | - Specify Interior Tessellation factor
21 | * Max
22 | * Min
23 | * Average
24 |
25 |
--------------------------------------------------------------------------------
/ShowTessellationPatterns/doc/ShowTessellationPatterns_lg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/ShowTessellationPatterns/doc/ShowTessellationPatterns_lg.jpg
--------------------------------------------------------------------------------
/ShowTessellationPatterns/doc/ShowTessellationPatterns_md.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/ShowTessellationPatterns/doc/ShowTessellationPatterns_md.jpg
--------------------------------------------------------------------------------
/ShowTessellationPatterns/doc/ShowTessellationPatterns_sm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/ShowTessellationPatterns/doc/ShowTessellationPatterns_sm.jpg
--------------------------------------------------------------------------------
/ShowTessellationPatterns/info.xml:
--------------------------------------------------------------------------------
1 |
2 | Tessellation Pattern Viewer
3 | Tianyun Ni
4 | DirectX 11
5 |
6 | Source\ShowTessellationPatterns
7 | doc\ShowTessellationPatterns_sm.jpg
8 | doc\ShowTessellationPatterns_md.jpg
9 | doc\ShowTessellationPatterns_lg.jpg
10 | doc\README.txt
11 |
12 |
13 | Bin\ShowTessellationPatterns.exe
14 | GeForce GTX 400
15 | DirectX 11, Tessellation
16 | 3D Graphics
17 | 110304
18 |
19 | ..\..\media\UI
20 | ..\ShowTessellationPatterns
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ShowTessellationPatterns/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by EmptyProject10.rc
4 | //
5 | #define IDI_ICON1 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/StereoIssues/StereoIssues.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "WinResRc.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | #ifdef _WIN32
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 | #pragma code_page(1252)
22 | #endif //_WIN32
23 |
24 |
25 | #ifdef APSTUDIO_INVOKED
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // TEXTINCLUDE
29 | //
30 |
31 | 1 TEXTINCLUDE
32 | BEGIN
33 | "resource.h\0"
34 | END
35 |
36 | 2 TEXTINCLUDE
37 | BEGIN
38 | "#include ""WinResRc.h""\r\n"
39 | "\0"
40 | END
41 |
42 | 3 TEXTINCLUDE
43 | BEGIN
44 | "\r\n"
45 | "\0"
46 | END
47 |
48 | #endif // APSTUDIO_INVOKED
49 |
50 |
51 | /////////////////////////////////////////////////////////////////////////////
52 | //
53 | // Icon
54 | //
55 |
56 | // Icon with lowest ID value placed first to ensure application icon
57 | // remains consistent on all systems.
58 | IDI_ICON1 ICON "..\\..\\Media\\directx.ico"
59 | #endif // English (U.S.) resources
60 | /////////////////////////////////////////////////////////////////////////////
61 |
62 |
63 |
64 | #ifndef APSTUDIO_INVOKED
65 | /////////////////////////////////////////////////////////////////////////////
66 | //
67 | // Generated from the TEXTINCLUDE 3 resource.
68 | //
69 |
70 |
71 | /////////////////////////////////////////////////////////////////////////////
72 | #endif // not APSTUDIO_INVOKED
73 |
74 |
--------------------------------------------------------------------------------
/StereoIssues/doc/3DV - BestPracticesGuide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/StereoIssues/doc/3DV - BestPracticesGuide.pdf
--------------------------------------------------------------------------------
/StereoIssues/doc/StereoIssues_lg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/StereoIssues/doc/StereoIssues_lg.jpg
--------------------------------------------------------------------------------
/StereoIssues/doc/StereoIssues_md.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/StereoIssues/doc/StereoIssues_md.jpg
--------------------------------------------------------------------------------
/StereoIssues/doc/StereoIssues_sm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/StereoIssues/doc/StereoIssues_sm.jpg
--------------------------------------------------------------------------------
/StereoIssues/info.xml:
--------------------------------------------------------------------------------
1 |
2 | 3D Vision Sample
3 | John McDonald
4 | DirectX 11
5 |
6 | Source\StereoIssues
7 | doc\StereoIssues_sm.jpg
8 | doc\StereoIssues_md.jpg
9 | doc\StereoIssues_lg.jpg
10 |
11 |
12 | doc\3DV - BestPracticesGuide.pdf
13 | Bin\StereoIssues.exe
14 | GeForce 8
15 | Stereo, Direct3D10, nvapi, nvstereo
16 | 3D Graphics
17 | 110304
18 |
19 | ..\..\media\bunny.sdkmesh
20 | ..\..\media\UI
21 | nvapi.lib
22 | ..\..\media\bubblebunny.png
23 | ..\..\media\cursor.png
24 | ..\StereoIssues
25 |
26 |
27 |
--------------------------------------------------------------------------------
/StereoIssues/nvapi.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/StereoIssues/nvapi.lib
--------------------------------------------------------------------------------
/StereoIssues/nvstereo.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 |
16 | #include "d3d9.h"
17 | #include "d3d10.h"
18 | #include "nvstereo.h"
19 |
20 | #pragma comment(lib, "nvapi.lib")
21 |
--------------------------------------------------------------------------------
/StereoIssues/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by EmptyProject10.rc
4 | //
5 | #define IDI_ICON1 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/StochasticTransparency/OIT.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | OIT11
10 |
11 |
12 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/StochasticTransparency/OIT.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 |
4 | #define APSTUDIO_READONLY_SYMBOLS
5 | /////////////////////////////////////////////////////////////////////////////
6 | //
7 | // Generated from the TEXTINCLUDE 2 resource.
8 | //
9 | #define IDC_STATIC -1
10 | #include
11 |
12 |
13 | /////////////////////////////////////////////////////////////////////////////
14 | #undef APSTUDIO_READONLY_SYMBOLS
15 |
16 | /////////////////////////////////////////////////////////////////////////////
17 | // English (U.S.) resources
18 |
19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
20 | #ifdef _WIN32
21 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
22 | #pragma code_page(1252)
23 | #endif //_WIN32
24 |
25 | /////////////////////////////////////////////////////////////////////////////
26 | //
27 | // Icon
28 | //
29 |
30 | // Icon with lowest ID value placed first to ensure application icon
31 | // remains consistent on all systems.
32 | IDI_MAIN_ICON ICON "..\\..\\Media\\directx.ico"
33 |
34 | #ifdef APSTUDIO_INVOKED
35 | /////////////////////////////////////////////////////////////////////////////
36 | //
37 | // TEXTINCLUDE
38 | //
39 |
40 | 1 TEXTINCLUDE
41 | BEGIN
42 | "resource.h\0"
43 | END
44 |
45 | 2 TEXTINCLUDE
46 | BEGIN
47 | "#define IDC_STATIC -1\r\n"
48 | "#include \r\n"
49 | "\r\n"
50 | "\r\n"
51 | "\0"
52 | END
53 |
54 | 3 TEXTINCLUDE
55 | BEGIN
56 | "\r\n"
57 | "\0"
58 | END
59 |
60 | #endif // APSTUDIO_INVOKED
61 |
62 | #endif // English (U.S.) resources
63 | /////////////////////////////////////////////////////////////////////////////
64 |
65 |
66 |
67 | #ifndef APSTUDIO_INVOKED
68 | /////////////////////////////////////////////////////////////////////////////
69 | //
70 | // Generated from the TEXTINCLUDE 3 resource.
71 | //
72 |
73 |
74 | /////////////////////////////////////////////////////////////////////////////
75 | #endif // not APSTUDIO_INVOKED
76 |
77 |
--------------------------------------------------------------------------------
/StochasticTransparency/PlainAlphaBlending.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #include "BaseTechnique.hlsl"
16 |
17 | Texture2D tResolvedColor : register(t0);
18 |
19 | float4 ShadingPS ( Geometry_VSOut IN ) : SV_Target
20 | {
21 | float4 color = ShadeFragment(IN.Normal);
22 | return float4(color.rgb, color.a);
23 | }
24 |
25 | float4 FinalPS ( FullscreenVSOut IN ) : SV_TARGET
26 | {
27 | return tResolvedColor.Load( int3( IN.pos.xy, 0 ) );
28 | }
29 |
--------------------------------------------------------------------------------
/StochasticTransparency/RandomColors.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #include
16 |
17 | inline float mix(float x, float y, float a)
18 | {
19 | return x * (1.0f - a) + y * a;
20 | }
21 |
22 | void ComputeRandomColor(UINT subsetId, D3DXVECTOR3 &OutputColor)
23 | {
24 | float h,s,v, r,g,b, h1,h3;
25 | h = fmodf((subsetId + 101) * 0.7182863f, 1.0f);
26 | s = 0.5;
27 | v = 1.0;
28 |
29 | h3 = 3.f * h;
30 | h1 = fmodf(h3, 1.0);
31 | r = g = b = 0.f;
32 | if (h3 < 1)
33 | {
34 | r = 1-h1;
35 | g = h1;
36 | }
37 | else if (h3 < 2)
38 | {
39 | g = 1-h1;
40 | b = h1;
41 | }
42 | else
43 | {
44 | b = 1-h1;
45 | r = h1;
46 | }
47 | OutputColor.x = mix(1, r, s) * v;
48 | OutputColor.y = mix(1, g, s) * v;
49 | OutputColor.z = mix(1, b, s) * v;
50 | }
51 |
--------------------------------------------------------------------------------
/StochasticTransparency/Scene.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #pragma once
16 |
17 | #include "SDKmesh.h"
18 |
19 | #define MAX_PATH_STR 512
20 |
21 | class Scene
22 | {
23 | public:
24 | static void CreateMesh(ID3D11Device* pd3dDevice)
25 | {
26 | HRESULT hr;
27 | V( m_Mesh.Create(pd3dDevice, L"..\\Media\\StochasticTransparency\\motor.sdkmesh") );
28 | }
29 |
30 | static void ReleaseMesh()
31 | {
32 | m_Mesh.Destroy();
33 | }
34 |
35 | protected:
36 | static CDXUTSDKMesh m_Mesh;
37 | };
38 |
--------------------------------------------------------------------------------
/StochasticTransparency/doc/ConstantMemoryOIT.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/StochasticTransparency/doc/ConstantMemoryOIT.pdf
--------------------------------------------------------------------------------
/StochasticTransparency/doc/StochasticTransparency_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/StochasticTransparency/doc/StochasticTransparency_128.png
--------------------------------------------------------------------------------
/StochasticTransparency/doc/StochasticTransparency_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/StochasticTransparency/doc/StochasticTransparency_256.png
--------------------------------------------------------------------------------
/StochasticTransparency/doc/StochasticTransparency_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/StochasticTransparency/doc/StochasticTransparency_512.png
--------------------------------------------------------------------------------
/TerrainTessellation/Common.fxh:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef INCLUDED_COMMON_FXH
16 | #define INCLUDED_COMMON_FXH
17 |
18 | static const int CONTROL_VTX_PER_TILE_EDGE = 9;
19 | static const int PATCHES_PER_TILE_EDGE = 8;
20 | static const float RECIP_CONTROL_VTX_PER_TILE_EDGE = 1.0 / 9;
21 | static const float WORLD_SCALE = 400;
22 | static const float VERTICAL_SCALE = 0.65;
23 | static const float WORLD_UV_REPEATS = 8; // How many UV repeats across the world for fractal generation.
24 | static const float WORLD_UV_REPEATS_RECIP = 1.0 / WORLD_UV_REPEATS;
25 |
26 | int3 g_FractalOctaves; // ridge, fBm, uv twist
27 | float3 g_TextureWorldOffset; // Offset of fractal terrain in texture space.
28 | float g_CoarseSampleSpacing; // World space distance between samples in the coarse height map.
29 |
30 | struct Adjacency
31 | {
32 | // These are the size of the neighbours along +/- x or y axes. For interior tiles
33 | // this is 1. For edge tiles it is 0.5 or 2.0.
34 | float neighbourMinusX : ADJACENCY_SIZES0;
35 | float neighbourMinusY : ADJACENCY_SIZES1;
36 | float neighbourPlusX : ADJACENCY_SIZES2;
37 | float neighbourPlusY : ADJACENCY_SIZES3;
38 | };
39 |
40 | struct AppVertex
41 | {
42 | float2 position : POSITION_2D;
43 | Adjacency adjacency;
44 | uint VertexId : SV_VertexID;
45 | uint InstanceId : SV_InstanceID;
46 | };
47 |
48 | SamplerState SamplerRepeatMaxAniso
49 | {
50 | Filter = ANISOTROPIC;
51 | MaxAnisotropy = 16;
52 | AddressU = Wrap;
53 | AddressV = Wrap;
54 | };
55 |
56 | SamplerState SamplerRepeatMedAniso
57 | {
58 | Filter = ANISOTROPIC;
59 | MaxAnisotropy = 4;
60 | AddressU = Wrap;
61 | AddressV = Wrap;
62 | };
63 |
64 | SamplerState SamplerRepeatLinear
65 | {
66 | Filter = MIN_MAG_MIP_LINEAR;
67 | AddressU = Wrap;
68 | AddressV = Wrap;
69 | };
70 |
71 | SamplerState SamplerClampLinear
72 | {
73 | Filter = MIN_MAG_MIP_LINEAR;
74 | AddressU = Clamp;
75 | AddressV = Clamp;
76 | };
77 |
78 | SamplerState SamplerRepeatPoint
79 | {
80 | Filter = MIN_MAG_MIP_POINT;
81 | AddressU = Wrap;
82 | AddressV = Wrap;
83 | };
84 |
85 | #endif //INCLUDED_COMMON_FXH
86 |
--------------------------------------------------------------------------------
/TerrainTessellation/Doc/TerrainTessellation_WhitePaper.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/TerrainTessellation/Doc/TerrainTessellation_WhitePaper.docx
--------------------------------------------------------------------------------
/TerrainTessellation/Doc/TerrainTessellation_WhitePaper.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/TerrainTessellation/Doc/TerrainTessellation_WhitePaper.pdf
--------------------------------------------------------------------------------
/TerrainTessellation/Doc/TerrainTessellation_lg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/TerrainTessellation/Doc/TerrainTessellation_lg.jpg
--------------------------------------------------------------------------------
/TerrainTessellation/Doc/TerrainTessellation_md.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/TerrainTessellation/Doc/TerrainTessellation_md.jpg
--------------------------------------------------------------------------------
/TerrainTessellation/Doc/TerrainTessellation_sm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/TerrainTessellation/Doc/TerrainTessellation_sm.jpg
--------------------------------------------------------------------------------
/TerrainTessellation/Doc/TriangleSizeVsPerf.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/TerrainTessellation/Doc/TriangleSizeVsPerf.xlsx
--------------------------------------------------------------------------------
/TerrainTessellation/Picking.fx:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | struct PickVertex
16 | {
17 | float4 vPosition : SV_Position;
18 | float4 pickParams : TEXCOORD0;
19 | };
20 |
21 | //------------------------------------------------------------------------------
22 | // Picking pass
23 | PickVertex PickVS( AppVertex input )
24 | {
25 | float3 displacedPos;
26 | int2 intUV;
27 | ReconstructPosition(input, displacedPos, intUV);
28 |
29 | const int mipLevel = 0;
30 | float z = g_fDisplacementHeight * g_CoarseHeightMap.SampleLevel(SamplerClampLinear, displacedPos.xz, mipLevel, int2(1,1)).r;
31 | displacedPos.y += z;
32 |
33 | // TBD: fix to work with non-texture array version??!?!
34 | //float tileY = floor(input.InstanceId * RECIP_N_TILES);
35 | //float tileX = input.InstanceId - tileY * N_TILES;
36 |
37 | PickVertex output = (PickVertex) 0;
38 | //output.pickParams = float4(tileX, tileY, displacedPos.xz);
39 |
40 | output.vPosition = mul( float4( displacedPos, 1.0f ), g_WorldViewProj );
41 |
42 | return output;
43 | }
44 |
45 | float4 PickPS( PickVertex input ) : SV_Target
46 | {
47 | return input.pickParams;
48 | }
49 |
--------------------------------------------------------------------------------
/TerrainTessellation/SkyBox11.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef _SKYBOX11_H
16 | #define _SKYBOX11_H
17 |
18 | class CSkybox11
19 | {
20 | public:
21 | CSkybox11();
22 |
23 | HRESULT CALLBACK OnD3D11CreateDevice( ID3D11Device* pd3dDevice, float fSize,
24 | ID3D11Texture2D* pCubeTexture, ID3D11ShaderResourceView* pCubeRV );
25 |
26 | void OnD3D11ResizedSwapChain( const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc );
27 | void D3D11Render( D3DXMATRIX* pmWorldViewProj, ID3D11DeviceContext* pd3dImmediateContext );
28 | void OnD3D11ReleasingSwapChain();
29 | void OnD3D11DestroyDevice();
30 |
31 | ID3D11Texture2D* GetD3D10EnvironmentMap()
32 | {
33 | return m_pEnvironmentMap11;
34 | }
35 | ID3D11ShaderResourceView* GetD3D10EnvironmentMapRV()
36 | {
37 | return m_pEnvironmentRV11;
38 | }
39 | void SetD3D11EnvironmentMap( ID3D11Texture2D* pCubeTexture )
40 | {
41 | m_pEnvironmentMap11 = pCubeTexture;
42 | }
43 |
44 | protected:
45 | struct CB_VS_PER_OBJECT
46 | {
47 | D3DXMATRIX m_WorldViewProj;
48 | };
49 |
50 | ID3D11Texture2D* m_pEnvironmentMap11;
51 | ID3D11ShaderResourceView* m_pEnvironmentRV11;
52 | ID3D11Device* m_pd3dDevice11;
53 | ID3D11VertexShader* m_pVertexShader;
54 | ID3D11PixelShader* m_pPixelShader;
55 | ID3D11SamplerState* m_pSam;
56 | ID3D11InputLayout* m_pVertexLayout11;
57 | ID3D11Buffer* m_pcbVSPerObject;
58 | ID3D11Buffer* m_pVB11;
59 | ID3D11DepthStencilState* m_pDepthStencilState11;
60 | ID3D11RasterizerState* m_pRasterizerState11;
61 |
62 | void StoreD3D11State(ID3D11DeviceContext*);
63 | void RestoreD3D11State(ID3D11DeviceContext*);
64 | ID3D11DepthStencilState* m_pDepthStencilStateStored11;
65 | UINT m_StencilRefStored11;
66 | ID3D11RasterizerState* m_pRasterizerStateStored11;
67 | ID3D11BlendState* m_pBlendStateStored11;
68 | float m_BlendFactorStored11[4];
69 | UINT m_SampleMaskStored11;
70 | ID3D11SamplerState* m_pSamplerStateStored11;
71 |
72 | float m_fSize;
73 | };
74 |
75 | #endif
--------------------------------------------------------------------------------
/TerrainTessellation/SkyBox11.hlsl:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | cbuffer cbPerObject : register( b0 )
16 | {
17 | row_major matrix g_mWorldViewProjection : packoffset( c0 );
18 | }
19 |
20 | TextureCube g_EnvironmentTexture : register( t0 );
21 | SamplerState g_sam : register( s0 );
22 |
23 | struct SkyboxVS_Input
24 | {
25 | float4 Pos : POSITION;
26 | };
27 |
28 | struct SkyboxVS_Output
29 | {
30 | float4 Pos : SV_POSITION;
31 | float3 Tex : TEXCOORD0;
32 | };
33 |
34 | SkyboxVS_Output SkyboxVS( SkyboxVS_Input Input )
35 | {
36 | SkyboxVS_Output Output;
37 |
38 | Output.Pos = Input.Pos;
39 | Output.Tex = normalize( mul(Input.Pos, g_mWorldViewProjection) );
40 |
41 | return Output;
42 | }
43 |
44 | float4 SkyboxPS( SkyboxVS_Output Input ) : SV_TARGET
45 | {
46 | const float DARKEN_FUDGE = 0.1;
47 | float4 color = DARKEN_FUDGE * g_EnvironmentTexture.Sample( g_sam, Input.Tex );
48 | return color;
49 | }
50 |
--------------------------------------------------------------------------------
/TerrainTessellation/Stars.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | extern void ReadStars();
16 | extern void CreateStars(ID3D11Device*);
17 | extern D3DXMATRIX StarWorldMatrix(float starRotation = 0);
18 | extern void RenderStars(ID3D11DeviceContext*, const D3DXMATRIX& mView, const D3DXMATRIX& mProj, const D3DXVECTOR2& screenSize);
19 | extern void ReleaseStars();
20 |
--------------------------------------------------------------------------------
/TerrainTessellation/TerrainTessellation.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | Using perlin noise for volumetric fire simulation
10 |
11 |
12 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/TerrainTessellation/TerrainTessellation.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "WinResRc.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | #ifdef _WIN32
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 | #pragma code_page(1252)
22 | #endif //_WIN32
23 |
24 | #ifdef APSTUDIO_INVOKED
25 | /////////////////////////////////////////////////////////////////////////////
26 | //
27 | // TEXTINCLUDE
28 | //
29 |
30 | 1 TEXTINCLUDE
31 | BEGIN
32 | "resource.h\0"
33 | END
34 |
35 | 2 TEXTINCLUDE
36 | BEGIN
37 | "#include ""WinResRc.h""\r\n"
38 | "\0"
39 | END
40 |
41 | 3 TEXTINCLUDE
42 | BEGIN
43 | "\r\n"
44 | "\0"
45 | END
46 |
47 | #endif // APSTUDIO_INVOKED
48 |
49 |
50 | /////////////////////////////////////////////////////////////////////////////
51 | //
52 | // Icon
53 | //
54 |
55 | // Icon with lowest ID value placed first to ensure application icon
56 | // remains consistent on all systems.
57 | IDI_ICON1 ICON "..\\..\\Media\\directx.ico"
58 |
59 | /////////////////////////////////////////////////////////////////////////////
60 | //
61 | // Bitmap
62 | //
63 |
64 | #endif // English (U.S.) resources
65 | /////////////////////////////////////////////////////////////////////////////
66 |
67 |
68 |
69 | #ifndef APSTUDIO_INVOKED
70 | /////////////////////////////////////////////////////////////////////////////
71 | //
72 | // Generated from the TEXTINCLUDE 3 resource.
73 | //
74 |
75 |
76 | /////////////////////////////////////////////////////////////////////////////
77 | #endif // not APSTUDIO_INVOKED
78 |
79 |
--------------------------------------------------------------------------------
/TerrainTessellation/info.xml:
--------------------------------------------------------------------------------
1 |
2 | TerrainTessellation
3 | Iain Cantlay
4 | DirectX 11
5 |
8 | Source\TerrainTessellation
9 | doc\TerrainTessellation_sm.jpg
10 | doc\TerrainTessellation_md.jpg
11 | doc\TerrainTessellation_lg.jpg
12 |
13 |
14 | Doc\TerrainTessellation_WhitePaper.pdf
15 | Bin\TerrainTessellation.exe
16 | GeForce GTX 400
17 | Tessellation, terrain, hull shader, domain shader, displacement mapping, fractals
18 | 3D Graphics
19 | 110304
20 |
21 | ..\..\media\TerrainTessellation
22 | ..\..\media\UI
23 | ..\..\media\fBm3Octaves.dds
24 | ..\..\media\fBm5Octaves.dds
25 | ..\..\media\fBm5OctavesGrad.dds
26 | ..\..\media\GaussianNoise256.jpg
27 | SkyBox11.hlsl
28 | ..\TerrainTessellation
29 |
30 |
31 |
--------------------------------------------------------------------------------
/TerrainTessellation/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by DX10FeatureTest.rc
4 | //
5 | #define IDB_REFERENCE_SCREENSHOT 101
6 | #define IDI_ICON1 102
7 |
8 | // Next default values for new objects
9 | //
10 | #ifdef APSTUDIO_INVOKED
11 | #ifndef APSTUDIO_READONLY_SYMBOLS
12 | #define _APS_NEXT_RESOURCE_VALUE 103
13 | #define _APS_NEXT_COMMAND_VALUE 40001
14 | #define _APS_NEXT_CONTROL_VALUE 1001
15 | #define _APS_NEXT_SYMED_VALUE 101
16 | #endif
17 | #endif
18 |
--------------------------------------------------------------------------------
/nBodyCS/doc/nBodyCS_lg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/nBodyCS/doc/nBodyCS_lg.jpg
--------------------------------------------------------------------------------
/nBodyCS/doc/nBodyCS_md.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/nBodyCS/doc/nBodyCS_md.jpg
--------------------------------------------------------------------------------
/nBodyCS/doc/nBodyCS_sm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiveMirror/NVIDIA-Direct3D-SDK-11/a2d3cc46179364c9faa3e218eff230883badcd79/nBodyCS/doc/nBodyCS_sm.jpg
--------------------------------------------------------------------------------
/nBodyCS/doc/readme.txt:
--------------------------------------------------------------------------------
1 | N-Body Simulation with DirectCompute Shaders
2 | --------------------------------------------
3 |
4 | This program performs a parallel simulation of an "N-body" system of stars. That is, it simulates the evolution over time of the positions and velocities of a number of massive bodies, such as stars, that all influence each other via gravitational attraction. Because all bodies interact with all others, there are O(N^2) interactions to compute at each time step (each frame). This is a lot of computation, but it is highly parallel and is thus amenable to GPU implementation using DirectCompute shaders.
5 |
6 | The simulation utilizes DirectCompute groupshared memory to cache body positions and share them among all threads of a thread group. This greatly reduces off-chip bandwidth use.
7 |
--------------------------------------------------------------------------------
/nBodyCS/info.xml:
--------------------------------------------------------------------------------
1 |
2 | N-Body Interaction
3 | Mark Harris
4 | DirectX 11
5 |
7 | Source\nBodyCS
8 | doc\nBodyCS_sm.jpg
9 | doc\nBodyCS_md.jpg
10 | doc\nBodyCS_lg.jpg
11 |
12 |
13 |
14 | Bin\nbodyCS.exe
15 | GeForce GTX 400
16 | Graphics Interop,Physically-Based Simulation,Data-Parallel Algorithms
17 | 3D Graphics
18 | 110304
19 |
20 | ..\..\media\pointsprite_grey.dds
21 | ..\..\media\UI
22 | ..\nBodyCS
23 |
24 |
25 |
--------------------------------------------------------------------------------
/nBodyCS/nBodyCS.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
2 | //
3 | // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
4 | // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
5 | // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF
6 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
7 | // OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT, OR
8 | // CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
9 | // OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY
10 | // OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
11 | // EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12 | //
13 | // Please direct any bugs or questions to SDKFeedback@nvidia.com
14 |
15 | #ifndef __NBODYCS_H__
16 | #define __NBODYCS_H__
17 |
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 |
25 | #include "nBodySystemCS.h"
26 |
27 | //--------------------------------------------------------------------------------------
28 | // UI control IDs
29 | //--------------------------------------------------------------------------------------
30 | enum
31 | {
32 | IDC_TOGGLEFULLSCREEN,
33 | IDC_TOGGLEREF,
34 | IDC_CHANGEDEVICE,
35 | IDC_RESET,
36 |
37 | IDC_TOGGLEUPDATES,
38 |
39 | IDC_POINTSIZE,
40 | IDC_POINTSIZELABEL,
41 |
42 | IDC_NUMBODIES,
43 | IDC_NUMBODIESLABEL,
44 |
45 | IDC_LAST,
46 | };
47 |
48 | #define DEFAULT_POINT_SIZE 1.0f
49 | #define MAX_SCALING_FACTOR 10.0f
50 | #define SCALE_SLIDER_MAX 10
51 |
52 | #endif __NBODYCS_H__
--------------------------------------------------------------------------------
/nBodyCS/nBodyCS.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | NVIDIA DX11 SDK n-Body Simulation demo
10 |
11 |
12 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/nBodyCS/nBodyCS.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "WinResRc.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | #ifdef _WIN32
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 | #pragma code_page(1252)
22 | #endif //_WIN32
23 |
24 |
25 | #ifdef APSTUDIO_INVOKED
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // TEXTINCLUDE
29 | //
30 |
31 | 1 TEXTINCLUDE
32 | BEGIN
33 | "resource.h\0"
34 | END
35 |
36 | 2 TEXTINCLUDE
37 | BEGIN
38 | "#include ""WinResRc.h""\r\n"
39 | "\0"
40 | END
41 |
42 | 3 TEXTINCLUDE
43 | BEGIN
44 | "\r\n"
45 | "\0"
46 | END
47 |
48 | #endif // APSTUDIO_INVOKED
49 |
50 |
51 | /////////////////////////////////////////////////////////////////////////////
52 | //
53 | // Icon
54 | //
55 |
56 | // Icon with lowest ID value placed first to ensure application icon
57 | // remains consistent on all systems.
58 | IDI_ICON1 ICON "..\\..\\Media\\directx.ico"
59 | #endif // English (U.S.) resources
60 | /////////////////////////////////////////////////////////////////////////////
61 |
62 |
63 |
64 | #ifndef APSTUDIO_INVOKED
65 | /////////////////////////////////////////////////////////////////////////////
66 | //
67 | // Generated from the TEXTINCLUDE 3 resource.
68 | //
69 |
70 |
71 | /////////////////////////////////////////////////////////////////////////////
72 | #endif // not APSTUDIO_INVOKED
73 |
74 |
--------------------------------------------------------------------------------
/nBodyCS/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by EmptyProject10.rc
4 | //
5 | #define IDI_ICON1 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------