Replacing ARB shaders

From The DarkMod Wiki
Revision as of 04:17, 27 May 2019 by Stgatilov (talk | contribs) (Added depthAlpha)
Jump to navigationJump to search

This table should summarize the current state for every ARB shader.

Filename Type Status Replacement Testing instructions & Comments
heatHazeWithDepth.vfp Material OK (2019.05.26) heatHazeWithDepth.?s map test/glass

everything behind glass should be warped as you strafe along it

environment.vfp Ambient OK (2019.05.26) environment.?s map test/glass

fake yellow reflections should be visible on the windows

bumpyEnvironment.vfp Ambient OK (2019.05.27) bumpyEnvironment.?s PD2: All the Way Up / setviewpos 4700 -250 -250 / link

Potions should look properly: see t_useGLSL 0, r_uniformTransforms 0 for reference Be sure to check that fake reflection texture is oriented the same way.

??? Ambient? OK (2019.05.26) oldStage.?s map test/glass, main menu


??? DepthPass OK (2019.05.27) depthAlpha.?s Check any map.

Used for depth prepass, so if it uses incompatible vertex transform, everything would depth-fight like crazy.


List of shader Types:

  • Material: shader filename is referenced in a stage of stock material definition.
Currently, each of these shaders exists in both ARB and GLSL version, and GLSL version is used only if r_forceGlglPrograms is set.
  • FM: shader supplied or overrided by a particular FM --- most likely, specified in material definition.
  • Ambient: shader is loaded directly by C++ code and used during rendering, independent of any light source.
  • Interaction: shader is loaded directly by C++ code and used during rendering, in a light-surface interaction.
  • Postprocessing: shader used for full-screen effects after main rendering is over.


This post explains different modes for testing. In order to set OK Status to a shader, please check that it works properly with following settings:

  • r_useGLSL 1
  • r_forceGlslPrograms 1 (this is more complicated...)
  • r_uniformTransforms 0 and 1 (both cases)

Also set the date when you checked it.


Replacement should specify which files contain the equivalent or superseding code in GLSL. If the replacing code is active only with some settings, write those settings under filename.


Testing instructions must explain how to properly test this shader to ensure that replacement works correctly. Write exact FM/map, coordinates, settings, what to see/expect, etc.