Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Shader and VMR9

Cody Jan
  • Cody Jan
    Cody Jan

    Hi everyone:
           I just compiled the guliverkli2, it's a wondefull job.  I got some question about using shader in vmr9 renderless mode.
          First, i "quick open file",  and i tried to edit shader ("Play"->"Shaders"->"Edit.."->select a item from combobox),  there was a message "D3DXCompileShader succeeded" below, but it didn't work, the video window seemed as same as before, and i am sure about that the output setting is vmr9 renderless. Actually, i tried to write a new shader myself, and got message "D3DXCompileShader succeeded" too, but still no effect.
           So, i began to debug the source code, i found void CMainFrame::SetShaders()
           pos = m_shaderlabels.GetHeadPosition();
            const AppSettings::Shader* pShader = NULL;
            if(s2s.Lookup(m_shaderlabels.GetNext(pos), pShader))
                CStringA target = pShader->target;
                CStringA srcdata = pShader->srcdata;

                HRESULT hr = m_pCAP->SetPixelShader(srcdata, target); 
                            //here is the key,  hr = E_NOTIMPL

                    m_pCAP->SetPixelShader(NULL, NULL);
                    SendStatusMessage(_T("Could not load shader: ") + pShader->label, 3000);

            and i saw CDX9AllocatorPresenter::SetPixelShader(LPCSTR pSrcData, LPCSTR pTarget),  i think this is the impl of SetPixelShader(), but why it doesn't work.
            Is there a bug or what wrong with my setting?
            I just got my start in guliverkli2, someone could help me or give me some advice?
            Thanks a lot!