eFX Shader Injector Support Thread

Discussion in 'Games, Gaming & Game-demos' started by Crosire, Oct 22, 2013.

  1. bwana

    bwana Member

    Messages:
    10
    Likes Received:
    0
    GPU:
    780GTX
    the readme that accompanies the latest version says this:
    ———————————————————————————
    If you want to add a new shader file, create a new entry beginning with
    “effect_file” in the “EFFECT” section and attach some path to it, which points to
    it. Set “effect_enabled” to “true” or hit the toggle key (defaults to “SCROLL LOCK”)
    once the game started to activate the shader.

    But this is not it yet. Hit the settings key (default is “PAUSE”) and a small menu
    with a number of options and controls will pop up.
    You can toggle a framerate counter seperatly with “INSERT” or whatever key it is
    bound to.

    ——–

    The effect framework is the most powerful one supporting HLSL and GLSL all in
    one rush and moving all of the control right into the shader file, instead of
    using hardcoded values or additional configuration files. The keyword to make
    this possible are “annotations”. These are little extra information you can
    add to parameters, techniques and passes which control what they do and how.

    A shader parameter usually looks like this:

    [uniform] [texture2D, ...] tex ;
    ^—- Annotations
    ^———– Name
    ^———————– Classtype

    To set the type way “eFX” should handle a parameter, you need to specify a “type”
    annotation. This one holds a string identifier representing what the intention
    of the variable is.

    Currently supported values are:
    - “input” (Will retrieve the backbuffer image)
    - “output” (Can be used as a rendertarget for passes)
    - “texture” (Specify together with a “path” annotation to load an image file
    from disk to be stored in here)
    - … (More coming soon)

    Check the examples coming with this readme to get a closer look at the syntax
    and how it is used.
    ———————————————————————
    Since I have never written a shader, some examples would be nice, but there were none in the archive. Could you please point me to some?

    and when i bring up the efx menu, how do you navigate it? keys nor mouse affect it.
     
  2. Crosire

    Crosire Member Guru

    Messages:
    164
    Likes Received:
    0
    GPU:
    -
    There are four (very very basic) example shaders in the achieve, for Direct3D 9 to 11 and OpenGL: "shaderD3D9.fx", "shaderD3D10.fx", etc.
    If you want to use a bunch of existing post processing shaders, use the SweetFX-eFX bundle instead.
    The menu can be navigated with the mouse cursor. Sometimes games come with their own mouse cursor and disable the windows one, which makes it impossible to navigate it currently.
     
  3. Sajittarius

    Sajittarius Master Guru

    Messages:
    425
    Likes Received:
    47
    GPU:
    3090 Turbo 24G
    has anyone gotten this working with Batman Arkham Origins (from Steam)? I want to make sure I'm putting the files in the right place/name before i submit a bug.
     
  4. Boulotaur2024

    Boulotaur2024 Member Guru

    Messages:
    142
    Likes Received:
    0
    GPU:
    AMD HD7950
    I just tested on Batman Arkham City (not Origins). Assuming the former uses the same engine, eFX works fine in DX9 but I get no overlay at all in DX11 (maybe its working anyway but I can't tell since there is no overlay). Here is the log file :

    Oh and renaming eFX32.dll to dxgi.dll crashes the game completely (Windows 7 SP1 x64 up-to-date) :
     

  5. Crosire

    Crosire Member Guru

    Messages:
    164
    Likes Received:
    0
    GPU:
    -
    I haven't implemented a D3D11CreateDevice hook, it calls D3D11CreateDeviceAndSwapChain internally on my machine. Seems like I was wrong asuming that this is always the case. I'm wondered however why the HookManager fails to detect a loaded or later loaded dxgi module (from looking at the log), which would have solved that probably because of internal CreateDXGIFactory calls.

    E_INVALIDARG is strange, that one should never occur, something's really going wrong there.

    Thanks for the report, going to check these issues soon.
     
  6. Anarion

    Anarion Ancient Guru

    Messages:
    13,604
    Likes Received:
    378
    GPU:
    GeForce RTX 3060 Ti
    Force v-sync, true, but can't do that for triple buffering in DirectX games. It's quite annoying. D3DOverrider was wonderful tool but it doesn't work properly in Windows 8/8.1 (let alone 64-bit support).
     
  7. nortonff

    nortonff Member

    Messages:
    28
    Likes Received:
    0
    GPU:
    XFX GTS 250
    Any pics ? Is this like SweetFX ?
     
  8. conan2k

    conan2k Member

    Messages:
    43
    Likes Received:
    0
    GPU:
    Gigabyte 780GTX
    eFX is the nextgen injector which SweetFX is currently being ported to. See the first post for details.
     
  9. boxariel

    boxariel Member

    Messages:
    10
    Likes Received:
    0
    GPU:
    Nvidia gtx680 2Gb
    Hello, I read the readme efx and I followed all the steps but do not work or for black ops 2 nor for assassins creed 3.

    Sorry I do not want to bother, but this is desperate, with win eight I was happy :-(
     
  10. vejn

    vejn Maha Guru

    Messages:
    1,002
    Likes Received:
    0
    GPU:
    MSI 7870 TF3
    I tried EFX with Baldur's gate EE but no log file was created.
    It's probably old opengl.
     

  11. Crosire

    Crosire Member Guru

    Messages:
    164
    Likes Received:
    0
    GPU:
    -
    That doesn't matter, make sure you used the correct DLL (32 or 64 bit, according to what the game executable is) and that you renamed it to "opengl32.dll". Also check if you have write permissions in the game directory (or run it as administrator).
     
  12. Boulotaur2024

    Boulotaur2024 Member Guru

    Messages:
    142
    Likes Received:
    0
    GPU:
    AMD HD7950
    double post
     
    Last edited: Nov 12, 2013
  13. Boulotaur2024

    Boulotaur2024 Member Guru

    Messages:
    142
    Likes Received:
    0
    GPU:
    AMD HD7950
    I'm impressed I tried eFX in ePSXe 1.9 and Xebra, 2 of the best psx emulators, both opengl and it works !
    I quickly checked your glsl example and maybe I'll try porting cgwg crt shader to eFX when I have time

    EDIT : Mmm ok I thought a non-compiling shader would crash the running app like it does in SweetFX, instead it keeps it alive but doesn't load the effect and writes this in the log :

    I have no idea WHY it doesn't compile though. Could you implement glsl compiler debugging output like the one for HLSL in SweetFX Crosire ? Line and error type and all that stuff
     
  14. Crosire

    Crosire Member Guru

    Messages:
    164
    Likes Received:
    0
    GPU:
    -
    I did that already, was quite some work (custom parser based on GNU Bison to allow all the nice features the Direct3D Effect Framework has) as GLSL does not allow for includes or anything filesystem related. My parser also converts the output of your compiler to have the correct line numbers. There was a bug in it though which I think was still present in the currently released version, so you won't always see the error output. I'll push out the new version soon (also fixed a major bug causing the OpenGL renderer to draw lines instead of a fullscreen quad sometimes).

    And by the way, eFX will never crash if not because of a bug. This is intented behaviour. Would be wrong to let an entire game crash (which also keeps it from doing all the memory cleanup, resulting in some big memory leaks, although Windows should normally take action here then) just because one shader failed to compile (taking into account that eFX can also load multiple ones and you can just reload them ingame, so there is really no need to make it crash).
     
    Last edited: Nov 13, 2013
  15. Wanny

    Wanny Guest

    It doesn't work with every DX11 games in 8.1. It does work with Metro Last light, but it won't work with Assassin's Creed 3 (wanted to replay before 4). That's weird.
     

  16. isamu99

    isamu99 Member

    Messages:
    42
    Likes Received:
    0
    This looks like it's going to be amazing! :)
     
  17. Crosire

    Crosire Member Guru

    Messages:
    164
    Likes Received:
    0
    GPU:
    -
    Please post a complete bug report. "It's not working" won't really help me in fixing possible issues. A log would be way more meaningful.
     
  18. NuBiXx

    NuBiXx Member

    Messages:
    25
    Likes Received:
    0
    GPU:
    SAPPHIRE 2x 7950
    BF4 crashes to desktop for me, am I doing something wrong?

    I'm using BF4 x64 version so I rename eFX64.dll to d3d11.dll I then put all the files in my Battlefield 4 folder but when I start the game it crashes to desktop here is d3d11.log info. Thanks for any help

    Code:
    2013-11-14 12:06:09 | INFO | GENERAL | Initializing Crosires "eFX" Version 2.0.0.0 ...
    2013-11-14 12:06:12 | INFO | HOOK | Installing "d3d11" hooks from file "C:\Windows\system32\d3d11.dll" ...
    2013-11-14 12:06:12 | INFO | HOOK | Installing "kernel32" hooks from handle "000007F869290000" ...
    2013-11-14 12:06:19 | INFO | PROXY | Redirecting "D3D11CreateDevice"
    2013-11-14 12:06:33 | INFO | PROXY | Redirecting "D3D11CreateDeviceAndSwapChain"
    2013-11-14 12:06:33 | ERROR | DRIVER | Initializiation failed at "ID3D11Device->CreateRenderTargetView" with "E_INVALIDARG"
    2013-11-14 12:06:33 | INFO | HOOK | Installing message hook for window "000000000009052A" ...
    2013-11-14 12:06:34 | FATAL | GENERAL | An unhandled exception occured:
    
    ExceptionCode 0
    ExceptionAddress 000007F84B5FDB50
    
    2013-11-14 12:06:34 | INFO | GENERAL | Saving minidump to "C:\Games\Battlefield 4\bf4.dmp"
     
  19. Wanny

    Wanny Guest

    Roger. For some reason the log doesn't give errors. Still the game will crash instantly. No dump. It's DX11 32 bits. Assassin's creed 3. Makes me worried for AC4.

    Code:
    2013-11-14 18:06:21 | INFO | GENERAL | Initializing Crosires "eFX" Version 2.0.0.0 ...
    2013-11-14 18:06:21 | TRACE | GENERAL | Initializing crash reporter ...
    2013-11-14 18:06:21 | TRACE | HOOK | Initializing "MinHook" library ...
    2013-11-14 18:06:21 | TRACE | HOOK | Initializing hook manager ...
    2013-11-14 18:06:21 | INFO | HOOK | Installing "dxgi" hooks from file "C:\WINDOWS\system32\dxgi.dll" ...
    2013-11-14 18:06:21 | DEBUG | HOOK | Ready to install 3 hooks
    2013-11-14 18:06:21 | TRACE | HOOK | Hooking "CreateDXGIFactory" ...
    2013-11-14 18:06:21 | TRACE | HOOK | Hooking "CreateDXGIFactory1" ...
    2013-11-14 18:06:21 | TRACE | HOOK | Hooking "CreateDXGIFactory2" ...
    2013-11-14 18:06:22 | INFO | PROXY | Redirecting "CreateDXGIFactory1"
    2013-11-14 18:06:22 | TRACE | PROXY | Parameters:
    
    riid "IID_IDXGIFactory1"
    ppFactory 0B7906B0
    
    2013-11-14 18:06:22 | TRACE | PROXY | Created "IDXGIFactory" Proxy
    2013-11-14 18:06:22 | INFO | PROXY | Redirecting "IDXGIFactory->CreateSwapChain"
    2013-11-14 18:06:22 | TRACE | PROXY | Parameters:
    
    pDevice 02A2A024
    pDesc 0B790664
    	BufferDesc
    		Width 2880
    		Height 1800
    		RefreshRate
    			Numerator 60000
    			Denominator 1000
    		Format 28
    		ScanlineOrdering 1
    		Scaling 2
    	SampleDesc
    		Count 1
    		Quality 0
    	BufferUsage 96
    	BufferCount 3
    	OutputWindow 00020518
    	Windowed 0
    	SwapEffect 0
    	Flags 2
    		DXGI_SWAP_CHAIN_FLAG_NONPREROTATED 0
    		DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH 1
    		DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE 0
    ppSwapChain 0B7906A0
    
    2013-11-14 18:06:22 | TRACE | PROXY | Created "ID3D11Device" Proxy
    2013-11-14 18:06:22 | TRACE | PROXY | Created "ID3D11DeviceContext" Proxy
     
    Last edited by a moderator: Nov 15, 2013
  20. Boulotaur2024

    Boulotaur2024 Member Guru

    Messages:
    142
    Likes Received:
    0
    GPU:
    AMD HD7950
    (AC4 should use regular DX11 an not DX11.1 -unlike BF4- (I quickly googled it) so you don't have to worry : all the other injectors will work fine in the meantime)

    Just tried AC3 on my Windows 7 machine, it also crashes the game if I rename eFX32.dll to dxgi.dll

    But it doesn't if I rename it to d3d11.dll : the game launches normally but no fps overlay at all

    I guess it is working anyway ? Other than the fps display doesn't show at all
     
    Last edited: Nov 15, 2013

Share This Page