🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Integration of NVidia ShadowWorks

Started by
-1 comments, last by visionist 7 years, 9 months ago

Hi all,

I'm trying to integrate the library from NVidia to generate soft shadows.

https://developer.nvidia.com/shadowworks

Wonder if somebody had experience with it.

The problem is - I'm trying to send custom generated shadow maps into library

(to m_pShadowLibCtx->RenderBuffer()). The type of the handle is GFSDK_ShadowLib_Map which is not described.

And then getting an error:

An unhandled exception of type 'System.AccessViolationException' occurred in Engine.Direct3D11RenderSystem.Shadows.dll

Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Do you probably know what the handle type GFSDK_ShadowLib_Map actually represents? Is it ID3D11Texture2D? which format?

The header of the function is


Accumulates shadows in the specified buffer (with min blending), 
using the given technique on the given shadow map. This function may be 
called multiple times with different shadow maps, and techniques to 
accumulate shadowed regions of the screen.
===========================================================================*/
virtual GFSDK_ShadowLib_Status RenderBuffer( 
    // IN: Handle of the shadow map you wish to use
    GFSDK_ShadowLib_Map* __GFSDK_RESTRICT__ const pShadowMapHandle,

    // IN: Handle of the shadow buffer you wish to use
    GFSDK_ShadowLib_Buffer* __GFSDK_RESTRICT__ const pShadowBufferHandle,
 
    // IN: The render params instructing the lib how to render the buffer (see GFSDK_ShadowLib_BufferRenderParams)
    const GFSDK_ShadowLib_BufferRenderParams* __GFSDK_RESTRICT__ const pShadowBufferRenderParams ) = 0;

This topic is closed to new replies.

Advertisement