Jump to content

  • Log In with Google      Sign In   
  • Create Account


davepl1968

Member Since 08 Mar 2013
Offline Last Active Sep 04 2013 11:28 AM
-----

Posts I've Made

In Topic: HDR Bloom Question

04 September 2013 - 11:28 AM

Thanks!  On some systems the are "resolve" steps wherein you can apply the threshold bias in that resolve step; since I'm on DX9 my closest is StretchRect, but it cannot apply any biasing or adjustment during the copy.  Would it make sense to have my pixel shader apply the threshold division, since I cannot do it in a resolve step?


In Topic: Blending a texture onto the render target with StretchRect

30 August 2013 - 02:15 PM

Thanks, that's what I've been working on since I posted it (a 'Combine' shader that takes the two blur stages and combines their outputs to the screen).  I'm not familiar with the blend() function, so thanks!  I had just been adding them with a scale factor.


In Topic: SetFloat, SetVector, SetMatrix have no effect

12 August 2013 - 07:52 PM

My issue turned out to be a pretty basic one - not calling effect->Begin(...) on the effect itself, although I had called Begin on the scene and on the pass.


In Topic: Using FX files without -shipping- my FX shader files

04 August 2013 - 12:22 PM

My solution was to compile them to .cso and then do this:

 

V_RETURN( D3DXCreateEffectFromFile(pd3dDevice, strPath.c_str(), 0, 0, D3DXSHADER_DEBUG, 0, &_ptrEffect, &pBuffer) );
V_RETURN( pd3dDevice->CreateVertexDeclaration(particleVertexDeclarations, &_ptrVertexDeclaration) );
 
// Get the technique, pass, and shaders we need
 
D3DXHANDLE hTechnique = _ptrEffect->GetTechniqueByName("ExplosionTechnique");
if (!hTechnique)
return E_FAIL;
 
D3DXHANDLE hPass = _ptrEffect->GetPassByName(hTechnique, "Pass0");
if (!hPass)
return E_FAIL;
 
// Get the vertex and pixel shaders 
 
D3DXPASS_DESC desc;
V_RETURN( _ptrEffect->GetPassDesc(hPass, &desc) );
V_RETURN( pd3dDevice->CreateVertexShader(desc.pVertexShaderFunction, &_ptrVertexShader) );
V_RETURN( pd3dDevice->CreatePixelShader (desc.pPixelShaderFunction,  &_ptrPixelShader) );

In Topic: Given an effect-technique-pass handle, how to get the PixelShader

02 August 2013 - 05:22 PM

I'll answer my own question since I've seen it asked a number of times but never answered:  this appears to work.

 

 

 

D3DXPASS_DESC desc;

V_RETURN( _pEffect->GetPassDesc(hPass, &desc) );

V_RETURN( pd3dDevice->CreateVertexShader(desc.pVertexShaderFunction, &_pVertexShader) );

V_RETURN( pd3dDevice->CreatePixelShader (desc.pPixelShaderFunction, &_pPixelShader) );


PARTNERS