Stereoscopic 3D fixes using Helix mod & 3DMigoto
Python HLSL C Shell PostScript C++ Other
Switch branches/tags
witness-1.0 witness-0.2 witness-0.1 witcher3-Alpha_0.11 witcher3-Alpha_0.10 witcher3-Alpha_0.09 witcher3-Alpha_0.08 witcher3-Alpha_0.07 witcher3-Alpha_0.05 witcher3-1.10 witcher3-1.0 whirligig-2016-02-20 wd2-1.6 wd2-1.5 wd2-1.4 wd2-1.3 wd2-1.2 wd2-1.1 wd2-1.0 wd2-0.7 wd2-0.6 wd2-0.5 wd2-0.4 wd2-0.3 wd2-0.2 wd2-0.1 viscera-2015-12-27 viscera-2015-10-28 viscera-2015-04-01 tinker-2015-05-10 tinker-2015-05-08 theforest-v0.42 theforest-v0.42c theforest-v0.31 theforest-2015-12-27 theforest-2015-12-15 theforest-2015-12-12 theforest-2015-12-11 theforest-2015-04-19 theforest-2014-12-03 theforest-2014-11-23 subnautica-1.1 subnautica-1.0 stranded-2016-12-10 stranded-2016-07-18 stranded-2016-07-14 stranded-2016-05-22 stranded-2015-12-15 stranded-2015-12-13 stranded-2015-12-11 stranded-2015-09-18 stranded-2015-07-23 stranded-2015-05-18 stranded-2015-03-23 stranded-2015-03-01 stranded-2015-01-26 stranded-0.08.H1 stranded-0.07 stranded-0.07.H1 senua-2017-09-22 senua-2017-09-14 pineview-2015-03-05 oddworld-alpha-0.2-2015-02-27 oddworld-alpha-0.1-2015-02-26 oddworld-2015-03-01 montague-2015-05-20 montague-2014-12-16 montague-2014-10-18 montague-2014-10-16 montague-2014-10-14 miasmata-2015-05-18 miasmata-2015-02-09 miasmata-2015-02-08 mgsvtpp-2016-01-28 mgsvtpp-1.6 mgsvtpp-1.5 mgsvtpp-1.4 mgsvtpp-1.3 mgsvtpp-1.2 mgsvtpp-1.1 mgsvtpp-1.0 mgsvtpp-0.2 mgsvtpp-0.2a madmax-alpha_0.01 lichdom-2015-07-19 lichdom-0.1 infinifactory-2016-01-05 ggdp-2016-11-09 ggdp-2016-11-06 firewatch-2016-11-07 firewatch-1.0 firewatch-0.3 firewatch-0.2 firewatch-0.1 fc4-2016-03-09 fc4-2016-02-23 fc4-2015-12-21 fc4-2015-11-11 fc4-2015-06-05 fc4-2015-03-17
Nothing to show
Clone or download
DarkStarSword DOAXVV: Re-fix lighting shader broken by game update
Switches this part of the fix to a ShaderRegex to make it more resistant
to future updates.
Latest commit d2c506c May 10, 2018
Permalink
Failed to load latest commit information.
3DVision2SBS SLI Optimised version of the 3DVision2TB shader Aug 18, 2017
ABZU ABZU: Add blurb from the blog to README Jan 4, 2017
Akiba's Trip Undead & Undressed Various Games: Bring d3dx.ini up to parity with latest template Dec 4, 2016
Batman Batman: Link in 3DMigoto 1.3.11 May 10, 2018
Betrayer Betrayer: Add a default convergence to the ini Mar 31, 2015
BoUT2 BoUT2: Update README Jul 17, 2016
DOAX-VenusVacation DOAXVV: Re-fix lighting shader broken by game update May 10, 2018
Dead or Alive 5 Last Round DoA5LR: Fix Lens flare in Flow and Sanctuary stages Oct 15, 2015
DreadOut Add Patron link to various README files Apr 27, 2016
Dreamfall Chapters (DX11) @ ce53ade Dreamfall Chapters: Update submodule reference for Final Cut release Sep 11, 2017
Dreamfall Chapters (DX9) Dreamfall Chapters: Rename old fix to DX9 Jan 31, 2017
Eleusis Add Patron link to various README files Apr 27, 2016
Euro Truck Simulator 2 Euro Truck Simulator 2: Update sun/headlight shader CRC Jul 17, 2016
Far Cry 2 find . -iname '*.txt' -exec chmod 644 '{}' \; Nov 12, 2014
Far Cry 4 FC4: Update README.md Oct 23, 2017
Far Cry Primal debug_2d: Disable if debug resource is not bound Jan 3, 2017
Firewatch (DX11) README.md: Update 3DMigoto authors link May 7, 2018
Firewatch (DX9) Firewatch: Move quick fix to DX9 directory Feb 20, 2016
GalGun Double Peace GGDP: Re-run shadertool over broken shaders Mar 1, 2018
House Party @ 4c8e41a House Party: Set up submodule Feb 23, 2018
Infinifactory Infinifactory: Include crosshair disable shader from bo3b Jan 4, 2016
LegendsOfAethereus Add Patron link to various README files Apr 27, 2016
Lichdom Battlemage Various Games: Bring d3dx.ini up to parity with latest template Dec 4, 2016
Life is Strange - Before the Storm LiSBtS / Auto-convergence: Disable remembering last frame convergence May 8, 2018
Life is Strange Add Patron link to various README files Apr 27, 2016
MGSV_GZ MGSV: Add convergence override on aim + F combo Jan 24, 2016
MGSV_TPP CB Debug Shader: Fix display of floating point values smaller than 0.01 Feb 8, 2018
Mad Max Mad Max: Update from DHR Oct 19, 2015
Mass Effect Andromeda MEA: Fix SLI flicker on outdoor reflections Jan 19, 2018
Miasmata Miasmata: Update README to use new style screenshots Jul 17, 2016
Montague's Mount Add Patron link to various README files Apr 27, 2016
Oddworld New n Tasty Add Patron link to various README files Apr 27, 2016
Pineview Drive Add Patron link to various README files Apr 27, 2016
Senran Kagura Peach Beach Splash SKPBS: Fix another halo - water pistol glass Mar 11, 2018
Song of the Deep Various Games: Bring d3dx.ini up to parity with latest template Dec 4, 2016
Stranded Deep (DX11) Stranded Deep: Disable UI adjustment when W != 1 Dec 12, 2016
Stranded Deep (DX9) Stranded Deep: Move DX9 fix out of the way and run Untiy 5.3 DX11 aut… May 6, 2016
Submerged Various Games: Bring d3dx.ini up to parity with latest template Dec 4, 2016
Subnautica README.md: Update 3DMigoto authors link May 7, 2018
The Forest The Forest: Increase default convergence to 0.55 Dec 16, 2016
The Last Tinker City of Colors Add Patron link to various README files Apr 27, 2016
The Park The Park: Use resource copying instead of fake_o0 May 23, 2016
The Witness The Witness: Unbind ResourceDepthBufferPuzzles after use Jan 3, 2017
TheLongDark (DX11) Various Games: Bring d3dx.ini up to parity with latest template Dec 4, 2016
TheLongDark (DX9) TheLongDark: Move old DX9 fix out of the way Apr 30, 2016
Unity Unity: Use dp3 to save two instructions Dec 13, 2015
Unity5 Unity Scripts: Avoid "Resources/browser_assets" Apr 26, 2018
Viscera Add Patron link to various README files Apr 27, 2016
WATCH_DOGS2 @ 05baea6 WATCH_DOGS2: Update submodule reference for v1.6 Jul 14, 2017
Whirligig Various Games: Bring d3dx.ini up to parity with latest template Dec 4, 2016
Witcher3 Witcher3: Minor formatting fixup in README.md Dec 18, 2016
World of Diving (DX11) Various Games: Bring d3dx.ini up to parity with latest template Dec 4, 2016
World of Diving (DX9) Add Patron link to various README files Apr 27, 2016
__HELIX__ Helix Mod Binary Patch (x64): Log which file is being assembled Mar 2, 2018
__game_list__ Games list: Update hidden posts, add message about blogger API issue Mar 25, 2018
__profiles__ sanitise_nv_profiles: Handle corrupt string in Battlefield: Hardline … Jul 16, 2016
__shader_database__ Shader database: Silence BeautifulSoup warning Aug 19, 2017
__shaderasm__ find . -iname '*.txt' -exec chmod 644 '{}' \; Nov 12, 2014
custom_shader_cb_live_view CB Debug Shader: Update to use new split configuration May 8, 2018
custom_shader_debug_2d Debug2D: Unbind all render & depth targets Mar 19, 2018
custom_shader_help_text DOAXVV/Help Shader: Add notification mechanism May 5, 2018
custom_shader_move_object Custom Shaders: Add shader to move objects from keyboard input Feb 5, 2018
demonicon Demonicon: Comment shaders Feb 3, 2016
photo-gallery loreo2jps: Handle .jpg input Jan 22, 2017
stereo_buffer_tests LISBtS & stereo buffer tests: Port floating point representation fixes Feb 22, 2018
unity_types unity_types: Add type info for Unity 2018.1 May 6, 2018
.aliases.json Add alias for Senua Sep 13, 2017
.gitignore Update .gitignore to ignore 3DMigoto directories & .pyc files Jul 18, 2015
.gitmodules House Party: Set up submodule Feb 23, 2018
3DMigoto-stats.sh 3DMigoto-stats: Remove alpha channel on produced graphs for geforce f… Feb 23, 2018
3dvisionlive.js 3dvisionlive.js: Link images to full size download Jul 8, 2016
3dvisionlive_download_button.user.js 3dvisionlive download button userscript: Work on embedded images Jul 8, 2015
CustomSettingNames_en-EN.xml CustomSettingNames: Remove excessive notes from StereoProfile, remove… Jul 16, 2016
Dreamfall Chapters Dreamfall Chapters: Set up git submodule for DX11 version Feb 12, 2017
Firewatch Firewatch: Move quick fix to DX9 directory Feb 20, 2016
README.md New Blender Addon to import/export meshes from 3DMigoto Apr 8, 2018
Stranded Deep Stranded Deep: Move DX9 fix out of the way and run Untiy 5.3 DX11 aut… May 6, 2016
TheLongDark TheLongDark: Move old DX9 fix out of the way Apr 30, 2016
World of Diving World of Diving: Switch back to DX9 & run autofix.sh Dec 21, 2015
asmtool.py Unity / asmtool / hlsltool: Specify Namespaces Apr 26, 2018
blender_3dmigoto.py Blender 3DMigoto Addon: Add operator to merge skeletons of related ob… Apr 24, 2018
calc_shader_crc.py Add calc_shader_crc.py to calculate a shaders CRC32 & update README.md Dec 26, 2014
cleanup_deduped.sh Add cleanup_deduped.sh script Apr 5, 2018
cleanup_unity_shaders.py Unity Template: Migrate to split d3dx.ini configuration Apr 26, 2018
compare_shader_bins.py compare_shader_bins: Fix bugs Jul 8, 2015
ddsinfo.py ddsinfo: Fill in some non-typeless depth buffer formats Mar 22, 2018
decode_buffer.py decode_buffer.py: Add format options, tweak offset display Jan 7, 2016
dx11shaderanalyse.py dx11shaderanalyse: Pre-calculate the sines of integers for the shader… Jan 24, 2017
extract_stereo_settings.py extract_stereo_settings.py: Identified unknown field as text flag Feb 22, 2015
extract_unity53_shaders.py extract_unity53_shaders: Cope with another variation in undeciphered3 Jan 25, 2018
extract_unity55_shaders.py extract_unity55_shaders: Add support for Unity 2018.1 May 6, 2018
extract_unity_shaders.py extract_unity53_shaders: Add support for type 8 Jan 25, 2018
extract_unreal_shaders.py extract_unreal_shaders: Inform user script is abandoned & refuse to run Dec 12, 2016
extract_wd2_shaders.py extract_wd2_shaders.py: Commit old bug fix Jul 15, 2017
find_frame_analysis_candidates.py Add find_frame_analysis_candidates.py Mar 4, 2016
float_to_hex.py float_to_hex: Add tests for timer accuracy, and verbose mode Jan 13, 2018
generic_shader_extractor.py Add extract_wd2_shaders script Jan 24, 2017
get_unity_version.sh Introduce get_unity_version.sh Jul 15, 2017
hlsltool.py Unity / asmtool / hlsltool: Specify Namespaces Apr 26, 2018
interlaced2jps.py Add interlaced2jps.py script to convert interlaced images into .jps f… Dec 18, 2014
inverse-cs.hlsl inverse-cs: Use consistent matrix names Oct 31, 2016
matrix.hlsl Subnautica: Have CB stereoise shader cope with no projection matrix Feb 8, 2018
matrix.py matrix.py: Fix missing component in euclidean matrix inverse rcp inst… Oct 23, 2017
md2helix_blogger.py Add script to convert markdown to helix blog formatting Oct 4, 2014
mkrelease.sh mkrelease: Abort if export_binary is set Jan 28, 2018
pyasm.py pyasm py_to_asm: Strip pydoc May 28, 2015
rename2bytecode.sh dx11shaderanalyse / rename scripts: Include signatures in bytecode hash Apr 26, 2016
rename2embedded.sh dx11shaderanalyse / rename scripts: Include signatures in bytecode hash Apr 26, 2016
screenshot_archive.py screenshot_archive: Cope with new filename pattern Feb 6, 2018
shaderasm.exe extract_unity_shaders: Embed CRC32 in shader headers Nov 4, 2014
shadertool.py shadertool: Fix incorrect mask used in --fix-unreal-halo-sct, crashin… Mar 1, 2018
shaderutil.py shadertool: Don't fail immediately if filename does not contain CRC Mar 27, 2015
unity_asset_bundle_extractor.py unity_asset_bundle_extractor: Add --dump-type-info option Jan 22, 2018
unity_asset_extractor.py unity_asset_extractor: Remove string offsets from type info dumps Jan 22, 2018
unity_cb_to_hlsl.sh unity_cb_to_hlsl: Remove row_major keyword Sep 1, 2017
update_3dmigoto_symlinks.sh update_3dmigoto_symlinks: Allow 3DMigoto version to be passed in Dec 10, 2016
useful_pre-commit_hook pre-commit hook: Add 3DMigoto ShaderFixes directory as well Dec 29, 2014

README.md

Stereoscopic 3D Fixes

This repository tracks any fixes I make to games rendered in stereoscopic 3D using nVidia 3D Vision. Helix Mod and 3DMigoto are used to enable the fixes, see the Helix Mod blog for details on mod itself and final releases of these fixes.

Complete Fixes

  • Betrayer (Improvements on Eqzitara's fix) - fixes water, god rays, etc.
  • The Book of Unwritten Tales 2 - Fixes shadows, halos, etc.
  • [Montague's Mount](Montague's Mount) - Fixes halos, shadows, etc.
  • [Dreamfall Chapters](Dreamfall Chapters) - First ever Unity FOV correct shadow fix
  • World of Diving [DX9](World of Diving (DX9)) & [DX11](World of Diving (DX11)) - Fixed halos, shadows, etc.
  • [The Forest](The Forest) - Fixed halos, shadows, reflections, parallax sand/rocks, etc.
  • Legends of Aethereus - Fixed halos, shadows, skybox, etc.
  • DreadOut - Fix for missing fog after shader model upgrade, stereo cameraphone, etc.
  • Eleusis - Fixed shadows, light shafts, etc.
  • [Stranded Deep](Stranded Deep) - Fixed water, light shafts, yet another shadow pattern, auto-crosshair, etc.
  • [Life Is Strange](Life is Strange) - Fixed shadows, reflections, light shafts, bloom, etc.
  • Miasmata - Reflections, light shafts, stereo crosshair, skybox, etc.
  • [Oddworld: New 'n' Tasty](Oddworld New n Tasty) - Shadows, halos, clipping, ripple distortion, etc.
  • [Pineview Drive](Pineview Drive) - Halos, shadows, sun shafts, etc.
  • The Long Dark - Halos, shadows, etc.
  • Viscera Cleanup Detail - shadows, missing UI, etc.
  • [Dead or Alive 5: Last Round](Dead or Alive 5 Last Round) - water, halos, lens flares
  • [The Last Tinker: City of Colors](The Last Tinker City of Colors) - new technique to fix shadows
  • [Euro Truck Simulator 2](Euro Truck Simulator 2) - skybox, god rays, reflections
  • [Lichdom Battlemage](Lichdom Battlemage) - first every CryEngine 3 fix
  • [Mad Max](Mad Max) (Collaboration with DHR) - Fixes shadows, bloom, decals, reflections, etc.
  • Metal Gear Solid V: The Phantom Pain - New 3DMigoto hooking mode, accurate specular highlight fix, etc.
  • [The Witness](The Witness) - Automatic stereo mouse cursor, reflections, etc.
  • Firewatch - First game to use the DX11 port of my Unity scripts
  • [Far Cry Primal](Far Cry Primal) - Volumetric fog / light shafts / shadow volumes, accurate specular highlights, etc.
  • [Far Cry 4](Far Cry 4) (with mike_ar69) - fixes pretty much everything, adds an auto HUD
  • Witcher 3 (with mike_ar69 & others) - Highlight: physical lighting compute shaders

Several of my fixes are in their own dedicated repository due to their size:

  • WATCH_DOGS2 - First ever accurate Screen Space Reflection fix, accurate San Francisco volumetric fog, etc.

Works In Progress

  • Submerged (UE4 3DMigoto approach WIP, fixes shadows)
  • Batman: Arkham Knight (with mike_ar69) - fixes tile lighting compute shaders and halos
  • Demonicon - Quick fix to make the game playable, fixes lights and some halos
  • [Akiba's Trip](Akiba's Trip Undead & Undressed) - Adds a toggle for an auto UI depth adjustment (unpolished)

Minor Improvements

  • [Far Cry 2](Far Cry 2) - Adds auto-convergence while holding RMB
  • Infinifactory - fixes shadows from bo3b's fix

Other Branches

There's a couple of fixes that aren't in the master branch for various reasons:

Templates

Misc

I also keep a small collection of utilities related to 3D fixes.

useful_pre-commit_hook

If you are tracking 3D fixes in git, it is recommended to add this commit hook to prevent accidentally committing a shader with a NULL byte so that git will treat them as text files and show diffs in the history.

float_to_hex.py

Small python script to convert floating point numbers to hex and vice versa to get values for Helix Mod's DX9Settings.ini

_game_list_

Source for the auto-updating game list on the Helix Mod blog.

_shader_database_

Python script to crawl the helix blog downloading every fix it can find and creating a database of shaders so we can look up if a particular shader has been fixed previously, as may happen with games using the same engine.

mkrelease.sh

Small script to package up a game's fixes for release, replacing the symlinked dll with the real version and renaming README.md to 3DFix-README.txt. Run from cygwin, Linux or another Unix environment.

md2helix_blogger.py

Python script to format a markdown document to fit in with the formatting on the Helix blog. Strips top level headers and downgrades second level headers to underlined paragraphs.

CustomSettingNames_en-EN.xml

Custom setting names XML file for nVidia Inspector that adds friendly names for some of the stereo attributes that I've identified in each profile.

shadertool.py

This is a python tool I've started working on to parse shaders and automate some of the process of hacking them. It's very early and the code is not very pretty. At the moment it can (this list is out of date, run with --help for all current features):

  • Install shaders to the ShaderOverride directory, taking care of naming the file correctly.
  • Convert ps_2_0 to ps_3_0 and vs_2_0 to vs_3_0, optionally adding instructions to preserve fog that can stop working on shader model upgrades.
  • Analyse shader register usage and look for free constants.
  • Disable an entire shader by setting it's output to 0 or 1.
  • Disable individual texcoord outputs from a vertex shader.
  • Apply the stereo correction formula to an output texcoord of a vertex shader, optionally with a custom multiplier (try 0.5 if a correction switches eyes).
  • Reverse the stereo correction formula on the output position of a vertex shader to unstereoize it.
  • Disabled outputs, adjustments, etc. can be made conditional on a register passed in from Helix mod.
  • Insert a depth adjustment suitable for UI elements to the value of a constant register component (typically passed in from DX9Settings.ini).
  • Attempt to automatically fix common issues in vertex shaders where the output position has been copied, often resulting in halos (Very helpful for Unity games).
  • Automatically fix light shafts in Unreal Engine games.
  • Remove Unreal's stereo correction in shaders using vPos where it does more harm than good.
  • Automatically fix certain types of reflective surfaces in Unreal games (those using a 2D DNEReflectionTexture, used in Life Is Strange).
  • Automatically fix shadows in Unreal Engine games.
  • Apply auto fixes for Unity lights/shadows, specular highlights, reflections, fog, SSAO, etc (start with the templates instead).

hlsltool.py

This is similar to shadertool.py, but works on HLSL shaders instead. It's feature set is more limited than shadertool:

  • Install shaders to the ShaderFixes directory.
  • Attempt to automatically fix common issues in vertex shaders where the output position has been copied, often resulting in halos (Very helpful for Unity games).
  • Apply auto fixes for Unity lights/shadows, specular highlights, reflections, fog, light shafts, etc (start with the template instead).

asmtool.py

This is a port of shadertool.py to work with DX11 assembly shaders, (but internally is more similar to hlsltool and depends on both for some common code). It's feature set is the most limited for now:

  • Install shaders to the ShaderFixes directory.
  • Attempt to automatically fix common issues in vertex shaders where the output position has been copied, often resulting in halos (Very helpful for Unity games).
  • Apply auto fixes for Unity lights/shadows, specular highlights, reflections, fog, light shafts, etc (start with the template instead).

extract_stereo_settings.py

Short python script to extract the table of Stereo settings from the nVidia driver and write them to a CustomSettingNames_en-EN.xml which can be used with nVidia Inspector.

matrix.py

Small Python module to create typical matrices for translation, rotation, scaling and projection in 3D to help me understand the maths behind them.

extract_unity_shaders.py

Python script to parse the compiled output of Unity shaders and pull out all the different variants into separate files, with headers intact.

extract_unity53_shaders.py

Variant of the above for Unity 5.3 and later.

extract_unreal_shaders.py

This script has been abandoned due to considerable complications in the Unreal file formats. It can extract shader names from the Arkham Knight cooked shader cache, but probably won't do anything useful in any other game. Consider using the generic_shader_extractor.py script instead.

generic_shader_extractor.py

This script can extract DX11 shaders from many games. It is known to work with all UE4 games, but not Unity or CryEngine games, and may or may not work with other games. It will not extract any additional metadata for the shaders other than what 3DMigoto can already extract, but is useful for games that only dump shaders on demand / level by level, or games that use GPU specific shaders.

ddsinfo.py

Decodes the header on a DDS file and possibly converts it to PNG (conversion only supported for some DDS formats, extending support as I come across new formats, but I kind of want to rewrite the format support to be more declarative).

For use with Helix Mod: Use GetSampler1FromReg, GetSampler2FromReg or GetSampler3FromReg in a shader section of DX9Settings.ini to extract a texture passed to a shader, press F12 in game to dump it out as Tex1.dds, Tex2.dds or Tex3.dds, then use this tool to decode it's header.

For use with 3DMigoto: Use on .dds files dumped during frame analysis.

interlaced2jps.py

Converts an interlaced image into a jps file

screenshot_archive.py

This script periodically sorts all 3D screenshots into directories for the games they are from and renames them to include the date and time they were taken.

Place it in the Documents\NVStereoscopic3D.IMG directory and run it.

_shaderasm_ & shaderasm.exe

Small C++ project to assemble a shader .txt file. Used by extract_unity_shaders.py to calculate the CRC32 of shaders extracted from Unity games.

calc_shader_crc.py

Small wrapper around shaderasm.exe to calculate a shader's current CRC32.

unity_asset_extractor.py

An alternative to Unity Asset Explorer, to extract assets (currently limited to shaders) from Unity 4 and Unity 5 games in batch.

unity_asset_bundle_extractor.py

Parses Unity asset bundle files from games that use them (currently Unity 5.3+ UnityFS LZ4 & uncompressed variants only) to extract shaders in batch. These files are conceptually similar to the files parsed with unity_asset_extractor.py, but they are distinct in that they use an additional container format, and are typically used for DLC. These may be found in the *_Data/StreamingAssets/Bundles directory of a Unity game. They contain asset files that unity_asset_extractor.py can parse, and it will automatically be called on these files. This script uses a block based on-demand decompression scheme to significantly speed up the process for larger asset bundles.

dx11shaderanalyse.py

Decodes some information in the ISGN & OSGN sections of DX11 shaders.

pyasm.py

Implements shader like semantics in Python, including registers supporting masks and swizzles using a natural syntax, and various shader instructions. Useful to prototype & debug complicated algorithms.

decode_buffer.py

Decodes the given buffer extracted via 3DMigoto's frame analysis feature as both integers and floats.

3dvisionlive_download_button.user.js

User script to add a download button to images on 3D Vision Live.

cleanup_unity_shaders.py

Removes shaders from a Unity game in this git repository that are no longer found amongst the extracted shaders to stop a fix growing endlessly. Use only for games that people should not be running old versions of (like early access). Old shaders will still be in the git history if we need them.

compare_shader_bins.py

This was a quick 'n' dirty means to repair the damage caused to a DX11 assembly shader by the microsoft disassembler by comparing the original and otherwise unmodified reassembled shader binaries to look for differences then patch floating point values in the assembly text to compensate. In some cases this may patch the wrong floating point value, but has worked remarkably well in practice. This script is no longer required as 3DMigoto will now auto repair assembly shaders when they are dumped.

profiles

A couple of scripts to help catalogue the driver profiles and normalise the profile format to make it easier to compare changes between driver versions.

shaderutil.py

Utility library used by shadertool and the shader database.

find_frame_analysis_candidates.py

Provides statistics from a 3DMigoto frame analysis log.txt that may assist in selecting a suitable shader to use as a trigger to start analysis at the more interesting post-processing phase of the frame. Statistics include the percentage of draw calls and dumped render targets would be saved, as well as the total number of times each listed shader is used (not all shaders are listed), and the number of simultaneous render targets used with each listed shader (a series of consecutive shaders with a consistently high number of render targets may indicate the long and uninteresting forward rendering phase of the frame).

photo-gallery

Scripts to statically convert .mpo and .jps files into different viewing formats and create a website displaying them, with links to switch methods.

3dvisionlive.js

Javascript file to embed 3D photos from 3dvisionlive.com in a web page providing links to switch between using the plugin, cross-eyed or distance viewing methods, or anaglyph.

inverse-cs.hlsl

Compute shader that can be injected with 3DMigoto to inverse arbitrary 4x4 matrices. Uses the parallel nature of the GPU to accelerate the inverse, and 3DMigoto can usually restrict this to run once per frame to minimise the performance impact. Extremely useful for inversing matrices to be passed to assembly shaders, where performing an inline inverse is complicated and error prone.

rename2bytecode.sh

Script to rename shaders to use the bytecode hash. Requires a ShaderCache folder containing all replaced shaders dumped with their current hashes in binary form.

rename2embedded.sh

As above, but renames the shaders to use the embedded hash.

update_3dmigoto_symlinks.sh

Updates all 3DMigoto symlinks in the current directory or subdirectories to use the latest version of 3DMigoto (which must be extracted in a directory named 3Dmigoto-x.y.z under 3d-fixes).

custom_shader_cb_live_view

This directory contains a custom shader, font and the corresponding d3dx.ini sections to interpret a constant buffer as floating point values and show them live while in game. This is done entirely on the GPU and uses a geometry shader to generate the text.

get_unity_version.sh

Gets the Unity version of a given executable, or searches for Unity executables within a directory. Pass it SteamApps/common/* to find every Unity game in your collection.

unity_cb_to_hlsl.sh

Translates the Unity global constant buffer definition from a shader (or shaders) into a cbuffer definition for use in a HLSL shader. If multiple shaders are specified, their definitions will be collated and merged together.

matrix.hlsl

Includes functions to inverse a matrix in HLSL, a convinience macro to grab a matrix out of a constant buffer with no resource description, and functions to create the usual array of translation matrices.

stereo_buffer_tests

This directory contains test cases for whether buffers will be stereoised or not with varying combinations of bind flags and creation modes. Compare the results when running with different StereoFlagsDX10.

blender_3dmigoto.py

Addon for Blender to import meshes from 3DMigoto Frame Analysis dumps (analyse_options = dump_vb txt), and export binary vertex & index buffers suitable for re-injection.