Shader Editing - ME3Tweaks/LegendaryExplorer GitHub Wiki

Shader Editing for Legendary Edition

Shaders are the code that runs on the GPU to draw the different faces of a polygon. They are used to modify the look of items based on the camera angle, lighting, reflectivity, material type, and other properties that compose the look of a graphic on the screen.

Tools you'll need

Running RenderDoc to modify a shader

RenderDoc is an advanced tool that can capture the execution of of a frame being drawn to the screen (or multiple frames, if configured). This drawing process includes the various stages of shader pipelines, a process that is previewable in RenderDoc.

To begin editing a shader, you must start the game process via RenderDoc, meaning you must launch the game via a DRM-free executable, as it must be able to hook graphics APIs before boot. You can configure the launch path via the Launch Application tab.

Once configured, you can launch the game via RenderDoc's launch button. The game will then launch.

In order to edit a shader, you must have the shader on-screen and drawing that frame as part of the graphics pipeline. You can then use the keyboard commands listed in the top left of the game window, or via RenderDoc's user interface.

Once your frame has been captured, you can close the game, as shader preview is done in RenderDoc, not in game. After your capture, your window should look something like this:

RenderDoc benefits greatly from having a large screen, or multiple displays. For the sake of this guide, neither of these will be true, but feel free to configure the tab layout as you need. We will have the event browser on the left, the Texture Viewer on the bottom right, and the rest of the tabs in their original positions.

On the left side of the window, in the Event Browser, you can see each step of the frame generation. If you highlight the first item and hold the down arrow, the texture preview will progressively become closer to the final frame. In the Texture Viewer you will see something akin to this (Mass Effect 1 title screen as an example) - where different parts of the image are being composed together. In the below picture, you can see the inputs and outputs tab to the frame - the inputs may be the textures you see in Package Editor.

** To be continued... **