Skip to content

Latest commit

 

History

History
202 lines (133 loc) · 8.39 KB

rendering.md

File metadata and controls

202 lines (133 loc) · 8.39 KB

Rendering and world settings

Display resolution

[Display] Width and Height control the requested output size. 0 / 0 lets ZachFix resolve the current target monitor size.

Borderless = true is the recommended windowed setup, especially for reliable Alt-Tab behavior.

Display/window-mode changes are startup/device-creation settings rather than ordinary F10 Hot Apply settings.

Internal rendering resolution

[Rendering] InternalWidth and InternalHeight take priority when both are non-zero.

Otherwise:

internal resolution = display resolution * InternalScale

Examples:

  • InternalScale = 1.0 -> native output resolution;
  • 1.5 -> 150% per axis;
  • 2.0 -> 200% per axis.

The parser accepts InternalScale from 0.25 through 4.0; the F10 slider exposes the normal 0.50 through 4.00 tuning range.

FixPixelOffset = true applies ZachFix's scaled-rendering pixel-offset correction. The separate [Experimental] Fullscreen2DEdgeFix option handles missing right/bottom pixels on selected fullscreen UI fills, and is disabled by default.

Shadows

[Shadows]
Scale = 4
ImprovePrecision = true

Scale accepts 1..8 and scales recognized vanilla shadow resources.

ImprovePrecision = true requests the original DPFix shadow-depth precision fix for recognized 512/1024 shadow depth maps, using D32F_LOCKABLE instead of D16 where supported. This option is selected when shadow resources are created and therefore requires a restart.

If a backend rejects the requested precision format, ZachFix uses its compatibility fallback instead of making resource creation fatal.

Reflections

[Reflections]
Scale = 4
FixWetReflectionNormals = false

Scale accepts 1..8 and scales the recognized vanilla reflection targets.

FixWetReflectionNormals is a restart-only, opt-in native PC rendering repair for Steam/GOG 1.01b. It changes the default value of the PC material-packet wet-gate initializer (CRdSceneDraw+0x670C) from 0 to 1 in process memory after validating the exact ten-byte instruction. The original native callback still has the final say and can clear the gate for weather/story exceptions. No textures, shaders, draw calls, or on-disk DP.exe are modified. Unsupported builds and signature mismatches are left untouched. Rain and clear-weather observations have been successful; unusual scripted scene combinations have not all been runtime-tested. The option defaults to false for that reason.

Legacy depth of field

[DepthOfField]
ImproveResolution = true
AdditionalBlur = 0

ImproveResolution raises the game's original DoF intermediate resolution in proportion to the active internal resolution.

AdditionalBlur keeps the game's existing focus/depth behavior and only adds optional softening after the original DoF blur:

  • 0 - Off
  • 1 - Soft
  • 2 - Stronger

The F10 Off/Soft/Stronger control is immediate.

ZachFix Depth of Field is a separate optional path documented in postfx.md.

World detail

[World]
HighDetailDistanceScale = 1
MainFrustumDistanceMode = 0
ObjectActivationDistanceScale = 1
ObjectLODDistanceScale = 1
Alternate3DDistanceScale = 1
FixInteriorOcclusionBugs = true

HighDetailDistanceScale

  • 1 - original high-detail 2x2 core;
  • 2 - promotes the existing outer 4x4 streaming ring to high-detail content.

The existing streaming footprint is retained. Changes become fully visible as streaming cells transition.

MainFrustumDistanceMode

This changes only the far planes of DP's existing short-range CRdCamera main-frustum classes. Object class selection, AABB/frustum tests, streaming, activation, LOD selection, shadow volumes and render submission remain native.

  • 0 - Original: class 3/4/5 = 5000 / 1000 / 500
  • 1 - Extended: class 3/4/5 = 5000 / 1000 / 1000
  • 2 - Extended Plus: class 3/4/5 = 5000 / 5000 / 5000
  • 3 - Extreme: class 3/4/5 = 20000 / 20000 / 20000

Classes 0/1/2 always remain at their native 200000 / 80000 / 20000 far planes. Extended Plus and Extreme affect every object assigned to the raised classes, so they can increase CPU/GPU load substantially in dense scenes. Extreme can also expose a farther, separate streaming/residency ceiling once the main-frustum limit is no longer the first cutoff.

ObjectActivationDistanceScale

  • 1 - original 1000 world-unit activation radius;
  • 2 - extended 2000 world-unit radius.

This reduces visible world-prop pop-in while keeping the game's active-list and streaming structures.

ObjectLODDistanceScale

  • 1 - Original
  • 2 - Extended
  • 3 - High
  • 4 - Extreme

This extends native mesh LOD transition distances only for type-1 render objects that actually contain native multi-LOD resource groups. Single-LOD resources and unrelated render-object types are unaffected. The native resource groups and LOD selector remain authoritative; ZachFix scales only the existing camera-distance metric.

This does not expand the streaming grid, main-frustum class, or object activation radius.

Alternate3DDistanceScale

  • 1 - Original, approximately 2500-unit square half-extent;
  • 2 - Extended, approximately 5000 units;
  • 3 - High, approximately 7500 units;
  • 4 - Extreme, approximately 10000 units.

This controls a separate native residency mechanism used by objects that can switch to an alternate low-detail 3D resource package. It is not a billboard/impostor distance, and it is independent of main-frustum class, the approximately 1000-unit active-list gate, and native mesh LOD.

The engine preloads paired alternate resources and switches representation through its native resource-binding path. ZachFix extends the near/full range feeding that existing mechanism rather than replacing the resource package or renderer.

How the world-distance controls relate

The five exposed controls target five independent native systems:

Control Engine domain
HighDetailDistanceScale streaming-cell detail selection
MainFrustumDistanceMode six-class main-camera visibility system
ObjectActivationDistanceScale native active-list distance
ObjectLODDistanceScale native multi-LOD mesh metric
Alternate3DDistanceScale alternate low-detail 3D residency

Directional shadow relevance is separate again: the engine has a three-frustum directional-shadow path with native 1000/3000-unit far construction. MainFrustumDistanceMode does not directly extend that shadow distance.

FixInteriorOcclusionBugs

Enabled by default. This fixes the confirmed Director's Cut visibility-volume regression that can incorrectly hide visible props near interior walls/mirrors.

The fix is narrow: normal camera frustum culling, streaming, object activation, LOD, and unrelated visibility callers remain native.

Texture filtering

[Filtering]
Mode = Original
MaxAnisotropy = 16

Modes:

  • Original - leave the game's sampler filtering unchanged;
  • Bilinear - DPFix-style compatibility behavior for ordinary 2D textures;
  • Anisotropic - smart AF for eligible mipmapped, non-render-target 2D textures.

MaxAnisotropy accepts 2..16 and is also clamped to the device capability at runtime.

The smart anisotropic path avoids overriding intentional point sampling and preserves the game's MAG/MIP policy where appropriate.

Comparison screenshots

The optional [Screenshots] workflow uses the same live render/world switches documented above and can combine them with PostFX/presentation modes for matched captures. By default:

  • F6 cycles Original -> ZachFix -> Xbox360;
  • F7 saves the currently displayed final backbuffer as PNG;
  • F8 captures all configured presets in one timestamp-matched batch and restores the previous live state afterward.

Capture happens after the optional Xbox HDTV transfer and before ZachFix's Present-time UI. Original means the reversible original PC rendering state, not a full process restart: restart-only shadow depth precision and already-loaded texture ownership are intentionally kept unchanged. See configuration.md for preset syntax and custom overrides.

Hot Apply

The Graphics tab can rebuild ZachFix-managed replacement render resources without calling IDirect3DDevice9::Reset.

Important exceptions:

  • shadow depth precision requires a restart;
  • display/device-creation settings require a restart;
  • texture ownership modes have their own restart rules documented in textures.md.