Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,320
    My Mood
    Doh

    ENB Performance on CA

    Obviously CA doesn't really benefit from ENB like Skyrim and other pc game titles do, but it does hook and it does work very well


    In the SS, i show the skyrim modded ENB dev console. It works flawlessly, allows for d3d debugging and fx file creation/modification. With the ability to create FX files and run them on CA, that opens us up to a whole new level of D3D abilities. CA already has FX files in the game directory in the "Shaders.rez" file. These are Bloom, Nightvision and a few others. By modifying these FX files, we were able to create mods like always have a cross hair, Color Correction, different game style effects and a lot more (see below for examples)

    Sobel Mix

    Advanced Zoom (would be great with snipers for a further look)


    credits to @Drigien for these images and video

    I don't exactly understand how ENB works, but this could be a lot of fun to include in future hacks

    commando: You're probably the best non-coder coder I know LOL


  2. #2
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    By any chance sir u have the source for this?
    and it could be a shader hook it appears.

    for those who do not know what a shader is, think of it like Vertex or Pixel programming on the gpu.
    Last edited by topblast; 03-25-2014 at 09:46 PM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  3. #3
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,320
    My Mood
    Doh
    Quote Originally Posted by topblast View Post
    By any chance sir u have the source for this?
    and it could be a shader hook it appears.

    for those who do not know what a shader is, think of it like Vertex or Pixel programming on the gpu.
    as far as i know, ENB source is not public, the only thing that is is the ability to edit it's ini files. I'm sure there's a source somewhere out there, and it probably just takes the correct vTable hook to do this
    '
    a shader hook just requires the following
    Code:
    #define CreateVertexShader 91
    #define SetVertexShader 92
    #define CreatePixelShader 106
    #define SetPixelShader 107
    but i don't know how to read off of fx files in c++

    currently creating a full vtable hook to see how ca likes it. just leaving out midfunction

    update:
    learned how to code fx directly into a d++ function. this is easy now LOL

    basic pixel shader chams before fullbright add (working on it) and other FX tweaks are finished. may release soon


    i was in game for about 35 minutes no crash, basic hook on SetPixelShader with a detour
    Last edited by supercarz1991; 03-25-2014 at 11:05 PM.

    commando: You're probably the best non-coder coder I know LOL


  4. #4
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    Quote Originally Posted by supercarz1991 View Post
    i was in game for about 35 minutes no crash, basic hook on SetPixelShader with a detour
    Hmm, so GetStreamSource is used to get the stride right, but how do u get overlay the pixels, I dont know of a way to get the output of a pixel shader, into another, but a Vertex Shader, yea i can from what I know in VS_4.

    Process the texture cords with a color overlay. What i am not sure about is dynamic colors as the shader is pretty much static to what the game inputs.
    Last edited by topblast; 03-25-2014 at 11:45 PM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  5. #5
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,320
    My Mood
    Doh
    Quote Originally Posted by topblast View Post


    Hmm, so GetStreamSource is used to get the stride right, but how do u get overlay the pixels, I dont know of a way to get the output of a pixel shader, into another, but a Vertex Shader, yea i can from what I know in VS_4.

    Process the texture cords with a color overlay. What i am not sure about is dynamic colors as the shader is pretty much static to what the game inputs.
    Code:
    bool fCall = true;
    IDirect3DPixelShader9 *Red, *Green;
    LPDIRECT3DDEVICE9 g_pDevice = NULL;
    IDirect3DPixelShader9 *Front,*Back;
    
    HRESULT CreateMyShader(IDirect3DPixelShader9 **pShader, IDirect3DDevice9 *Device, float red, float green, float blue, float alpha )
    
    //Just recalling colours
    
    {
        ID3DXBuffer *MyBuffer = NULL;
        char MyShader[ 256 ];
        sprintf( MyShader, "ps.1.1\ndef c0, %f, %f, %f, %f\nmov r0,c0", red/255, green/255, blue/255, alpha/255 );
        D3DXAssembleShader( MyShader, sizeof( MyShader ), NULL, NULL, 0, &MyBuffer , NULL );
        if( FAILED( Device->CreatePixelShader((const DWORD*)MyBuffer ->GetBufferPointer(), pShader)) )return E_FAIL;
        return S_OK;
    
    //Assigning shades to different characters... cant realy explain much further...
    
    }
    
    HRESULT GenerateShader( IDirect3DDevice9 *pDevice, IDirect3DPixelShader9 **pShader, float r, float g, float b, bool setzBuf ) 
        char szShader[ 256 ];
        ID3DXBuffer *pShaderBuf = NULL;
    
        sprintf( szShader, "ps.1.1\ndef c0, %f, %f, %f, %f\nmov r0,c0", r, g, b, 1.0f );
        if( D3DXAssembleShader( szShader, sizeof( szShader ), NULL, NULL, 0, &pShaderBuf, NULL ) == D3D_OK )
            pDevice->CreatePixelShader( ( const DWORD* )pShaderBuf->GetBufferPointer(), pShader );
        else
            return E_FAIL;
    
        return S_OK;
    }
    
    // in your dip
    
    if(fCall)
      {
      CreateMyShader( &Front, pDevice,    255,     0,   0,   255 );
      CreateMyShader( &Back,  pDevice,    255,   255,   0,   255 );
      fCall = false;
      }
    
    DWORD dwOldZEnable = D3DZB_TRUE; 
    				pDevice->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable); 
    				pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    				pDevice->SetPixelShader( Red );  
    				pDIP(pDevice, Type, BaseVertexIndex, MinIndex, NumVerts, StartIndex, PrimCount);
    				pDevice->SetRenderState(D3DRS_ZENABLE, dwOldZEnable);
    				pDevice->SetPixelShader( Green );
    i'm looking into vertex shaders tomorrow. tired as hell. i'll have more info tomorrow when i can think straight

    commando: You're probably the best non-coder coder I know LOL


  6. The Following User Says Thank You to supercarz1991 For This Useful Post:

    topblast (03-27-2014)

  7. #6
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    i understand now xD

    Tho i wont recommend wasting time to learn PS 1.1, tho it might be useful
    Last edited by topblast; 03-27-2014 at 01:09 AM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  8. #7
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,320
    My Mood
    Doh
    Quote Originally Posted by topblast View Post
    i understand now xD

    Tho i wont recommend wasting time to learn PS 1.1, tho it might be useful
    actually already know it from modding we used to do shader mods all the time to draw crosshairs, do sobel filters, Zoom without scope.. just see the pix before. its all modding.




    and its not hard to code all this in C++ at all or even read from an external FX file

    commando: You're probably the best non-coder coder I know LOL


  9. #8
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    still got the problem of most people to hook dip to get full control
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  10. #9
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,320
    My Mood
    Doh
    Quote Originally Posted by topblast View Post
    still got the problem of most people to hook dip to get full control
    i dont even hae a dip hook in my base any more


    commando: You're probably the best non-coder coder I know LOL


  11. #10
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    839
    Reputation
    44
    Thanks
    400
    My Mood
    Twisted
    If you dont have more than 1 color my way might be better without dip hooking

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    http://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    http://www.youtube.com/watch?v=Na2kUdu4d_k

  12. #11
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,320
    My Mood
    Doh
    Quote Originally Posted by Ch40zz-C0d3r View Post
    If you dont have more than 1 color my way might be better without dip hooking
    i can do more than one color. I could do tie-die if i cared. I'd just have to code up the FX file, which isn't that hard, i'm just lazy. I like that cham because its so bright

    commando: You're probably the best non-coder coder I know LOL


  13. #12
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    i am not familiar with any ways of editing a model without hooking one of the draw functions or at-least something that is called around one of those draw functions for the model
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  14. #13
    XarutoUsoCrack's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    CFAL Honra & Glória Server
    Posts
    1,087
    Reputation
    51
    Thanks
    2,482
    My Mood
    Relaxed
    Nice share this in pub, now, this will get detect any way, use until works guys.

  15. #14
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    North of Hell, South of Heaven
    Posts
    6,067
    Reputation
    323
    Thanks
    3,320
    My Mood
    Doh
    Quote Originally Posted by XarutoUsoCrack View Post
    Nice share this in pub, now, this will get detect any way, use until works guys.
    the current method of hook i'm using is pure basic JMP. Not a detour of any sort, not a break point, it's just a JMP. So frankly as long as i don't open my mouth and post exactly which part of the vtable i currently hook, it'll take em awhile

    commando: You're probably the best non-coder coder I know LOL


  16. #15
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    839
    Reputation
    44
    Thanks
    400
    My Mood
    Twisted
    Quote Originally Posted by supercarz1991 View Post
    the current method of hook i'm using is pure basic JMP. Not a detour of any sort, not a break point, it's just a JMP. So frankly as long as i don't open my mouth and post exactly which part of the vtable i currently hook, it'll take em awhile
    They didnt even fix my method and I mentioned how I did it + which directx function
    BTW: A detours IS a simple basic JMP

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    http://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    http://www.youtube.com/watch?v=Na2kUdu4d_k

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 10
    Last Post: 11-03-2012, 12:19 PM
  2. Replies: 38
    Last Post: 09-20-2009, 11:45 PM
  3. Programming drivers to perform ssdt hooking.
    By radnomguywfq3 in forum C++/C Programming
    Replies: 0
    Last Post: 07-22-2009, 08:57 PM
  4. Windows XP Performance Edition
    By radnomguywfq3 in forum General
    Replies: 7
    Last Post: 10-26-2008, 04:44 AM
  5. Signature (Michael Jackson) second performance
    By arunforce in forum General
    Replies: 2
    Last Post: 05-29-2008, 06:39 PM