File: overview.rst

package info (click to toggle)
openmw 0.49.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,992 kB
  • sloc: cpp: 372,479; xml: 2,149; sh: 1,403; python: 797; makefile: 26
file content (52 lines) | stat: -rw-r--r-- 1,994 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#####################################
Overview of Post Processing Framework
#####################################

Overview
========

OpenMW supports a moddable post process framework for creating and
controlling screenspace effects. This is integrated into OpenMW's Lua API, see
`reference <../lua-scripting/openmw_postprocessing.html>`_ for details.

Basic concepts
==============

Pass
    Describes a single shader invocation pass. Currently only pixel (also known
    as fragment) shaders are supported.

Technique/Shader
    An ordered list of passes, techniques will encompass a single effect like
    bloom or SSAO. Technique is interchangeable with shader.

Installing and Activating
=========================

Shaders are managed through the virtual file system, simply install the associated
archive or folder as described in :ref:`mod-install<install>`. Shaders must be
in the `Shaders` directory to be discoverable. A shader can be activated in one
of two ways:

1. Adding the shaders filename (without its extension) to the end of the
   :ref:`chain` list in ``settings.cfg``.
2. Using the in game post processor HUD, which can be activated with the ``F2``
   key by default. This is the recommended method as manual editing can be error
   prone.

Localization
============

Output text (e.g. shader description) can use the ``#{ContextName:Key}`` tags.
In this case OpenMW replaces it for value of ``Key`` key from the
``Data Files\L10n\ContextName\used_language.yaml`` file.

Hot Reloading
=============

It is possible to modify a shader without restarting OpenMW, hot reloading
can be enabled by using the lua command `debug.setShaderHotReloadEnabled(true)`.
Whenever a file is modified and saved, the shader will automatically reload in game.
This allows shaders to be written in a text editor you are comfortable with. 
The only restriction is that the VFS is not aware of new files or changes in non-shader files, 
so new shaders and localization strings can not be used.