• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[BO] Neon d3d hook
#1
PHP Code:
HRESULT GenerateShader(IDirect3DDevice9 *pD3DdevIDirect3DPixelShader9 **pShaderfloat rfloat gfloat b )
{
    
char szShader256 ];
    
ID3DXBuffer *pShaderBuf NULL;
    
sprintfszShader"ps_3_0\ndef c0, %f, %f, %f, %f\nmov oC0,c0"rgb1.0f );
    
D3DXAssembleShaderszShadersizeofszShader ), NULLNULL0, &pShaderBufNULL );
    if( 
FAILEDpD3Ddev->CreatePixelShader((const DWORD*)pShaderBuf->GetBufferPointer(), pShader)) )return E_FAIL;
    return 
S_OK;


Usage:
PHP Code:
GenerateShaderpDevice, &Blue,   0.0f0.0f1.0f ); 
Defines:
PHP Code:
LPDIRECT3DPIXELSHADER9 Blue
Note: You can config alot more colors, this is just an example. Just assign a color, say red...
PHP Code:
LPDIRECT3DPIXELSHADER9 BlueRed;

and

GenerateShaderpDevice, &Red,    1.0f0.0f0.0f ); 

//Credits DC
[Image: zomn.png]

overall: (botex and kidebr)
PHP Code:
//declaration
bool colors true;

//PixelShader function
HRESULT GenerateShader(IDirect3DDevice9 *pDeviceIDirect3DPixelShader9 **pShaderfloat rfloat gfloat b )
{
char szShader256 ];
ID3DXBuffer *pShaderBuf NULL;
sprintfszShader"ps.1.1\ndef c0, %f, %f, %f, %f\nmov r0,c0"rgb1.0f );
D3DXAssembleShaderszShadersizeofszShader ), NULLNULL0, &pShaderBufNULL );
if( 
FAILEDpDevice->CreatePixelShader((const DWORD*)pShaderBuf->GetBufferPointer(), pShader)) )return E_FAIL;
return 
S_OK;
}  

LPDIRECT3DPIXELSHADER9 BlueRedYellowGreen;

//Put this in endscene
    
if(colors)
     {
        
colors false;
        
GenerateShaderpDevice, &Red,    1.0f0.0f0.0f);
        
GenerateShaderpDevice, &Green,  0.0f1.0f0.0f);
        
GenerateShaderpDevice, &Blue,   0.0f0.0f1.0f);
        
GenerateShaderpDevice, &Yellow1.0f1.0f0.0f);
     }

//Usage
pDevice->SetPixelShaderRed ); 

PHP Code:
float cyan[4] = {01.01.0}; 
[-] The following 2 users say Thank You to d0h! for this post:
  • Ferrari, [MPGH]House
  Reply
#2
kewl ^^
  Reply
#3
nice =)
  Reply
#4
Neon D3D HOOK ? Are you stupid??? All this does is generate a shader. However you do need a d3d hook to use it.
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Release] Barata's SP Hook - 1.9.453 barata 16 6,742 03-19-2013, 10:26
Last Post: mn_acer1
  Preview Mw3 SP Hook barata 27 4,536 10-17-2012, 11:22
Last Post: d0h!
  [Release] CoD 4 Hook V1.0 dylankrajewski 1 1,341 04-26-2012, 11:08
Last Post: d0h!
  [Release] BO SP & Zombie Hook v2 d0h! 16 8,516 01-25-2011, 15:15
Last Post: Metro-Police#45

Forum Jump:


Users browsing this thread: 1 Guest(s)