diff options
| author | Andrew Reidmeyer <[email protected]> | 2018-11-29 08:59:10 -0700 |
|---|---|---|
| committer | Andrew Reidmeyer <[email protected]> | 2018-11-29 08:59:10 -0700 |
| commit | d97d9c21298f150261420555b7a3cabb4b823db6 (patch) | |
| tree | 69bd5c5e86574c187ed94f865b417df422683c61 /demo | |
| parent | NvFlow 1.0.1 (diff) | |
| download | flow-customComposite.tar.xz flow-customComposite.zip | |
Custom composite.customComposite
Diffstat (limited to 'demo')
| -rw-r--r-- | demo/DemoApp/sceneFlow.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
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; |