Jump to content
  • Advertisement
Sign in to follow this  

Integration of NVidia ShadowWorks

This topic is 806 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,


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



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;


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!