diff options
Diffstat (limited to 'tools/ArtistTools/source/BlastPlugin/SampleBase/renderer')
25 files changed, 1062 insertions, 313 deletions
diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ConvexRenderMesh.cpp b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ConvexRenderMesh.cpp index 074cc2d..dc938b9 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ConvexRenderMesh.cpp +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ConvexRenderMesh.cpp @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #include "ConvexRenderMesh.h" #include "Renderer.h" diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ConvexRenderMesh.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ConvexRenderMesh.h index dfe8d8f..f7bc5c6 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ConvexRenderMesh.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ConvexRenderMesh.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef CONVEX_RENDER_MESH_H #define CONVEX_RENDER_MESH_H diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/CustomRenderMesh.cpp b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/CustomRenderMesh.cpp index 61ae9e0..0feae3f 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/CustomRenderMesh.cpp +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/CustomRenderMesh.cpp @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #include "CustomRenderMesh.h" diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/CustomRenderMesh.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/CustomRenderMesh.h index b0ddea1..025d3bf 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/CustomRenderMesh.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/CustomRenderMesh.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef CUSTOM_RENDER_MESH_H #define CUSTOM_RENDER_MESH_H diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/DebugRenderBuffer.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/DebugRenderBuffer.h index 7810733..06cd509 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/DebugRenderBuffer.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/DebugRenderBuffer.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef DEBUGRENDERBUFFER_H #define DEBUGRENDERBUFFER_H diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Mesh.cpp b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Mesh.cpp index cdf63f2..c6c8398 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Mesh.cpp +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Mesh.cpp @@ -1,12 +1,29 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. #include "Mesh.h" diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Mesh.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Mesh.h index b10f0d6..fa214e0 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Mesh.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Mesh.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef MESH_H #define MESH_H @@ -38,6 +56,7 @@ public: public: physx::PxVec3 position; physx::PxVec3 normal; + physx::PxVec3 tangent; physx::PxVec2 uv; }; diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/PrimitiveRenderMesh.cpp b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/PrimitiveRenderMesh.cpp index 06c7616..bcb1580 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/PrimitiveRenderMesh.cpp +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/PrimitiveRenderMesh.cpp @@ -1,12 +1,29 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. #include "PrimitiveRenderMesh.h" diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/PrimitiveRenderMesh.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/PrimitiveRenderMesh.h index 0f3f345..107af25 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/PrimitiveRenderMesh.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/PrimitiveRenderMesh.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef PRIMITIVE_RENDER_MESH_H #define PRIMITIVE_RENDER_MESH_H diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderMaterial.cpp b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderMaterial.cpp index 1b90f8f..a9fedf0 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderMaterial.cpp +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderMaterial.cpp @@ -1,20 +1,38 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #include "RenderMaterial.h" #include <DirectXMath.h> #include "ShaderUtils.h" #include "Renderer.h" #include "SampleManager.h" - - +#include "Light.h" +#include "D3D11TextureResource.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // RenderMaterial /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -22,15 +40,20 @@ RenderMaterial::RenderMaterial(const char* materialName, ResourceManager& resourceCallback, const char* shaderFileName, const char* textureFileName, BlendMode blendMode) { -// Add By Lixu Begin mMaterialName = materialName; - mTextureFileName = textureFileName; - SampleManager::ins()->addRenderMaterial(this); -// Add By Lixu End + setDiffuseColor(0.5, 0.5, 0.5, 1.0); + mTextureFileNames[TT_Diffuse] = textureFileName; this->initialize(resourceCallback, shaderFileName, textureFileName, blendMode); } +RenderMaterial::RenderMaterial(const char* materialName, ResourceManager& resourceCallback, const char* shaderFileName, float r, float g, float b, float a, BlendMode blendMode) +{ + mMaterialName = materialName; + setDiffuseColor(r, g, b, a); + this->initialize(resourceCallback, shaderFileName, "", blendMode); +} + void RenderMaterial::initialize(ResourceManager& resourceCallback, const char* shaderFileName, const char* textureFileName, BlendMode blendMode) { std::vector<std::string> v; @@ -40,10 +63,16 @@ void RenderMaterial::initialize(ResourceManager& resourceCallback, const char* s void RenderMaterial::initialize(ResourceManager& resourceCallback, std::vector<std::string> shaderFileNames, const char* textureFileName, BlendMode blendMode) { - mTextureSRV = nullptr; - mTexture = nullptr; + for (int i = 0; i < TT_Num; i++) + { + m_TextureSRVs[i] = nullptr; + mTextureResources[i] = nullptr; + } mBlendState = nullptr; + memset(mSpecularColor, 0, sizeof(float) * 4); + mSpecularShininess = 20; + for (uint32_t i = 0; i < shaderFileNames.size(); i++) { const ShaderFileResource* resource = resourceCallback.requestShaderFile(shaderFileNames[i].c_str()); @@ -55,9 +84,9 @@ void RenderMaterial::initialize(ResourceManager& resourceCallback, std::vector<s } mShaderGroups.reserve(mShaderFilePathes.size()); - if (!mTextureFileName.empty()) + if (!mTextureFileNames[TT_Diffuse].empty()) { - mTexture = resourceCallback.requestTexture(mTextureFileName.c_str()); + mTextureResources[TT_Diffuse] = resourceCallback.requestTexture(mTextureFileNames[TT_Diffuse].c_str()); } setBlending(blendMode); @@ -82,15 +111,14 @@ void RenderMaterial::releaseReloadableResources() mRenderMeshToInstanceMap.clear(); // Add By Lixu End - SAFE_RELEASE(mTextureSRV); + for (int i = 0; i < TT_Num; i++) + { + SAFE_RELEASE(m_TextureSRVs[i]); + } } RenderMaterial::~RenderMaterial() { -// Add By Lixu Begin - SampleManager::ins()->removeRenderMaterial(mMaterialName); -// Add By Lixu End - releaseReloadableResources(); SAFE_RELEASE(mBlendState); } @@ -160,10 +188,15 @@ void RenderMaterial::reload() } // load texture - if (mTexture) + for (int i = 0; i < TT_Num; i++) { - V(DirectX::CreateShaderResourceView(device, mTexture->image.GetImages(), mTexture->image.GetImageCount(), - mTexture->metaData, &mTextureSRV)); + if (mTextureResources[i]) + { + V(DirectX::CreateShaderResourceView(device, + mTextureResources[i]->image.GetImages(), + mTextureResources[i]->image.GetImageCount(), + mTextureResources[i]->metaData, &m_TextureSRVs[i])); + } } } @@ -219,8 +252,12 @@ void RenderMaterial::Instance::bind(ID3D11DeviceContext& context, uint32_t slot, { mMaterial.mShaderGroups[mShaderNum]->Set(&context, !depthStencilOnly); + GPUShaderResource* pResource = Light::GetEnvTextureSRV(); + ID3D11ShaderResourceView* pEnvTextureSRV = D3D11TextureResource::GetResource(pResource); + context.OMSetBlendState(mMaterial.mBlendState, nullptr, 0xFFFFFFFF); - context.PSSetShaderResources(slot, 1, &(mMaterial.mTextureSRV)); + context.PSSetShaderResources(slot, TT_Num, mMaterial.m_TextureSRVs); + context.PSSetShaderResources(TT_Num, 1, &pEnvTextureSRV); context.IASetInputLayout(mInputLayout); } @@ -230,38 +267,72 @@ bool RenderMaterial::Instance::isValid() } // Add By Lixu Begin -void RenderMaterial::setTextureFileName(std::string textureFileName) +void RenderMaterial::setTextureFileName(std::string textureFileName, TextureType tt) { - if (mTextureFileName == textureFileName) + if (mTextureFileNames[tt] == textureFileName) { return; } + mTextureFileNames[tt] = textureFileName; - mTextureFileName = textureFileName; - mTexture = nullptr; - SAFE_RELEASE(mTextureSRV); + mTextureResources[tt] = nullptr; + SAFE_RELEASE(m_TextureSRVs[tt]); - if (mTextureFileName.empty()) + if (mTextureFileNames[tt].empty()) { return; } - std::string searchDir = mTextureFileName; + std::string searchDir = mTextureFileNames[tt]; size_t ind = searchDir.find_last_of('/'); if (ind > 0) searchDir = searchDir.substr(0, ind); ResourceManager* pResourceManager = ResourceManager::ins(); pResourceManager->addSearchDir(searchDir.c_str()); - mTexture = pResourceManager->requestTexture(mTextureFileName.c_str()); - if (mTexture == nullptr) + mTextureResources[tt] = pResourceManager->requestTexture(mTextureFileNames[tt].c_str()); + if (mTextureResources[tt] == nullptr) { return; } ID3D11Device* device = GetDeviceManager()->GetDevice(); - DirectX::CreateShaderResourceView(device, mTexture->image.GetImages(), mTexture->image.GetImageCount(), - mTexture->metaData, &mTextureSRV); + DirectX::CreateShaderResourceView(device, + mTextureResources[tt]->image.GetImages(), + mTextureResources[tt]->image.GetImageCount(), + mTextureResources[tt]->metaData, &m_TextureSRVs[tt]); +} + +void RenderMaterial::setDiffuseColor(float r, float g, float b, float a) +{ + mDiffuseColor[0] = r; + mDiffuseColor[1] = g; + mDiffuseColor[2] = b; + mDiffuseColor[3] = a; +} + +void RenderMaterial::getDiffuseColor(float& r, float& g, float& b, float& a) +{ + r = mDiffuseColor[0]; + g = mDiffuseColor[1]; + b = mDiffuseColor[2]; + a = mDiffuseColor[3]; +} + +void RenderMaterial::setSpecularColor(float r, float g, float b, float a) +{ + mSpecularColor[0] = r; + mSpecularColor[1] = g; + mSpecularColor[2] = b; + mSpecularColor[3] = a; +} + +void RenderMaterial::getSpecularColor(float& r, float& g, float& b, float& a) +{ + r = mSpecularColor[0]; + g = mSpecularColor[1]; + b = mSpecularColor[2]; + a = mSpecularColor[3]; } RenderMaterial* g_DefaultRenderMaterial = nullptr; @@ -270,8 +341,13 @@ RenderMaterial* RenderMaterial::getDefaultRenderMaterial() if (g_DefaultRenderMaterial == nullptr) { ResourceManager* pResourceManager = ResourceManager::ins(); - g_DefaultRenderMaterial = new RenderMaterial("", *pResourceManager, "model_simple_ex"); + g_DefaultRenderMaterial = new RenderMaterial("", *pResourceManager, "model_simple_textured_ex", 0.5, 0.5, 0.5); } return g_DefaultRenderMaterial; } + +bool RenderMaterial::isBadTexture(TextureType tt) +{ + return (nullptr == m_TextureSRVs[tt]); +} // Add By Lixu End
\ No newline at end of file diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderMaterial.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderMaterial.h index e144a94..27f0672 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderMaterial.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderMaterial.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef RENDER_MATERIAL_H #define RENDER_MATERIAL_H @@ -38,7 +56,16 @@ class RenderMaterial BLEND_ADDITIVE }; + enum TextureType + { + TT_Diffuse, + TT_Specular, + TT_Normal, + TT_Num + }; + RenderMaterial(const char* materialName, ResourceManager& resourceProvider, const char* shaderFileName, const char* textureFileName = "", BlendMode blendMode = BLEND_NONE); + RenderMaterial(const char* materialName, ResourceManager& resourceProvider, const char* shaderFileName, float r, float g, float b, float a = 1.0, BlendMode blendMode = BLEND_NONE); ~RenderMaterial(); void setBlending(BlendMode blendMode); @@ -65,11 +92,18 @@ class RenderMaterial typedef Instance* InstancePtr; std::string getMaterialName(){ return mMaterialName; } void setMaterialName(std::string materialName){ mMaterialName = materialName; } - std::string getTextureFileName(){ return mTextureFileName; } - void setTextureFileName(std::string textureFileName); + std::string getTextureFileName(TextureType tt = TT_Diffuse){ return mTextureFileNames[tt]; } + void setTextureFileName(std::string textureFileName, TextureType tt = TT_Diffuse); + void getDiffuseColor(float& r, float& g, float& b, float& a); + void setDiffuseColor(float r, float g, float b, float a = 1.0); + void getSpecularColor(float& r, float& g, float& b, float& a); + void setSpecularColor(float r, float g, float b, float a = 1.0); + float getSpecularShininess() { return mSpecularShininess; } + void setSpecularShininess(float specularShininess) { mSpecularShininess = specularShininess; } void addRelatedRenderable(Renderable* pRenderable){ mRelatedRenderables.push_back(pRenderable); } std::vector<Renderable*>& getRelatedRenderables(){ return mRelatedRenderables; } void clearRelatedRenderables(){ mRelatedRenderables.clear(); } + bool isBadTexture(TextureType tt = TT_Diffuse); static RenderMaterial* getDefaultRenderMaterial(); // Add By Lixu End @@ -84,7 +118,7 @@ class RenderMaterial std::string mMaterialName; std::string mShaderFileName; - std::string mTextureFileName; +// std::string mTextureFileName; struct ShaderGroup { @@ -121,13 +155,24 @@ class RenderMaterial // Add By Lixu Begin std::map<const IRenderMesh*, Instance*> mRenderMeshToInstanceMap; std::vector<Renderable*> mRelatedRenderables; +// float mr; +// float mg; +// float mb; +// float ma; // Add By Lixu End - const TextureResource* mTexture; - ID3D11ShaderResourceView* mTextureSRV; +// const TextureResource* mTexture; +// ID3D11ShaderResourceView* mTextureSRV; std::vector<std::string> mShaderFilePathes; std::vector<ShaderGroup*> mShaderGroups; ID3D11BlendState* mBlendState; BlendMode mBlendMode; + + std::string mTextureFileNames[TT_Num]; + const TextureResource* mTextureResources[TT_Num]; + ID3D11ShaderResourceView* m_TextureSRVs[TT_Num]; + float mDiffuseColor[4]; + float mSpecularColor[4]; + float mSpecularShininess; }; #endif
\ No newline at end of file diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderUtils.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderUtils.h index 12df9f2..098f7a9 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderUtils.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RenderUtils.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef RENDER_UTILS_H #define RENDER_UTILS_H @@ -75,4 +93,27 @@ static DirectX::XMFLOAT4 XMFLOAT4Lerp(const DirectX::XMFLOAT4 v0, const DirectX: return v; } +static const physx::PxVec3 forwardVector = physx::PxVec3(0, 0, 1); +static const physx::PxVec3 upVector = physx::PxVec3(0, 1, 0); +static const physx::PxVec3 rightVector = physx::PxVec3(1, 0, 0); + +PX_INLINE physx::PxQuat quatLookAt(const physx::PxVec3 direction) +{ + float d = direction.dot(forwardVector); + if (physx::PxAbs(d + 1.0f) < 1e-5f) + { + return physx::PxQuat(physx::PxPi, upVector); + } + else if (physx::PxAbs(d - 1.0f) < 1e-5f) + { + return physx::PxQuat(physx::PxIdentity); + } + else + { + float angle = physx::PxAcos(d); + physx::PxVec3 axis = forwardVector.cross(direction).getNormalized(); + return physx::PxQuat(angle, axis); + } +} + #endif //RENDER_UTILS_H
\ No newline at end of file diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderable.cpp b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderable.cpp index 51569b7..5ce713d 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderable.cpp +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderable.cpp @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #include "Renderable.h" #include "Renderer.h" @@ -17,6 +35,8 @@ const DirectX::XMFLOAT4 DEFAULT_COLOR(0.5f, 0.5f, 0.5f, 1.0f); Renderable::Renderable(IRenderMesh& mesh, RenderMaterial& material) : m_mesh(mesh), m_scale(1, 1, 1), m_color(DEFAULT_COLOR), m_hidden(false), m_transform(PxIdentity) // Add By Lixu Begin , m_selected(false) +, m_depthTest(true) +, m_highlight(false) // Add By Lixu End { setMaterial(material); @@ -37,17 +57,65 @@ void Renderable::render(Renderer& renderer, bool depthStencilOnly) const } m_materialInstance->bind(*renderer.m_context, 0, depthStencilOnly); + + DirectX::XMFLOAT4 diffuseColor = getColor(); + DirectX::XMFLOAT4 specularColor = diffuseColor; + float useDiffuseTexture = -1.0; + float useSpecularTexture = -1.0; + float useNormalTexture = -1.0; + float specularShininess = 1.0; + RenderMaterial& renderMaterial = m_materialInstance->getMaterial(); + std::string mName = renderMaterial.getMaterialName(); + if (mName != "") + { + float r, g, b, a; + std::string texName; + + renderMaterial.getDiffuseColor(r, g, b, a); + diffuseColor = DirectX::XMFLOAT4(r, g, b, a); + renderMaterial.getSpecularColor(r, g, b, a); + specularColor = DirectX::XMFLOAT4(r, g, b, a); + + texName = renderMaterial.getTextureFileName(); + if (texName != "" && !renderMaterial.isBadTexture()) + { + useDiffuseTexture = 1.0; + } + + texName = renderMaterial.getTextureFileName(RenderMaterial::TT_Specular); + if (texName != "" && !renderMaterial.isBadTexture(RenderMaterial::TT_Specular)) + { + useSpecularTexture = 1.0; + } + + texName = renderMaterial.getTextureFileName(RenderMaterial::TT_Normal); + if (texName != "" && !renderMaterial.isBadTexture(RenderMaterial::TT_Normal)) + { + useNormalTexture = 1.0; + } + + specularShininess = renderMaterial.getSpecularShininess(); + } + + float selected = -1.0; + if (m_selected || m_highlight) + { + selected = 1.0; + } // setup object CB { D3D11_MAPPED_SUBRESOURCE mappedResource; renderer.m_context->Map(renderer.m_objectCB, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); Renderer::CBObject* objectBuffer = (Renderer::CBObject*)mappedResource.pData; - objectBuffer->world = PxMat44ToXMMATRIX(getModelMatrix()); - objectBuffer->color = getColor(); -// Add By Lixu Begin - objectBuffer->selected = m_selected ? 1.0 : -1.0; -// Add By Lixu End + objectBuffer->worldMatrix = PxMat44ToXMMATRIX(getModelMatrix()); + objectBuffer->diffuseColor = diffuseColor; + objectBuffer->specularColor = specularColor; + objectBuffer->useDiffuseTexture = useDiffuseTexture; + objectBuffer->useSpecularTexture = useSpecularTexture; + objectBuffer->useNormalTexture = useNormalTexture; + objectBuffer->specularShininess = specularShininess; + objectBuffer->selected = selected; renderer.m_context->Unmap(renderer.m_objectCB, 0); } diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderable.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderable.h index 9e38e4f..2d2e37b 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderable.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderable.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef RENDERABLE_H #define RENDERABLE_H @@ -105,6 +123,26 @@ public: { m_mesh.setScale(scale, replace); } + + void setDepthTest(bool depthTest) + { + m_depthTest = depthTest; + } + + bool isDepthTest() const + { + return m_depthTest; + } + + void setHighlight(bool highlight) + { + m_highlight = highlight; + } + + bool isHighlight() const + { + return m_highlight; + } // Add By Lixu End bool isTransparent() const @@ -145,6 +183,8 @@ private: bool m_hidden; // Add By Lixu Begin bool m_selected; + bool m_depthTest; + bool m_highlight; // Add By Lixu End }; diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderer.cpp b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderer.cpp index 49b1669..9fe5038 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderer.cpp +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderer.cpp @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #include "Renderer.h" #include "RenderUtils.h" @@ -16,6 +34,10 @@ #include "PxRenderBuffer.h" #include <set> +#include "SimpleScene.h" +#include "GlobalSettings.h" +#include "Light.h" +#include "AppMainWindow.h" const float CAMERA_CLIP_NEAR = 1.0f; @@ -36,6 +58,7 @@ Renderer::Renderer() , m_RSState(nullptr) , m_opaqueRenderDSState(nullptr) , m_transparencyRenderDSState(nullptr) +, m_opaqueRenderNoDepthDSState(nullptr) , m_DSTexture(nullptr) , m_DSView(nullptr) , m_DSTextureSRV(nullptr) @@ -152,6 +175,18 @@ HRESULT Renderer::DeviceCreated(ID3D11Device* device) V(device->CreateDepthStencilState(&desc, &m_transparencyRenderDSState)); } + // Opaque Render Depth-Stencil state Without Depth Test + { + D3D11_DEPTH_STENCIL_DESC desc; + ZeroMemory(&desc, sizeof(desc)); + desc.StencilEnable = FALSE; + desc.DepthEnable = FALSE; + desc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL; + desc.DepthFunc = D3D11_COMPARISON_LESS_EQUAL; + + V(device->CreateDepthStencilState(&desc, &m_opaqueRenderNoDepthDSState)); + } + // Linear sampler { D3D11_SAMPLER_DESC desc; @@ -210,6 +245,7 @@ void Renderer::DeviceDestroyed() SAFE_RELEASE(m_RSState); SAFE_RELEASE(m_opaqueRenderDSState); SAFE_RELEASE(m_transparencyRenderDSState); + SAFE_RELEASE(m_opaqueRenderNoDepthDSState); SAFE_RELEASE(m_pointSampler); SAFE_RELEASE(m_linearSampler); SAFE_RELEASE(m_debugPrimitiveVB); @@ -226,12 +262,10 @@ void Renderer::DeviceDestroyed() void Renderer::onInitialize() { // search paths - m_resourceManager.addSearchDir("..\\..\\samples\\resources"); - m_resourceManager.addSearchDir("..\\..\\..\\samples\\resources"); - for (const std::string& d : getManager()->getConfig().additionalResourcesDir) - { - m_resourceManager.addSearchDir(d.c_str()); - } + m_resourceManager.addSearchDir("..\\resources"); + m_resourceManager.addSearchDir("..\\..\\..\\..\\bin\\resources"); + //m_resourceManager.addSearchDir("..\\..\\samples\\resources"); + //m_resourceManager.addSearchDir("..\\..\\..\\samples\\resources"); // debug primitive render material and input layout { @@ -257,7 +291,8 @@ void Renderer::BackBufferResized(ID3D11Device* /*device*/, const DXGI_SURFACE_DE m_screenWidth = sd->Width; m_screenHeight = sd->Height; float fAspectRatio = m_screenWidth / m_screenHeight; - m_camera.SetProjParams(DirectX::XM_PIDIV4, fAspectRatio, CAMERA_CLIP_NEAR, CAMERA_CLIP_FAR); + float fov = (GlobalSettings::Inst().m_fovAngle / 360.0f) * 3.141592653589793; + m_camera.SetProjParams(fov, fAspectRatio, CAMERA_CLIP_NEAR, CAMERA_CLIP_FAR); SAFE_RELEASE(m_DSTexture); SAFE_RELEASE(m_DSView); @@ -329,13 +364,12 @@ void Renderer::Render(ID3D11Device* /*device*/, ID3D11DeviceContext* ctx, ID3D11 m_context = ctx; - ctx->ClearRenderTargetView(pRTV, CLEAR_SCENE_COLOR); ctx->ClearDepthStencilView(m_DSView, D3D11_CLEAR_DEPTH, 1.0, 0); ctx->RSSetViewports(1, &m_viewport); // needed matrices - DirectX::XMMATRIX viewMatrix = m_camera.GetViewMatrix(); - DirectX::XMMATRIX projMatrix = m_camera.GetProjMatrix(); + DirectX::XMMATRIX viewMatrix = SimpleScene::Inst()->GetViewMatrix(); + DirectX::XMMATRIX projMatrix = SimpleScene::Inst()->GetProjMatrix(); DirectX::XMMATRIX projMatrixInv = DirectX::XMMatrixInverse(NULL, projMatrix); DirectX::XMMATRIX viewProjMatrix = viewMatrix * projMatrix; @@ -346,7 +380,7 @@ void Renderer::Render(ID3D11Device* /*device*/, ID3D11DeviceContext* ctx, ID3D11 CBCamera* cameraBuffer = (CBCamera*)mappedResource.pData; cameraBuffer->viewProjection = viewProjMatrix; cameraBuffer->projectionInv = projMatrixInv; - DirectX::XMStoreFloat3(&(cameraBuffer->viewPos), m_camera.GetEyePt()); + DirectX::XMStoreFloat3(&(cameraBuffer->viewPos), SimpleScene::Inst()->GetEyePt()); ctx->Unmap(m_cameraCB, 0); } @@ -355,6 +389,7 @@ void Renderer::Render(ID3D11Device* /*device*/, ID3D11DeviceContext* ctx, ID3D11 D3D11_MAPPED_SUBRESOURCE mappedResource; ctx->Map(m_worldCB, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); CBWorld* worldBuffer = (CBWorld*)mappedResource.pData; + Light::FillLightShaderParam(m_worldCBData.lightParam); memcpy(worldBuffer, &m_worldCBData, sizeof(m_worldCBData)); //worldBuffer->ambientColor = m_CBWorldData.ambientColor; //worldBuffer->pointLightPos = m_CBWorldData.pointLightPos; @@ -388,12 +423,28 @@ void Renderer::Render(ID3D11Device* /*device*/, ID3D11DeviceContext* ctx, ID3D11 } } - // render shadow map - m_shadow.renderShadowMaps(this); + m_shadow.clearBuffer(); + + std::vector<Light>& lights = Light::GetDefaultLights(); + for (int l = 0; l < 3; l++) + { + if (!lights[l].m_useShadows) + { + continue; + } + + atcore_float3 eye = lights[l].m_lightCamera._eye; + eye.x = -eye.x; + atcore_float3 at = lights[l].m_lightCamera._at; + at.x = -at.x; - // render shadow buffer - ctx->OMSetRenderTargets(0, nullptr, nullptr); - m_shadow.renderShadowBuffer(m_DSTextureSRV, nullptr); + ctx->OMSetRenderTargets(0, nullptr, m_DSView); + m_shadow.renderShadowMaps(this, eye, at); + ctx->OMSetRenderTargets(0, nullptr, nullptr); + m_shadow.renderShadowBuffer(m_DSTextureSRV, nullptr); + } + + m_shadow.finalizeBuffer(); } // Opaque render @@ -413,20 +464,38 @@ void Renderer::Render(ID3D11Device* /*device*/, ID3D11DeviceContext* ctx, ID3D11 CBCamera* cameraBuffer = (CBCamera*)mappedResource.pData; cameraBuffer->viewProjection = viewProjMatrix; cameraBuffer->projectionInv = projMatrixInv; - DirectX::XMStoreFloat3(&(cameraBuffer->viewPos), m_camera.GetEyePt()); + DirectX::XMStoreFloat3(&(cameraBuffer->viewPos), SimpleScene::Inst()->GetEyePt()); ctx->Unmap(m_cameraCB, 0); } + std::vector<Renderable*> renderablesWithoutDepthTest; + // Render opaque renderables m_visibleOpaqueRenderablesCount = 0; for (auto it = m_renderables.begin(); it != m_renderables.end(); it++) { if (!(*it)->isTransparent() && !(*it)->isHidden()) { + if (!(*it)->isDepthTest()) + { + renderablesWithoutDepthTest.push_back(*it); + continue; + } (*it)->render(*this); m_visibleOpaqueRenderablesCount++; } } + + if (renderablesWithoutDepthTest.size() > 0) + { + ctx->OMSetDepthStencilState(m_opaqueRenderNoDepthDSState, 0xFF); + std::vector<Renderable*>::iterator itR; + for (itR = renderablesWithoutDepthTest.begin(); itR != renderablesWithoutDepthTest.end(); itR++) + { + (*itR)->render(*this); + } + ctx->OMSetDepthStencilState(m_opaqueRenderDSState, 0xFF); + } } // modulate shadows @@ -444,6 +513,10 @@ void Renderer::Render(ID3D11Device* /*device*/, ID3D11DeviceContext* ctx, ID3D11 ctx->RSSetViewports(1, &m_viewport); // render debug render buffers + if (!AppMainWindow::Inst().m_bGizmoWithDepthTest) + { + ctx->OMSetDepthStencilState(m_opaqueRenderNoDepthDSState, 0xFF); + } while (m_queuedRenderBuffers.size() > 0) { render(m_queuedRenderBuffers.back()); @@ -496,6 +569,10 @@ LRESULT Renderer::MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) } } + UpdateCamera(); + + return 0; + // Camera events return m_camera.HandleMessages(hWnd, uMsg, wParam, lParam); } @@ -600,7 +677,7 @@ void Renderer::renderDebugPrimitive(const Renderer::RenderDebugVertex *vertices, m_context->Map(m_objectCB, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); CBObject* objectBuffer = (CBObject*)mappedResource.pData; - objectBuffer->world = PxMat44ToXMMATRIX(PxMat44(PxIdentity)); + objectBuffer->worldMatrix = PxMat44ToXMMATRIX(PxMat44(PxIdentity)); m_context->Unmap(m_objectCB, 0); @@ -733,4 +810,13 @@ void Renderer::drawUI() ImGui::TreePop(); } +} + +void Renderer::UpdateCamera() +{ + Camera* pCamera = SimpleScene::Inst()->m_pCamera; + DirectX::XMVECTORF32 eyePt = { pCamera->_eye.x, pCamera->_eye.y, pCamera->_eye.z, 0 }; + DirectX::XMVECTORF32 lookAtPt = { pCamera->_at.x, pCamera->_at.y, pCamera->_at.z, 0 }; + m_camera.SetViewParams(eyePt, lookAtPt); + m_camera.SetProjParams(pCamera->_fov, pCamera->_aspectRatio, pCamera->_znear, pCamera->_zfar); }
\ No newline at end of file diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderer.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderer.h index 58662a6..6981e15 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderer.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/Renderer.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef RENDERER_H #define RENDERER_H @@ -23,6 +41,7 @@ #include "RendererShadow.h" #include "RendererHBAO.h" #include <unordered_set> +#include "LightShaderParam.h" class CFirstPersonCamera; class PhysXPrimitive; @@ -95,7 +114,12 @@ class Renderer : public ISampleController m_queuedRenderBuffers.push_back(buffer); } - ResourceManager& getResourceManager() + void clearQueue() + { + m_queuedRenderBuffers.clear(); + } + + ResourceManager& getResourceManager() { return m_resourceManager; } @@ -120,7 +144,7 @@ class Renderer : public ISampleController // for internal usage (used by RenderShadows) void renderDepthOnly(DirectX::XMMATRIX* viewProjectionSubstitute); - + void UpdateCamera(); protected: //////// controller callbacks //////// @@ -174,14 +198,18 @@ class Renderer : public ISampleController float specularPower; DirectX::XMFLOAT3 dirLightColor; float specularIntensity; // TODO: actually it's per object property + LightShaderParam lightParam; }; struct CBObject { - DirectX::XMMATRIX world; - DirectX::XMFLOAT4 color; -// Add By Lixu Begin + DirectX::XMMATRIX worldMatrix; + DirectX::XMFLOAT4 diffuseColor; + DirectX::XMFLOAT4 specularColor; + float useDiffuseTexture; + float useSpecularTexture; + float useNormalTexture; + float specularShininess; float selected; -// Add By Lixu End }; @@ -210,6 +238,7 @@ class Renderer : public ISampleController ID3D11RasterizerState* m_RSState; ID3D11DepthStencilState* m_opaqueRenderDSState; ID3D11DepthStencilState* m_transparencyRenderDSState; + ID3D11DepthStencilState* m_opaqueRenderNoDepthDSState; // DX11 samplers ID3D11SamplerState* m_pointSampler; diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererHBAO.cpp b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererHBAO.cpp index 5e20a49..c674b2b 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererHBAO.cpp +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererHBAO.cpp @@ -1,12 +1,29 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. #include "RendererHBAO.h" diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererHBAO.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererHBAO.h index 2478628..3237ddf 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererHBAO.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererHBAO.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef RENDERER_HBAO_H #define RENDERER_HBAO_H diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererShadow.cpp b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererShadow.cpp index 28a79e5..c26358b 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererShadow.cpp +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererShadow.cpp @@ -1,12 +1,29 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. #include "RendererShadow.h" @@ -16,7 +33,7 @@ #include "DXUTCamera.h" #include "Renderer.h" #include "UIHelpers.h" - +#include "SimpleScene.h" #define CASCADES 1 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -168,7 +185,10 @@ void RendererShadow::changeShadowSettings(UINT Width, UINT Height, UINT uSampleC void RendererShadow::reloadBuffers() { { - m_shadowLibContext->RemoveMap(&m_shadowMapHandle); + if(m_shadowMapHandle != nullptr) + { + m_shadowLibContext->RemoveMap(&m_shadowMapHandle); + } if (m_SMDesc.eMapType == GFSDK_ShadowLib_MapType_Texture && m_SMDesc.eViewType == GFSDK_ShadowLib_ViewType_Single && @@ -192,7 +212,10 @@ void RendererShadow::reloadBuffers() m_shadowLibContext->DevModeCreateTexture2D(&m_downsampledShadowMap); } - m_shadowLibContext->RemoveBuffer(&m_shadowBufferHandle); + if (m_shadowBufferHandle != nullptr) + { + m_shadowLibContext->RemoveBuffer(&m_shadowBufferHandle); + } m_shadowLibContext->AddBuffer(&m_SBDesc, &m_shadowBufferHandle); } @@ -220,7 +243,7 @@ static void ShadowMapRenderFunction(void* pParams, gfsdk_float4x4* pViewProj) pRP->renderer->renderDepthOnly(&viewProjection); } -void RendererShadow::renderShadowMaps(Renderer* renderer) +void RendererShadow::renderShadowMaps(Renderer* renderer, atcore_float3& lightPos, atcore_float3& lightLookAt) { // select technique GFSDK_ShadowLib_TechniqueType technique = m_SBRenderParams.eTechniqueType; @@ -240,8 +263,8 @@ void RendererShadow::renderShadowMaps(Renderer* renderer) m_SMRenderParams.v3WorldSpaceBBox[1] = m_worldSpaceBBox1; m_SMRenderParams.LightDesc.eLightType = GFSDK_ShadowLib_LightType_Directional; - memcpy(&m_SMRenderParams.LightDesc.v3LightPos, &m_lightPos.x, sizeof(gfsdk_float3)); - memcpy(&m_SMRenderParams.LightDesc.v3LightLookAt, &m_lightLookAt.x, sizeof(gfsdk_float3)); + memcpy(&m_SMRenderParams.LightDesc.v3LightPos, &lightPos, sizeof(gfsdk_float3)); + memcpy(&m_SMRenderParams.LightDesc.v3LightLookAt, &lightLookAt, sizeof(gfsdk_float3)); m_SMRenderParams.LightDesc.fLightSize = m_lightSize; m_SMRenderParams.LightDesc.bLightFalloff = false; @@ -268,13 +291,9 @@ void RendererShadow::renderShadowBuffer(ID3D11ShaderResourceView* pDepthStencilS m_SBRenderParams.PCSSPenumbraParams = m_PCSSParams; m_SBRenderParams.fSoftShadowTestScale = m_softShadowTestScale; - m_shadowLibContext->ClearBuffer(m_shadowBufferHandle); - m_SBRenderParams.DepthBufferDesc.DepthStencilSRV.pSRV = pDepthStencilSRV; m_shadowLibContext->RenderBuffer(m_shadowMapHandle, m_shadowBufferHandle, &m_SBRenderParams); - - m_shadowLibContext->FinalizeBuffer(m_shadowBufferHandle, &m_shadowBufferSRV); } @@ -414,4 +433,14 @@ void RendererShadow::drawUI() ImGui::DragFloat("PCSS: fBlockerSearchDitherPercent", &(m_PCSSParams.fBlockerSearchDitherPercent), 0.001f, 0.0f, 100.0f); ImGui::DragFloat("PCSS: fFilterDitherPercent", &(m_PCSSParams.fFilterDitherPercent), 0.001f, 0.0f, 100.0f); } +} + +void RendererShadow::clearBuffer() +{ + m_shadowLibContext->ClearBuffer(m_shadowBufferHandle); +} + +void RendererShadow::finalizeBuffer() +{ + m_shadowLibContext->FinalizeBuffer(m_shadowBufferHandle, &m_shadowBufferSRV); }
\ No newline at end of file diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererShadow.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererShadow.h index cc81c67..e16af1f 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererShadow.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/RendererShadow.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef RENDERER_SHADOW_H #define RENDERER_SHADOW_H @@ -31,7 +49,7 @@ public: void setScreenResolution(float FovyRad, UINT Width, UINT Height, UINT uSampleCount, ID3D11DepthStencilView* pReadOnlyDSV); void changeShadowSettings(UINT Width, UINT Height, UINT uSampleCount, ID3D11DepthStencilView* pReadOnlyDSV); - void renderShadowMaps(Renderer* renderer); + void renderShadowMaps(Renderer* renderer, atcore_float3& lightPos, atcore_float3& lightLookAt); void renderShadowBuffer(ID3D11ShaderResourceView* pDepthStencilSRV, ID3D11ShaderResourceView* pResolvedDepthStencilSRV); void modulateShadowBuffer(ID3D11RenderTargetView* pOutputRTV); void displayShadowMaps(ID3D11RenderTargetView* pOutputRTV, UINT Width, UINT Height); @@ -42,6 +60,9 @@ public: void drawUI(); + void clearBuffer(); + void finalizeBuffer(); + private: void reloadBuffers(); void ReleaseResources(); diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ResourceManager.cpp b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ResourceManager.cpp index a051f96..6e4cc50 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ResourceManager.cpp +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ResourceManager.cpp @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #include "ResourceManager.h" #include "PxAssert.h" @@ -50,6 +68,19 @@ const TextureResource* ResourceManager::requestTexture(const char* name) return resource != nullptr ? static_cast<const TextureResource*>(resource) : nullptr; } +void ResourceManager::releaseTexture(const char* name) +{ + std::pair<ResourceType, std::string> key(eTEXTURE, name); + auto val = m_loadedResources.find(key); + if (val != m_loadedResources.end()) + { + Resource* pResource = val->second; + delete pResource; + pResource = nullptr; + m_loadedResources.erase(key); + } +} + const Resource* ResourceManager::requestResource(ResourceType type, const char* name) { // search in loaded @@ -57,17 +88,17 @@ const Resource* ResourceManager::requestResource(ResourceType type, const char* auto val = m_loadedResources.find(key); if (val != m_loadedResources.end()) { - return val->second.get(); + return val->second; } - std::shared_ptr<Resource> resource; + Resource* resource = nullptr; if (type == eSHADER_FILE) { char path[PATH_MAX_LEN]; const char* exts[] = { "hlsl" }; if (findFile(name, std::vector<const char*>(exts, exts + sizeof(exts) / sizeof(exts[0])), path)) { - resource = std::shared_ptr<Resource>(new ShaderFileResource(path)); + resource = new ShaderFileResource(path); } else { @@ -78,33 +109,38 @@ const Resource* ResourceManager::requestResource(ResourceType type, const char* { char path[PATH_MAX_LEN]; // Add By Lixu Begin - const char* exts[] = { "dds", "tga", "jpg", "png" }; + const char* exts[] = { "dds", "tga", "jpg", "png", "bmp" }; // Add By Lixu End if (findFile(name, std::vector<const char*>(exts, exts + sizeof(exts) / sizeof(exts[0])), path)) { - std::shared_ptr<TextureResource> textureResource(new TextureResource()); + TextureResource* textureResource(new TextureResource()); WCHAR wPath[MAX_PATH]; MultiByteToWideChar(CP_ACP, 0, path, -1, wPath, MAX_PATH); wPath[MAX_PATH - 1] = 0; const char* ext = strext(path); - if (::strcmp(ext, "dds") == 0) + if (::stricmp(ext, "dds") == 0) { V(DirectX::LoadFromDDSFile(wPath, DirectX::DDS_FLAGS_NONE, &textureResource->metaData, textureResource->image)); } - else if (::strcmp(ext, "tga") == 0) + else if (::stricmp(ext, "tga") == 0) { V(DirectX::LoadFromTGAFile(wPath, &textureResource->metaData, textureResource->image)); } // Add By Lixu Begin - else if (::strcmp(ext, "jpg") == 0) + else if (::stricmp(ext, "jpg") == 0) { V(DirectX::LoadFromWICFile(wPath, DirectX::TEX_FILTER_DEFAULT | DirectX::WIC_FLAGS_ALL_FRAMES, &textureResource->metaData, textureResource->image)); } - else if (::strcmp(ext, "png") == 0) + else if (::stricmp(ext, "png") == 0) + { + V(DirectX::LoadFromWICFile(wPath, DirectX::TEX_FILTER_DEFAULT | DirectX::WIC_FLAGS_ALL_FRAMES, &textureResource->metaData, + textureResource->image)); + } + else if (::stricmp(ext, "bmp") == 0) { V(DirectX::LoadFromWICFile(wPath, DirectX::TEX_FILTER_DEFAULT | DirectX::WIC_FLAGS_ALL_FRAMES, &textureResource->metaData, textureResource->image)); @@ -118,10 +154,10 @@ const Resource* ResourceManager::requestResource(ResourceType type, const char* } } - if (resource.get()) + if (resource) { m_loadedResources.emplace(key, resource); - return resource.get(); + return resource; } else { @@ -195,6 +231,15 @@ bool ResourceManager::findFileInDir(std::string fileNameFull, const char* path, bool ResourceManager::findFile(std::string fileName, const std::vector<const char*>& exts, char* foundPath) { std::string fileNameOnly = fileName; + + std::string::size_type pos = 0; + pos = fileNameOnly.find("\\", pos); + while ((pos != std::string::npos)) + { + fileNameOnly.replace(pos, 1, "/"); + pos = fileNameOnly.find("\\", (pos + 1)); + } + size_t ind = fileNameOnly.find_last_of('/'); if (ind > 0) fileNameOnly = fileNameOnly.substr(ind + 1); diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ResourceManager.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ResourceManager.h index 0378438..697b16b 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ResourceManager.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ResourceManager.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef RESOURCE_MANAGER_H #define RESOURCE_MANAGER_H @@ -62,6 +80,8 @@ public: const TextureResource* requestTexture(const char* name); + void releaseTexture(const char* name); + bool findFile(std::string fileName, std::string& foundPath); bool findFile(std::string fileName, const std::vector<const char*>& exts, char* foundPath); @@ -92,6 +112,6 @@ private: //////// internal data //////// std::vector<SearchDir> m_searchDirs; - std::map<std::pair<ResourceType, std::string>, std::shared_ptr<Resource>> m_loadedResources; + std::map<std::pair<ResourceType, std::string>, Resource*> m_loadedResources; }; #endif
\ No newline at end of file diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ShaderUtils.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ShaderUtils.h index 778c811..da9caa0 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ShaderUtils.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/ShaderUtils.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef SHADER_UTILS_H #define SHADER_UTILS_H diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/SkinnedRenderMesh.cpp b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/SkinnedRenderMesh.cpp index c575d6c..ff121d6 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/SkinnedRenderMesh.cpp +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/SkinnedRenderMesh.cpp @@ -1,12 +1,29 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. #include "SkinnedRenderMesh.h" diff --git a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/SkinnedRenderMesh.h b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/SkinnedRenderMesh.h index 2f690d8..f3643d8 100644 --- a/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/SkinnedRenderMesh.h +++ b/tools/ArtistTools/source/BlastPlugin/SampleBase/renderer/SkinnedRenderMesh.h @@ -1,12 +1,30 @@ -/* -* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. -* -* NVIDIA CORPORATION and its licensors retain all intellectual property -* and proprietary rights in and to this software, related documentation -* and any modifications thereto. Any use, reproduction, disclosure or -* distribution of this software and related documentation without an express -* license agreement from NVIDIA CORPORATION is strictly prohibited. -*/ +// This code contains NVIDIA Confidential Information and is disclosed to you +// under a form of NVIDIA software license agreement provided separately to you. +// +// Notice +// NVIDIA Corporation and its licensors retain all intellectual property and +// proprietary rights in and to this software and related documentation and +// any modifications thereto. Any use, reproduction, disclosure, or +// distribution of this software and related documentation without an express +// license agreement from NVIDIA Corporation is strictly prohibited. +// +// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES +// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO +// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, +// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Information and code furnished is believed to be accurate and reliable. +// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such +// information or for any infringement of patents or other rights of third parties that may +// result from its use. No license is granted by implication or otherwise under any patent +// or patent rights of NVIDIA Corporation. Details are subject to change without notice. +// This code supersedes and replaces all information previously supplied. +// NVIDIA Corporation products are not authorized for use as critical +// components in life support devices or systems without express written approval of +// NVIDIA Corporation. +// +// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. + #ifndef SKINNED_RENDER_MESH_H #define SKINNED_RENDER_MESH_H |