From d97d9c21298f150261420555b7a3cabb4b823db6 Mon Sep 17 00:00:00 2001 From: Andrew Reidmeyer Date: Thu, 29 Nov 2018 08:59:10 -0700 Subject: Custom composite. --- bin/win32/DemoAppCodeGenDebug_win32.exe | Bin 850432 -> 850432 bytes bin/win32/DemoAppCodeGenRelease_win32.exe | Bin 122368 -> 122368 bytes bin/win32/DemoAppD3D11Debug_win32.dll | Bin 941056 -> 941056 bytes bin/win32/DemoAppD3D11Release_win32.dll | Bin 136192 -> 136192 bytes bin/win32/DemoAppD3D12Debug_win32.dll | Bin 1019904 -> 1019904 bytes bin/win32/DemoAppD3D12Release_win32.dll | Bin 118784 -> 118784 bytes bin/win32/DemoAppDebug_win32.exe | Bin 1644544 -> 1644544 bytes bin/win32/DemoAppRelease_win32.exe | Bin 421376 -> 421376 bytes bin/win32/NvFlowLibDebug_win32.dll | Bin 19391344 -> 19446272 bytes bin/win32/NvFlowLibRelease_win32.dll | Bin 1738608 -> 1732096 bytes bin/win64/DemoAppCodeGenDebug_win64.exe | Bin 1075712 -> 1075712 bytes bin/win64/DemoAppCodeGenRelease_win64.exe | Bin 141824 -> 141824 bytes bin/win64/DemoAppD3D11Debug_win64.dll | Bin 1173504 -> 1173504 bytes bin/win64/DemoAppD3D11Release_win64.dll | Bin 159232 -> 159232 bytes bin/win64/DemoAppD3D12Debug_win64.dll | Bin 1273856 -> 1273856 bytes bin/win64/DemoAppD3D12Release_win64.dll | Bin 174592 -> 174592 bytes bin/win64/DemoAppDebug_win64.exe | Bin 2004992 -> 2004992 bytes bin/win64/DemoAppRelease_win64.exe | Bin 356864 -> 356864 bytes bin/win64/NvFlowLibDebug_win64.dll | Bin 20108656 -> 20163584 bytes bin/win64/NvFlowLibRelease_win64.dll | Bin 1850736 -> 1845248 bytes demo/DemoApp/sceneFlow.cpp | 19 +++++++++++++++++++ include/NvFlow.h | 14 ++++++++++++++ lib/win32/NvFlowLibDebug_win32.dll | Bin 19391344 -> 19446272 bytes lib/win32/NvFlowLibDebug_win32.lib | Bin 81050 -> 81388 bytes lib/win32/NvFlowLibDebug_win32.pdb | Bin 12554240 -> 12570624 bytes lib/win32/NvFlowLibRelease_win32.dll | Bin 1738608 -> 1732096 bytes lib/win32/NvFlowLibRelease_win32.lib | Bin 81648 -> 81988 bytes lib/win32/NvFlowLibRelease_win32.pdb | Bin 9097216 -> 9105408 bytes lib/win64/NvFlowLibDebug_win64.dll | Bin 20108656 -> 20163584 bytes lib/win64/NvFlowLibDebug_win64.lib | Bin 79608 -> 79942 bytes lib/win64/NvFlowLibDebug_win64.pdb | Bin 12701696 -> 12709888 bytes lib/win64/NvFlowLibRelease_win64.dll | Bin 1850736 -> 1845248 bytes lib/win64/NvFlowLibRelease_win64.lib | Bin 80206 -> 80542 bytes lib/win64/NvFlowLibRelease_win64.pdb | Bin 8671232 -> 8671232 bytes 34 files changed, 33 insertions(+) diff --git a/bin/win32/DemoAppCodeGenDebug_win32.exe b/bin/win32/DemoAppCodeGenDebug_win32.exe index 534eb04..60f8d7d 100644 Binary files a/bin/win32/DemoAppCodeGenDebug_win32.exe and b/bin/win32/DemoAppCodeGenDebug_win32.exe differ diff --git a/bin/win32/DemoAppCodeGenRelease_win32.exe b/bin/win32/DemoAppCodeGenRelease_win32.exe index 52405fd..32d3e16 100644 Binary files a/bin/win32/DemoAppCodeGenRelease_win32.exe and b/bin/win32/DemoAppCodeGenRelease_win32.exe differ diff --git a/bin/win32/DemoAppD3D11Debug_win32.dll b/bin/win32/DemoAppD3D11Debug_win32.dll index fc28bdb..52f6a12 100644 Binary files a/bin/win32/DemoAppD3D11Debug_win32.dll and b/bin/win32/DemoAppD3D11Debug_win32.dll differ diff --git a/bin/win32/DemoAppD3D11Release_win32.dll b/bin/win32/DemoAppD3D11Release_win32.dll index 63828e6..5d1c584 100644 Binary files a/bin/win32/DemoAppD3D11Release_win32.dll and b/bin/win32/DemoAppD3D11Release_win32.dll differ diff --git a/bin/win32/DemoAppD3D12Debug_win32.dll b/bin/win32/DemoAppD3D12Debug_win32.dll index 5f20d68..eef8fa5 100644 Binary files a/bin/win32/DemoAppD3D12Debug_win32.dll and b/bin/win32/DemoAppD3D12Debug_win32.dll differ diff --git a/bin/win32/DemoAppD3D12Release_win32.dll b/bin/win32/DemoAppD3D12Release_win32.dll index 0a1baa6..d565b13 100644 Binary files a/bin/win32/DemoAppD3D12Release_win32.dll and b/bin/win32/DemoAppD3D12Release_win32.dll differ diff --git a/bin/win32/DemoAppDebug_win32.exe b/bin/win32/DemoAppDebug_win32.exe index 0fe30fa..33926a6 100644 Binary files a/bin/win32/DemoAppDebug_win32.exe and b/bin/win32/DemoAppDebug_win32.exe differ diff --git a/bin/win32/DemoAppRelease_win32.exe b/bin/win32/DemoAppRelease_win32.exe index 90380a3..9b803e0 100644 Binary files a/bin/win32/DemoAppRelease_win32.exe and b/bin/win32/DemoAppRelease_win32.exe differ diff --git a/bin/win32/NvFlowLibDebug_win32.dll b/bin/win32/NvFlowLibDebug_win32.dll index 21527c7..7c8b83d 100644 Binary files a/bin/win32/NvFlowLibDebug_win32.dll and b/bin/win32/NvFlowLibDebug_win32.dll differ diff --git a/bin/win32/NvFlowLibRelease_win32.dll b/bin/win32/NvFlowLibRelease_win32.dll index c882d74..6ce3c9b 100644 Binary files a/bin/win32/NvFlowLibRelease_win32.dll and b/bin/win32/NvFlowLibRelease_win32.dll differ diff --git a/bin/win64/DemoAppCodeGenDebug_win64.exe b/bin/win64/DemoAppCodeGenDebug_win64.exe index 791cfc8..a6871ba 100644 Binary files a/bin/win64/DemoAppCodeGenDebug_win64.exe and b/bin/win64/DemoAppCodeGenDebug_win64.exe differ diff --git a/bin/win64/DemoAppCodeGenRelease_win64.exe b/bin/win64/DemoAppCodeGenRelease_win64.exe index 242a29d..d9ee7f7 100644 Binary files a/bin/win64/DemoAppCodeGenRelease_win64.exe and b/bin/win64/DemoAppCodeGenRelease_win64.exe differ diff --git a/bin/win64/DemoAppD3D11Debug_win64.dll b/bin/win64/DemoAppD3D11Debug_win64.dll index 26a709d..7d1d07e 100644 Binary files a/bin/win64/DemoAppD3D11Debug_win64.dll and b/bin/win64/DemoAppD3D11Debug_win64.dll differ diff --git a/bin/win64/DemoAppD3D11Release_win64.dll b/bin/win64/DemoAppD3D11Release_win64.dll index 520e0fd..e254458 100644 Binary files a/bin/win64/DemoAppD3D11Release_win64.dll and b/bin/win64/DemoAppD3D11Release_win64.dll differ diff --git a/bin/win64/DemoAppD3D12Debug_win64.dll b/bin/win64/DemoAppD3D12Debug_win64.dll index 3b0d446..acdc5c6 100644 Binary files a/bin/win64/DemoAppD3D12Debug_win64.dll and b/bin/win64/DemoAppD3D12Debug_win64.dll differ diff --git a/bin/win64/DemoAppD3D12Release_win64.dll b/bin/win64/DemoAppD3D12Release_win64.dll index 421a9a5..390e1ce 100644 Binary files a/bin/win64/DemoAppD3D12Release_win64.dll and b/bin/win64/DemoAppD3D12Release_win64.dll differ diff --git a/bin/win64/DemoAppDebug_win64.exe b/bin/win64/DemoAppDebug_win64.exe index 764404b..e09ca82 100644 Binary files a/bin/win64/DemoAppDebug_win64.exe and b/bin/win64/DemoAppDebug_win64.exe differ diff --git a/bin/win64/DemoAppRelease_win64.exe b/bin/win64/DemoAppRelease_win64.exe index 93b8666..4962e81 100644 Binary files a/bin/win64/DemoAppRelease_win64.exe and b/bin/win64/DemoAppRelease_win64.exe differ diff --git a/bin/win64/NvFlowLibDebug_win64.dll b/bin/win64/NvFlowLibDebug_win64.dll index 17e3627..4b433e5 100644 Binary files a/bin/win64/NvFlowLibDebug_win64.dll and b/bin/win64/NvFlowLibDebug_win64.dll differ diff --git a/bin/win64/NvFlowLibRelease_win64.dll b/bin/win64/NvFlowLibRelease_win64.dll index b66c9ce..9c648af 100644 Binary files a/bin/win64/NvFlowLibRelease_win64.dll and b/bin/win64/NvFlowLibRelease_win64.dll differ diff --git a/demo/DemoApp/sceneFlow.cpp b/demo/DemoApp/sceneFlow.cpp index 5cdb70a..41ddaf0 100644 --- a/demo/DemoApp/sceneFlow.cpp +++ b/demo/DemoApp/sceneFlow.cpp @@ -13,6 +13,12 @@ #include "imgui.h" #include "imguiser.h" +#define USE_CUSTOM_BLEND 0 + +#if USE_CUSTOM_BLEND +#include "NvFlowContextExt.h" +#endif + // ******************** FlowContext ************************ void FlowContext::init(AppGraphCtx* appctx) @@ -356,7 +362,20 @@ void FlowGridActor::init(FlowContext* flowContext, AppGraphCtx* appctx) NvFlowVolumeRenderDesc volumeRenderDesc; volumeRenderDesc.gridExport = gridExport; +#if USE_CUSTOM_BLEND + NvFlowBlendStateDesc blendDesc = {}; + blendDesc.enable = true; + blendDesc.srcBlendColor = eNvFlowBlend_One; //eBlendInvSrcAlpha; + blendDesc.dstBlendColor = eNvFlowBlend_SrcAlpha; + blendDesc.blendOpColor = eNvFlowBlendOp_Add; + blendDesc.srcBlendAlpha = eNvFlowBlend_One; // eBlendInvSrcAlpha; + blendDesc.dstBlendAlpha = eNvFlowBlend_One; + blendDesc.blendOpAlpha = eNvFlowBlendOp_RevSubtract; + + m_volumeRender = NvFlowCreateVolumeRenderCustomComposite(flowContext->m_renderContext, &volumeRenderDesc, &blendDesc); +#else m_volumeRender = NvFlowCreateVolumeRender(flowContext->m_renderContext, &volumeRenderDesc); +#endif NvFlowCrossSectionDesc crossSectionDesc = {}; crossSectionDesc.gridExport = gridExport; diff --git a/include/NvFlow.h b/include/NvFlow.h index 435c940..a23b555 100644 --- a/include/NvFlow.h +++ b/include/NvFlow.h @@ -1177,6 +1177,20 @@ struct NvFlowVolumeRenderDesc */ NV_FLOW_API NvFlowVolumeRender* NvFlowCreateVolumeRender(NvFlowContext* context, const NvFlowVolumeRenderDesc* desc); +//! From NvfContextExt +struct NvFlowBlendStateDesc; + +/** +* Creates a volume render object. +* +* @param[in] context The context for GPU resource allocation. +* @param[in] desc Description for memory allocation. +* @param[in] blendDesc Description for composite blending. +* +* @return The created volume render object. +*/ +NV_FLOW_API NvFlowVolumeRender* NvFlowCreateVolumeRenderCustomComposite(NvFlowContext* context, const NvFlowVolumeRenderDesc* desc, const NvFlowBlendStateDesc* blendDesc); + /** * Releases a volume render object. * diff --git a/lib/win32/NvFlowLibDebug_win32.dll b/lib/win32/NvFlowLibDebug_win32.dll index edb7208..7c8b83d 100644 Binary files a/lib/win32/NvFlowLibDebug_win32.dll and b/lib/win32/NvFlowLibDebug_win32.dll differ diff --git a/lib/win32/NvFlowLibDebug_win32.lib b/lib/win32/NvFlowLibDebug_win32.lib index fa6e878..8d452ad 100644 Binary files a/lib/win32/NvFlowLibDebug_win32.lib and b/lib/win32/NvFlowLibDebug_win32.lib differ diff --git a/lib/win32/NvFlowLibDebug_win32.pdb b/lib/win32/NvFlowLibDebug_win32.pdb index 11ebf5d..88aeddb 100644 Binary files a/lib/win32/NvFlowLibDebug_win32.pdb and b/lib/win32/NvFlowLibDebug_win32.pdb differ diff --git a/lib/win32/NvFlowLibRelease_win32.dll b/lib/win32/NvFlowLibRelease_win32.dll index e20854e..6ce3c9b 100644 Binary files a/lib/win32/NvFlowLibRelease_win32.dll and b/lib/win32/NvFlowLibRelease_win32.dll differ diff --git a/lib/win32/NvFlowLibRelease_win32.lib b/lib/win32/NvFlowLibRelease_win32.lib index 0d11fae..d635524 100644 Binary files a/lib/win32/NvFlowLibRelease_win32.lib and b/lib/win32/NvFlowLibRelease_win32.lib differ diff --git a/lib/win32/NvFlowLibRelease_win32.pdb b/lib/win32/NvFlowLibRelease_win32.pdb index 1a7c43d..d381e42 100644 Binary files a/lib/win32/NvFlowLibRelease_win32.pdb and b/lib/win32/NvFlowLibRelease_win32.pdb differ diff --git a/lib/win64/NvFlowLibDebug_win64.dll b/lib/win64/NvFlowLibDebug_win64.dll index 98e4363..4b433e5 100644 Binary files a/lib/win64/NvFlowLibDebug_win64.dll and b/lib/win64/NvFlowLibDebug_win64.dll differ diff --git a/lib/win64/NvFlowLibDebug_win64.lib b/lib/win64/NvFlowLibDebug_win64.lib index 32e8a29..304d7d1 100644 Binary files a/lib/win64/NvFlowLibDebug_win64.lib and b/lib/win64/NvFlowLibDebug_win64.lib differ diff --git a/lib/win64/NvFlowLibDebug_win64.pdb b/lib/win64/NvFlowLibDebug_win64.pdb index f753cff..1613e6e 100644 Binary files a/lib/win64/NvFlowLibDebug_win64.pdb and b/lib/win64/NvFlowLibDebug_win64.pdb differ diff --git a/lib/win64/NvFlowLibRelease_win64.dll b/lib/win64/NvFlowLibRelease_win64.dll index 5b779af..9c648af 100644 Binary files a/lib/win64/NvFlowLibRelease_win64.dll and b/lib/win64/NvFlowLibRelease_win64.dll differ diff --git a/lib/win64/NvFlowLibRelease_win64.lib b/lib/win64/NvFlowLibRelease_win64.lib index a95a907..9fabd5d 100644 Binary files a/lib/win64/NvFlowLibRelease_win64.lib and b/lib/win64/NvFlowLibRelease_win64.lib differ diff --git a/lib/win64/NvFlowLibRelease_win64.pdb b/lib/win64/NvFlowLibRelease_win64.pdb index 0b826e2..36174ca 100644 Binary files a/lib/win64/NvFlowLibRelease_win64.pdb and b/lib/win64/NvFlowLibRelease_win64.pdb differ -- cgit v1.2.3