From c24359215c38764dffe1cbdcb11baf1b074b4e08 Mon Sep 17 00:00:00 2001 From: Garux Date: Sun, 29 Dec 2024 05:01:48 +0500 Subject: [PATCH] shader manual: crosslink, improve --- docs/shaderManual/alpha-channels.html | 2 +- docs/shaderManual/contents.html | 288 +++++++++--------- docs/shaderManual/decal-tricks.html | 4 +- docs/shaderManual/foghull.html | 6 +- docs/shaderManual/fur.html | 2 +- docs/shaderManual/general-directives.html | 34 +-- docs/shaderManual/light-emitting-shaders.html | 12 +- docs/shaderManual/lightstyles.html | 6 +- docs/shaderManual/preface.html | 1 + .../shaderManual/q3map-global-directives.html | 146 +++++---- .../q3map-surface-parameter-directives.html | 38 +-- .../quake-editor-radiant-directives.html | 6 +- docs/shaderManual/shader-concepts.html | 17 +- docs/shaderManual/stage-directives.html | 56 ++-- .../terrain-and-alphamod-blends.html | 26 +- docs/shaderManual/texture-creation.html | 11 +- radiant/gtkdlgs.cpp | 1 - 17 files changed, 335 insertions(+), 321 deletions(-) diff --git a/docs/shaderManual/alpha-channels.html b/docs/shaderManual/alpha-channels.html index b736290bb..661fff8c0 100644 --- a/docs/shaderManual/alpha-channels.html +++ b/docs/shaderManual/alpha-channels.html @@ -91,7 +91,7 @@

Alpha Channels

Start with a TGA file image. In this case, a pentagram on a plain white field (figure 1A). The color of the field surrrounding the image to be merged is not relevant to this process (although having a hard-edged break between the image to be isolated and the field makes the mask making process easier). Make an alpha channel. The area of the image to be merged with another image is masked off in white. The area to be masked out (notused) is pure black (figure 1B). The image to be merged into is greenfloor.tga (figure 1C).

-

Make a qer_editorimage of greenfloor.tga. This is placed in the frame buffer as the map image for the texture. By using GL_SRC_ALPHA as the source part of the blend equation, the shader adds in only the non-black parts of the pentagram. Using GL_MINUS_ONE_SRC_ALPHA, the shader inverts the pentagram's alpha channel and adds in only the non-black parts of the green floor.

+

Make a qer_editorImage of greenfloor.tga. This is placed in the frame buffer as the map image for the texture. By using GL_SRC_ALPHA as the source part of the blend equation, the shader adds in only the non-black parts of the pentagram. Using GL_MINUS_ONE_SRC_ALPHA, the shader inverts the pentagram's alpha channel and adds in only the non-black parts of the green floor.

In a like manner, the alpha channel can be used to blend the textures more evenly. A simple experiment involves using a linear gradiant in the alpha channel (white to black) and merging two textures so they appear to cross fade into each other.

diff --git a/docs/shaderManual/contents.html b/docs/shaderManual/contents.html index 9b4aabf47..2f2f6d89a 100644 --- a/docs/shaderManual/contents.html +++ b/docs/shaderManual/contents.html @@ -57,171 +57,171 @@

Contents