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.
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
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 08:46 PM.
I just like programming, that is all.
Current Stuff:
- GPU Programmer (Cuda)
- Client/Server (Cloud Server)
- Mobile App Development
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
but i don't know how to read off of fx files in c++Code:#define CreateVertexShader 91 #define SetVertexShader 92 #define CreatePixelShader 106 #define SetPixelShader 107
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 10:05 PM.
commando: You're probably the best non-coder coder I know LOL
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 10:45 PM.
I just like programming, that is all.
Current Stuff:
- GPU Programmer (Cuda)
- Client/Server (Cloud Server)
- Mobile App Development
i'm looking into vertex shaders tomorrow. tired as hell. i'll have more info tomorrow when i can think straightCode: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 );
commando: You're probably the best non-coder coder I know LOL
topblast (03-26-2014)
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 12:09 AM.
I just like programming, that is all.
Current Stuff:
- GPU Programmer (Cuda)
- Client/Server (Cloud Server)
- Mobile App Development
commando: You're probably the best non-coder coder I know LOL
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
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
https://www.youtube.com/watch?v=EMSB1GbBVl8
And for sure my 8 months old gameplay with 2 friends
https://www.youtube.com/watch?v=Na2kUdu4d_k
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
Nice share this in pub, now, this will get detect any way, use until works guys.
commando: You're probably the best non-coder coder I know LOL
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
https://www.youtube.com/watch?v=EMSB1GbBVl8
And for sure my 8 months old gameplay with 2 friends
https://www.youtube.com/watch?v=Na2kUdu4d_k