.FX

FX File

DirectX HLSL Effect File
Ask a question
QUICK ANSWER

An FX file is a DirectX HLSL effect file - plain-text GPU shader code used by Direct3D in Windows games and 3D applications. Open it in any code editor such as Visual Studio or VS Code. It cannot run on its own; a game engine or the fxc.exe compiler reads it at build time.

Developer: Microsoft Corporation (DirectX SDK / Direct3D) Category: Developer Files MIME: text/plain
OPENS ON Windows
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Sep 11, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the FX file format?

.fx files are associated with the Direct3D library included with the Microsoft DirectX package. They are written in HLSL (High-Level Shading Language), a C-like GPU programming language developed by Microsoft for describing how 3D effects should be rendered.

An .fx file is typically divided into three sections:

  • variables section - global declarations: constant buffers (cbuffer), textures, sampler states, and shader input/output structs
  • function section - HLSL functions implementing shading logic such as vertex transforms, lighting calculations, and texture sampling
  • techniques section - defines how functions are used, grouping them into named technique and pass blocks that bind vertex and pixel shaders to a rendering pipeline state

.fx files contain information that describes how a given 3D effect should look - textures, shading, lighting settings, and render-state configurations. They do not store 3D models; geometry is kept in separate files such as .x (DirectX mesh format).

Introduced with DirectX 9.0 in 2002 as part of the D3DX utility library, the effects framework has since been deprecated. Modern DirectX 11/12 workflows compile HLSL individually to binary bytecode (.cso) using fxc.exe or dxc. However, .fx files remain widely used in legacy game assets, game modding communities, and Autodesk 3ds Max's DirectX Shader Material workflow. The DirectX SDK included a viewer tool for inspecting effects; today Visual Studio's HLSL tooling is preferred.

Security & safety

RISK: LOW

An .fx file is plain text and not executable by the OS - it cannot run on its own or carry malware. However, loading an untrusted .fx into a game engine or 3D tool causes the GPU driver to compile it; a pathologically constructed shader could (in theory) cause a driver crash or hang on vulnerable older drivers. In practice the risk is negligible for typical use.

Format details

in a nutshell
FULL NAMEDirectX HLSL Effect Fileaka HLSL effect file, DirectX effect file
DEVELOPERMicrosoft Corporation (DirectX SDK / Direct3D)since DirectX 9.0 (2002) with the D3DX Effects framework
MIME TYPEtext/plain
TYPEPlain-text GPU shader program combining HLSL code, technique and pass declarations
This extension is also used by…
  • FastLynx Online Guide File - Obsolete help/guide file from FastLynx (a 1990s file-transfer application); unrelated to shaders.
  • ReactOS Shell Extension Resource - Internal resource file used by the ReactOS operating system; not for end-users.
  • Cal3D Morph Animation File - Morph-target animation data used by the Cal3D 3D character animation library for open-source game engines.

Programs that open FX files

Windows4 apps
Visual Studio Freemium Open the .fx as a text/HLSL file to read or edit; install the HLSL Tools extension for syntax highlighting and error squiggles.
Notepad / VS Code Open-source Open to view and edit the shader source. VS Code has HLSL syntax extensions (e.g. 'HLSL Tools').
Autodesk 3ds Max Paid Assign the .fx to a material via the DirectX Shader Material to preview real-time shader results in the 3ds Max viewport.
fxc.exe (DirectX SDK shader compiler) Free Compile: fxc /T fx_5_0 /Fo output.fxo shader.fx - produces binary .fxo from the .fx source.

Technical details

deep spec
EncodingText, ASCII or UTF-8
ContainerPlain text
Typical size1 KB - 500 KB (complex multi-technique effect libraries can be larger)
StructureGlobal declarations (cbuffers, textures, samplers), then HLSL function definitions, then technique/pass blocks binding vertex and pixel shaders
Shader Model supportSM1.1-SM5.1 (DirectX 9 through DirectX 12); declared via pass VertexShaderVersion/PixelShaderVersion or HLSLcc target pragma
Associated OSWindows (Direct3D is Windows-exclusive)
CompilationHLSL source compiled to DXBC bytecode using fxc.exe (legacy) or to DXIL using dxc (modern DirectX 12 workflow)
DeprecatedD3DX9/D3DX11 effects framework deprecated; modern workflow uses Pipeline State Objects (PSOs) in DirectX 12
Common useLegacy game assets, game modding, Autodesk 3ds Max DirectX Shader Material, shader development and prototyping
Distinct from geometryContains shading logic only; 3D models are stored in separate files such as .x (DirectX mesh format)
ReleasedDirectX 9.0 (2002) with the D3DX Effects framework
Latest versionDirectX 12 HLSL; legacy D3DX9/D3DX11 effect framework deprecated; modern HLSL now compiled to DXBC/DXIL bytecode
Specificationlearn.microsoft.com

FX conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with FX files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about FX files.

Frequently asked questions

What is a .fx file?
A DirectX HLSL effect file - plain-text GPU shader source combining vertex/pixel shader code with technique and pass declarations for Direct3D rendering.
How do I open a .fx file?
Open it in any text or code editor (Visual Studio, VS Code, Notepad++). To compile it, use fxc.exe from the DirectX SDK, or the modern DXC compiler.
What is the difference between .fx and .hlsl?
.hlsl holds standalone HLSL shader code; .fx wraps HLSL in an effect framework with technique/pass blocks and render-state declarations (D3DX Effects). The .fx syntax is a legacy layer; .hlsl is the modern convention.
Can I edit a .fx file to modify game graphics?
Yes - many game mods (ENB, ReShade, custom mod packs) work by editing .fx shader files. Open in a code editor, change the math/values, then either hot-reload the game or recompile with fxc.
Why is DirectX .fx deprecated?
D3DX Effects hid too many details from the developer. DirectX 12 and modern GPUs need explicit control over memory, pipeline state, and synchronization - the technique/pass abstraction is too high-level for that.
How do I compile a .fx file?
Use fxc.exe: fxc /T fx_5_0 /Fo shader.fxo shader.fx. The resulting .fxo (or .cso) is the binary that loads into the engine.

References

1Microsoft Docs - HLSL and the DirectX Effect Frameworklearn.microsoft.com
2Microsoft Docs - fxc.exe compilerlearn.microsoft.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.BINCD/DVD Disc Image (BIN/CUE)
3.MDMarkdown Document
4.PARTPartial Download File
5.RPMSGRestricted Permission Message
6.CRDOWNLOADChrome Partial Download File
7.NOMEDIAAndroid No-Media Marker File
8.PRDXSoftMaker Presentations Document
9.PRO6XProPresenter 6 Bundle File
10.SWFSmall Web Format (Shockwave Flash)

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z