git.s-ol.nu forks/DiligentFX / f034d19
Updates to comply with the new API assiduous 2 years ago
7 changed file(s) with 40 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
3131 #include "../../../DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h"
3232 #include "../../../DiligentCore/Graphics/GraphicsEngine/interface/Texture.h"
3333 #include "../../../DiligentCore/Graphics/GraphicsEngine/interface/TextureView.h"
34 #include "../../../DiligentCore/Common/interface/RefCntAutoPtr.h"
35 #include "../../../DiligentCore/Common/interface/BasicMath.h"
34 #include "../../../DiligentCore/Common/interface/RefCntAutoPtr.hpp"
35 #include "../../../DiligentCore/Common/interface/BasicMath.hpp"
3636
3737 namespace Diligent
3838 {
2525 */
2626
2727 #include "ShadowMapManager.h"
28 #include "AdvancedMath.h"
28 #include "AdvancedMath.hpp"
2929 #include "../../../Utilities/include/DiligentFXShaderSourceStreamFactory.h"
3030 #include "GraphicsUtilities.h"
31 #include "MapHelper.h"
31 #include "MapHelper.hpp"
3232 #include "CommonlyUsedStates.h"
3333
3434 namespace Diligent
3030 #include "GLTF_PBR_Renderer.h"
3131 #include "../../../Utilities/include/DiligentFXShaderSourceStreamFactory.h"
3232 #include "CommonlyUsedStates.h"
33 #include "HashUtils.h"
34 #include "ShaderMacroHelper.h"
35 #include "BasicMath.h"
33 #include "HashUtils.hpp"
34 #include "ShaderMacroHelper.hpp"
35 #include "BasicMath.hpp"
3636 #include "GraphicsUtilities.h"
37 #include "MapHelper.h"
38 #include "GraphicsAccessories.h"
37 #include "MapHelper.hpp"
38 #include "GraphicsAccessories.hpp"
3939
4040 namespace Diligent
4141 {
3131 #include "../../../../DiligentCore/Graphics/GraphicsEngine/interface/Texture.h"
3232 #include "../../../../DiligentCore/Graphics/GraphicsEngine/interface/BufferView.h"
3333 #include "../../../../DiligentCore/Graphics/GraphicsEngine/interface/TextureView.h"
34 #include "../../../../DiligentCore/Common/interface/RefCntAutoPtr.h"
35 #include "../../../../DiligentCore/Common/interface/BasicMath.h"
34 #include "../../../../DiligentCore/Common/interface/RefCntAutoPtr.hpp"
35 #include "../../../../DiligentCore/Common/interface/BasicMath.hpp"
3636
3737 namespace Diligent
3838 {
3030 #include <cstring>
3131
3232 #include "EpipolarLightScattering.h"
33 #include "ShaderMacroHelper.h"
33 #include "ShaderMacroHelper.hpp"
3434 #include "GraphicsUtilities.h"
35 #include "GraphicsAccessories.h"
35 #include "GraphicsAccessories.hpp"
3636 #include "../../../Utilities/include/DiligentFXShaderSourceStreamFactory.h"
37 #include "MapHelper.h"
37 #include "MapHelper.hpp"
3838 #include "CommonlyUsedStates.h"
39 #include "Align.h"
39 #include "Align.hpp"
4040
4141 #define _USE_MATH_DEFINES
4242 #include <math.h>
312312 {
313313 pDevice->CreateResourceMapping(ResourceMappingDesc(), &m_pResMapping);
314314 const auto& deviceCaps = pDevice->GetDeviceCaps();
315 if (deviceCaps.DevType == DeviceType::OpenGLES || deviceCaps.AdaterType == ADAPTER_TYPE_SOFTWARE)
315 if (deviceCaps.DevType == RENDER_DEVICE_TYPE_GLES || deviceCaps.AdaterType == ADAPTER_TYPE_SOFTWARE)
316316 {
317317 m_uiNumRandomSamplesOnSphere /= 2;
318318 m_iPrecomputedSctrUDim /= 2;
634634
635635 void EpipolarLightScattering::PrecomputeScatteringLUT(IRenderDevice* pDevice, IDeviceContext* pContext)
636636 {
637 const int ThreadGroupSize = pDevice->GetDeviceCaps().DevType == DeviceType::OpenGLES ? 8 : 16;
637 const int ThreadGroupSize = pDevice->GetDeviceCaps().DevType == RENDER_DEVICE_TYPE_GLES ? 8 : 16;
638638 auto& PrecomputeSingleSctrTech = m_RenderTech[RENDER_TECH_PRECOMPUTE_SINGLE_SCATTERING];
639639 if (!PrecomputeSingleSctrTech.PSO)
640640 {
799799 InitHighOrderScatteringTech.SRB->BindResources(SHADER_TYPE_COMPUTE, m_pResMapping, 0);
800800 UpdateHighOrderScatteringTech.SRB->BindResources(SHADER_TYPE_COMPUTE, m_pResMapping, 0);
801801
802 const int iNumScatteringOrders = pDevice->GetDeviceCaps().DevType == DeviceType::OpenGLES ? 3 : 4;
802 const int iNumScatteringOrders = pDevice->GetDeviceCaps().DevType == RENDER_DEVICE_TYPE_GLES ? 3 : 4;
803803 for (int iSctrOrder = 1; iSctrOrder < iNumScatteringOrders; ++iSctrOrder)
804804 {
805805 // Step 1: compute differential in-scattering
10791079
10801080 const auto ResCount = pRenderCoarseUnshadowedInsctrPS->GetResourceCount();
10811081 for (Uint32 r = 0; r < ResCount; ++r)
1082 ResourceNames.emplace(pRenderCoarseUnshadowedInsctrPS->GetResource(r).Name);
1082 {
1083 ShaderResourceDesc ResourceDesc;
1084 pRenderCoarseUnshadowedInsctrPS->GetResourceDesc(r, ResourceDesc);
1085 ResourceNames.emplace(ResourceDesc.Name);
1086 }
10831087
10841088 // clang-format off
10851089 const std::array<std::string, 4> StaticTextures =
14811485
14821486 const auto ResCount = pDoRayMarchPS->GetResourceCount();
14831487 for (Uint32 r = 0; r < ResCount; ++r)
1484 ResourceNames.emplace(pDoRayMarchPS->GetResource(r).Name);
1488 {
1489 ShaderResourceDesc ResourceDesc;
1490 pDoRayMarchPS->GetResourceDesc(r, ResourceDesc);
1491 ResourceNames.emplace(ResourceDesc.Name);
1492 }
14851493
14861494 // clang-format off
14871495 const std::array<std::string, 4> StaticLinearTextures =
18321840
18331841 const auto ResCount = pFixInsctrAtDepthBreaksPS->GetResourceCount();
18341842 for (Uint32 r = 0; r < ResCount; ++r)
1835 ResourceNames.emplace(pFixInsctrAtDepthBreaksPS->GetResource(r).Name);
1843 {
1844 ShaderResourceDesc ResourceDesc;
1845 pFixInsctrAtDepthBreaksPS->GetResourceDesc(r, ResourceDesc);
1846 ResourceNames.emplace(ResourceDesc.Name);
1847 }
18361848
18371849 // clang-format off
18381850 const std::array<std::string, 4> StaticLinearTextures =
2727 #pragma once
2828
2929 #include <unordered_map>
30 #include "BasicFileStream.h"
30 #include "BasicFileStream.hpp"
3131 #include "Shader.h"
32 #include "HashUtils.h"
32 #include "HashUtils.hpp"
3333
3434 namespace Diligent
3535 {
4646 UNSUPPORTED("This method is not implemented and should never be called");
4747 }
4848
49 virtual CounterValueType AddRef() override final
49 virtual ReferenceCounterValueType AddRef() override final
5050 {
5151 UNSUPPORTED("This method is not implemented and should never be called");
5252 return 0;
5353 }
5454
55 virtual CounterValueType Release() override final
55 virtual ReferenceCounterValueType Release() override final
5656 {
5757 UNSUPPORTED("This method is not implemented and should never be called");
5858 return 0;
2525 */
2626
2727 #include "../include/DiligentFXShaderSourceStreamFactory.h"
28 #include "MemoryFileStream.h"
29 #include "StringDataBlobImpl.h"
30 #include "RefCntAutoPtr.h"
28 #include "MemoryFileStream.hpp"
29 #include "StringDataBlobImpl.hpp"
30 #include "RefCntAutoPtr.hpp"
3131 #include "../../../shaders_inc/shaders_list.h"
3232
3333 namespace Diligent