A question about shaders in general.
Right now I am able to create a shader such that, after I compile my map I can see the shader as it is supposed to be seen. But when I open GTK and load the shader, all I get is a black and red checkered texture that is very very small. Had I made the shader correctly, or imported it correctly, it would load as a white box saying "sky" on it... or it would load as a 2D image of that shader (such as when you load the shader file for water shader that moves like waves).

When a shader file loads as the black and red checkered texture, what did I do wrong and how do I fix it?

The basic principle of shaders is the preference of replacement. By that I mean they will replace a basic texture of the same name. This works as well for the textures of models or effects. This means that if your shader entry is named exactly the same as a physical texture in the textures folder, the shader will replace the basic texture, and the basic texture won't exist anymore, in a sense.

If the shader entry is a novel name, then it will be effectively a new texture, and it requires an editorimage attribute in the shader code for it to properly be shown in Radiant, as a physical texture by that name doesn't exist. However, the editorimage won't be necessary for the game itself. Furthermore, nothing prevents from giving a physical texture name entry (replacement shader) a "conflicting" editorimage, although it's not necessary, but sometimes convenient.

If you fail to provide an editorimage for a novel shader entry name, or enter a nonexisting editorimage, Radiant won't be able to locate any image for the shader to be displayed in the editor. This will result in that shader not found error texture. For example some Raven editorimages are missing, I think.

*** - This change makes the shader appear properly as "ocean" under the "atlantis" texture set. What you had before just replaces "water_1" in the "common" texture set, and might have caused problems.*** - This change makes the water look like your image atlantis/ocean instead of the previous common/water_1.

Last edited by wedge2211; 09-14-2005 at 08:44 PM.
Reason: made it preserve proper tabs and added a bit of explanation

If there is no "textures/atlantis/ocean" physical texture, then you obviously cannot enter that as an editorimage. Otherwise the shader you started with looks just fine. If it doesn't work, it's either because you haven't entered your shader file's name in the shaderlist or your Radiant and/or game installation is screwed.

Might be the latter case, because you certainly are having far more problems with basic shaders than anybody I have seen before.

when i use the shader i started with, and take a copy of textures/common/water_1 and rename it and move it to textures/atlantis/ocean, then when i load gtk the shader appears as water rather than a red and black checkered square. but it seems silly thet that is what I have to do to view an altered shader in radiant.

When you mention textures/whatever/whatever INSIDE the shader code (inside the outermost set of { }'s), then you are referring to an image file. It must exist on your hard drive or in a pk3 as a jpg, tga, or png file. The heading at the top of the shader file is the name of the SHADER, all other textures/... references are image stages.