Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 Oct 2012
Offline Last Active May 31 2015 10:14 AM

Topics I've Started

D3DReflect returns E_NOINTERFACE

18 March 2015 - 02:20 AM

Hi guys


I am trying to load a pre-compiled effect from memory using D3DX11CreateEffectFromMemory. It has worked perfectly for me for ages. But all of a sudden it has stopped working with one of my effects. I traced it down through the calls to the following function:

HRESULT CEffectLoader::BuildShaderBlock(SShaderBlock *pShaderBlock)
    HRESULT hr = S_OK;

    // unused shader block? that's not right
    VBD( pShaderBlock->pVT != NULL, "Internal loading error: NULL shader vtable." );

    D3DXASSERT(pShaderBlock->pD3DObject == NULL);

    if (NULL == pShaderBlock->pReflectionData)
        // File contains a shader variable without an assigned shader, or this is a null assignment.
        // Usually, this is called by one of these guys:
        // SetVertexShader( NULL );
        // or 
        // vertexshader g_VS = NULL;
        return S_OK;

    // Initialize the reflection interface
    VHD( D3DReflect( pShaderBlock->pReflectionData->pBytecode, pShaderBlock->pReflectionData->BytecodeLength, IID_ID3D11ShaderReflection, (void**)&pShaderBlock->pReflectionData->pReflection ),
         "Internal loading error: cannot create shader reflection object." );

    // Get dependencies
    VH( GrabShaderData( pShaderBlock ) );

    // Grab input signatures for VS
    if( EOT_VertexShader == pShaderBlock->GetShaderType() )
        D3DXASSERT( pShaderBlock->pInputSignatureBlob == NULL );
        VHD( D3DGetInputSignatureBlob( pShaderBlock->pReflectionData->pBytecode, pShaderBlock->pReflectionData->BytecodeLength, &pShaderBlock->pInputSignatureBlob ),
             "Internal loading error: cannot get input signature." );

    return hr;

When it tries to Initialize the reflection interface is when it fails.

Its not related to my effect file as the system effect gets loaded no problems in other projects that use the exact same initialization process. Any ideas?

Procedural texture smoothing

16 March 2015 - 12:41 PM

Hi guys


I am capturing vector data at very low resolution in a game (need to keep processing to a minimum). When I overlay eg this river on my terrain it comes out rather blocky.







I intend to increase the resolution quite a bit by rendering that texture onto a fullscreen quad on a larger render target which I will then use as a texture, but how can I apply some smoothing and blurring to the texture in order to give it a better appearance?





19 February 2015 - 03:58 AM

Hi guys


I am having a really weird problem here. I am trying to debug a rendering problem by using

D3DX11SaveTextureToFile to view the output of my render target. When I first put this function in, everything stopped working and all I got was black render targets. Same thing remained when I took it out. But now, when I put it back in, the program works again and I get good outputs. But if I take it out again, things break again.


Any ideas?

Splitting primatives between render targets

30 October 2014 - 07:50 AM

Hi guys


I have 2 simultaneous render targets that I am rendering to. I need to split the output of my geometry shader so that one part goes to the first target and the second to the second target.


I noticed I can use the semantic SV_RenderTargetArrayIndex but how would I set up the pixel shaders to render to separate targets?




XAudio2 controlling the pulse rate of a loop

31 August 2014 - 09:58 AM

Hi guys


Im having a tough time figuring out the MS documentation here. I have a tone that I want to loop, where depending on the conditions I input, it will either be a solid tone, or a set of beep pulses. However I need to change the rate at which the beeps pulse without changing the pitch/frequency of the tone. Any ideas?