From 567d36240eec88d8b1ae200e0911a94e4da86fc1 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 12 Feb 2024 15:02:21 +0000 Subject: [PATCH 1/3] Clarify shaders documentation We know people get confused by it. Hopefully this should help. --- .../reference/modding/settings/shaders.rst | 42 ++++++++++--------- files/settings-default.cfg | 13 +++--- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/docs/source/reference/modding/settings/shaders.rst b/docs/source/reference/modding/settings/shaders.rst index 9ee1cbfaa5..8bd152857f 100644 --- a/docs/source/reference/modding/settings/shaders.rst +++ b/docs/source/reference/modding/settings/shaders.rst @@ -8,11 +8,15 @@ force shaders :Range: True/False :Default: False -Force rendering with shaders. By default, only bump-mapped objects will use shaders. -Enabling this option may cause slightly different visuals if the "clamp lighting" option is set to false. +Force rendering with shaders, even for objects that don't strictly need them. +By default, only objects with certain effects, such as bump or normal maps will use shaders. +Many visual enhancements, such as :ref:`enable shadows` and :ref:`reverse z` require shaders to be used for all objects, and so behave as if this setting is true. +Typically, one or more of these enhancements will be enabled, and shaders will be needed for everything anyway, meaning toggling this setting will have no effect. + +Some settings, such as :ref:`clamp lighting` only apply to objects using shaders, so enabling this option may cause slightly different visuals when used at the same time. Otherwise, there should not be a visual difference. -Please note enabling shaders has a significant performance impact on most systems. +Please note enabling shaders may have a significant performance impact on some systems, and a mild impact on many others. force per pixel lighting ------------------------ @@ -21,10 +25,10 @@ force per pixel lighting :Range: True/False :Default: False -Force the use of per pixel lighting. By default, only bump mapped objects use per-pixel lighting. -Has no effect if the 'force shaders' option is false. +Force the use of per pixel lighting. By default, only bump and normal mapped objects use per-pixel lighting. +Only affects objects drawn with shaders (see :ref:`force shaders` option). Enabling per-pixel lighting results in visual differences to the original MW engine as certain lights in Morrowind rely on vertex lighting to look as intended. -Note that groundcover shaders ignore this setting. +Note that groundcover shaders and particle effects ignore this setting. clamp lighting -------------- @@ -34,7 +38,7 @@ clamp lighting :Default: True Restrict the amount of lighting that an object can receive to a maximum of (1,1,1). -Only affects objects that render with shaders (see 'force shaders' option). +Only affects objects drawn with shaders (see :ref:`force shaders` option). Always affects terrain. Leaving this option at its default makes the lighting compatible with Morrowind's fixed-function method, @@ -49,9 +53,9 @@ auto use object normal maps :Default: False If this option is enabled, normal maps are automatically recognized and used if they are named appropriately -(see 'normal map pattern', e.g. for a base texture foo.dds, the normal map texture would have to be named foo_n.dds). +(see :ref:`normal map pattern`, e.g. for a base texture ``foo.dds``, the normal map texture would have to be named ``foo_n.dds``). If this option is disabled, -normal maps are only used if they are explicitly listed within the mesh file (.nif or .osg file). Affects objects. +normal maps are only used if they are explicitly listed within the mesh file (``.nif`` or ``.osg`` file). Affects objects. auto use object specular maps ----------------------------- @@ -61,10 +65,10 @@ auto use object specular maps :Default: False If this option is enabled, specular maps are automatically recognized and used if they are named appropriately -(see 'specular map pattern', e.g. for a base texture foo.dds, -the specular map texture would have to be named foo_spec.dds). +(see :ref:`specular map pattern`, e.g. for a base texture ``foo.dds``, +the specular map texture would have to be named ``foo_spec.dds``). If this option is disabled, normal maps are only used if they are explicitly listed within the mesh file -(.osg file, not supported in .nif files). Affects objects. +(``.osg`` file, not supported in ``.nif`` files). Affects objects. auto use terrain normal maps ---------------------------- @@ -73,7 +77,7 @@ auto use terrain normal maps :Range: True/False :Default: False -See 'auto use object normal maps'. Affects terrain. +See :ref:`auto use object normal maps`. Affects terrain. auto use terrain specular maps ------------------------------ @@ -82,7 +86,7 @@ auto use terrain specular maps :Range: True/False :Default: False -If a file with pattern 'terrain specular map pattern' exists, use that file as a 'diffuse specular' map. +If a file with pattern :ref:`terrain specular map pattern` exists, use that file as a 'diffuse specular' map. The texture must contain the layer colour in the RGB channel (as usual), and a specular multiplier in the alpha channel. normal map pattern @@ -93,7 +97,7 @@ normal map pattern :Default: _n The filename pattern to probe for when detecting normal maps -(see 'auto use object normal maps', 'auto use terrain normal maps') +(see :ref:`auto use object normal maps`, :ref:`auto use terrain normal maps`) normal height map pattern ------------------------- @@ -113,7 +117,7 @@ specular map pattern :Range: :Default: _spec -The filename pattern to probe for when detecting object specular maps (see 'auto use object specular maps') +The filename pattern to probe for when detecting object specular maps (see :ref:`auto use object specular maps`) terrain specular map pattern ---------------------------- @@ -122,7 +126,7 @@ terrain specular map pattern :Range: :Default: _diffusespec -The filename pattern to probe for when detecting terrain specular maps (see 'auto use terrain specular maps') +The filename pattern to probe for when detecting terrain specular maps (see :ref:`auto use terrain specular maps`) apply lighting to environment maps ---------------------------------- @@ -166,7 +170,7 @@ normal maps are provided. This is due to some groundcover mods using the Z-Up normals technique to avoid some common issues with shading. As a consequence, per pixel lighting would give undesirable results. -Note that the rendering will act as if you have 'force shaders' option enabled +Note that the rendering will act as if you have :ref:`force shaders` option enabled when not set to 'legacy'. This means that shaders will be used to render all objects and the terrain. @@ -283,7 +287,7 @@ between them. Note, this relies on overriding specific properties of particle systems that potentially differ from the source content, this setting may change the look of some particle systems. -Note that the rendering will act as if you have 'force shaders' option enabled. +Note that the rendering will act as if you have :ref:`force shaders` option enabled. This means that shaders will be used to render all objects and the terrain. weather particle occlusion diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 4a90a46cc5..5f68f055d4 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -405,15 +405,18 @@ console history buffer size = 4096 [Shaders] -# Force rendering with shaders. By default, only bump-mapped objects will use shaders. -# Enabling this option may cause slightly different visuals if the "clamp lighting" option -# is set to false. Otherwise, there should not be a visual difference. +# Force rendering with shaders, even for objects that don't strictly need them. +# By default, only objects with certain effects, such as bump or normal maps will use shaders. +# Many visual enhancements, such as "enable shadows" and "reverse z" require shaders to be used for all objects, and so behave as if this setting is true. +# Some settings, such as "clamp lighting" only apply to objects using shaders, so enabling this option may cause slightly different visuals when used at the same time. +# Otherwise, there should not be a visual difference. force shaders = false -# Force the use of per pixel lighting. By default, only bump mapped objects use per-pixel lighting. -# Has no effect if the 'force shaders' option is false. +# Force the use of per pixel lighting. By default, only bump and normal mapped objects use per-pixel lighting. +# Only affects objects drawn with shaders (see "force shaders" option). # Enabling per-pixel lighting can result in visual differences to the original MW engine as # certain lights in Morrowind rely on vertex lighting to look as intended. +# Note that groundcover shaders and particle effects ignore this setting. force per pixel lighting = false # Restrict the amount of lighting that an object can receive to a maximum of (1,1,1). From 91e7eebefb2c0d9847d67258da27f0d834fa4f46 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 14 Feb 2024 13:32:39 +0000 Subject: [PATCH 2/3] Clarify interaction between clamp lighting and terrain --- docs/source/reference/modding/settings/shaders.rst | 4 ++-- files/settings-default.cfg | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/source/reference/modding/settings/shaders.rst b/docs/source/reference/modding/settings/shaders.rst index 8bd152857f..121ecef2b1 100644 --- a/docs/source/reference/modding/settings/shaders.rst +++ b/docs/source/reference/modding/settings/shaders.rst @@ -38,8 +38,8 @@ clamp lighting :Default: True Restrict the amount of lighting that an object can receive to a maximum of (1,1,1). -Only affects objects drawn with shaders (see :ref:`force shaders` option). -Always affects terrain. +Only affects objects drawn with shaders (see :ref:`force shaders` option) as objects drawn without shaders always have clamped lighting. +When disabled, terrain is always drawn with shaders to prevent seams between tiles that are and that aren't. Leaving this option at its default makes the lighting compatible with Morrowind's fixed-function method, but the lighting may appear dull and there might be colour shifts. diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 5f68f055d4..4fc632f497 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -420,7 +420,8 @@ force shaders = false force per pixel lighting = false # Restrict the amount of lighting that an object can receive to a maximum of (1,1,1). -# Only affects objects that render with shaders (see 'force shaders' option). Always affects terrain. +# Only affects objects that render with shaders (see 'force shaders' option). +# When disabled, terrain is always drawn with shaders to prevent seams between tiles that are and that aren't. # Setting this option to 'true' results in fixed-function compatible lighting, but the lighting # may appear 'dull' and there might be color shifts. # Setting this option to 'false' results in more realistic lighting. From 9c959d9698ff05adc493c0e8d57282d0b6d1cf94 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Fri, 16 Feb 2024 01:33:52 +0000 Subject: [PATCH 3/3] Make a long sentence more concise Thanks Bing Chat for doing a mediocre job of this that inspired me to do a competent job of it. --- docs/source/reference/modding/settings/shaders.rst | 2 +- files/settings-default.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/reference/modding/settings/shaders.rst b/docs/source/reference/modding/settings/shaders.rst index 121ecef2b1..22ceb34f44 100644 --- a/docs/source/reference/modding/settings/shaders.rst +++ b/docs/source/reference/modding/settings/shaders.rst @@ -10,7 +10,7 @@ force shaders Force rendering with shaders, even for objects that don't strictly need them. By default, only objects with certain effects, such as bump or normal maps will use shaders. -Many visual enhancements, such as :ref:`enable shadows` and :ref:`reverse z` require shaders to be used for all objects, and so behave as if this setting is true. +With enhancements enabled, such as :ref:`enable shadows` and :ref:`reverse z`, shaders must be used for all objects, as if this setting is true. Typically, one or more of these enhancements will be enabled, and shaders will be needed for everything anyway, meaning toggling this setting will have no effect. Some settings, such as :ref:`clamp lighting` only apply to objects using shaders, so enabling this option may cause slightly different visuals when used at the same time. diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 4fc632f497..15f82760c5 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -407,7 +407,7 @@ console history buffer size = 4096 # Force rendering with shaders, even for objects that don't strictly need them. # By default, only objects with certain effects, such as bump or normal maps will use shaders. -# Many visual enhancements, such as "enable shadows" and "reverse z" require shaders to be used for all objects, and so behave as if this setting is true. +# With enhancements enabled, such as "enable shadows" and "reverse z", shaders must be used for all objects, as if this setting is true. # Some settings, such as "clamp lighting" only apply to objects using shaders, so enabling this option may cause slightly different visuals when used at the same time. # Otherwise, there should not be a visual difference. force shaders = false