Patchers - hakasapl/PGPatcher GitHub Wiki

This page will serve as a source for description of each patcher available in PGPatcher.

Pre-Patchers

Pre-patchers are run on meshes prior to shader patchers.

Disable Multilayer Parallax

This patcher simply removes any multi-layer parallax from any meshes. Very few people actually want this, some people just don't like multi-layer parallax.

Fix Mesh Lighting (ENB Only)

This patcher will apply the techniques described in Catnyss's article to fix glowing meshes. This is for ENB only as CS fixes this at an engine level. When using this patcher fixed mesh lighting is no longer required.

Shader Patchers

This is the core of PGPatcher. Shader patchers are what defines the material types on any given shapes in a mesh. Note that you will likely have different mods able to patch a single shape in a mesh. This is where the conflict viewer is useful to tell PG which mod you want to win if there is a conflict.

Parallax

When enabled, if matching parallax maps are found, meshes will be patched for parallax. See more information about this patcher here. This patcher is automatically enabled when the Upgrade Parallax to Complex Material transform patcher is enabled.

Complex Material

When enabled, if matching complex material maps are found, meshes will be patched for complex material. PG defines a "complex material map" as an environment mask where the alpha layer is non-white for more than 50% of its pixels. See more information about this patcher here. This patcher is automatically enabled when the Upgrade Parallax to Complex Material transform patcher is enabled.

TruePBR (CS Only)

When enabled, if matching PBR json patching definitions are found, meshes will be patched for TruePBR. Contrary to the other shader patchers, for something to be patched for PBR it REQURIES a mod-author provided JSON definition due to the added complexity of PBR. Check out the TruePBR wiki for more information.

Shader Transforms

Transform patchers are able to, where possible, transform a base shader type to a better variant.

Upgrade Parallax to Complex Material

This patcher will upgrade any base parallax material to complex material, where the resultant generated complex material map has black RGB and its alpha is the source parallax map. This will look identical in-game, but may be slightly more performance intensive due to the larger texture in VRAM. The resolution of the output map will be identical to the source parallax map. It is highly recommended to leave this enabled unless the performance difference is unacceptable to you. Complex material is just a better shader with far less issues and works with way more things (including single-pass snow! So if you run BDS 3 this is pretty much a requirement as base parallax does not work with single pass snow).

Post-Patchers

Post patchers are run on meshes after shader patchers have set the material for the shape.

Optimize Meshes

This patcher will run a few optimizations on the mesh before saving. This includes:

  • Updating bounds for each shape
  • Deleting any unreferenced blocks

This can sometimes result in invisible meshes, your mileage may vary.

Fix Vanilla Subsurface Scattering

In a lot of cases, especially on foliage, the subsurface map used is identical to the diffuse map. This results in too dark foliage at times. This patcher will generate a de-lighted version of the diffuse and use it as the subsurface map where applicable instead. It will therefore only apply to texture sets where the diffuse and subsurface map are identical. This will result in increased VRAM as an extra texture will be loaded.

Add Hair Flow Map (CS Only)

Community shaders has an upcoming hair shader feature which makes use of flow maps. This patcher will apply the flow map in the texture set and enable relevant flags when one exists based off the normal map.

Global Patchers

Global patchers apply on the mesh as a whole rather than an individual shape, which the other patchers above do.

Fix Effect Lighting (CS Only)

This patcher enables effects to receive ambient lighting (things like waterfalls and mountain fog, etc.). The technique is the same as the one used in CS Particle Patch, however, that mod would still be useful as the mod author makes some changes by-hand which an automated tool would not be able to replicate.