<li><aclass="backlink"title="Click to do a full-text search for this title"href="./ArtReference_Q4Shaders_Guides?action=fullsearch&value=linkto%3A%22ArtReference+Q4Shaders+Guides%22&context=180">ArtReference Q4Shaders Guides</a></li>
<spanclass="anchor"id="line-1"></span><pclass="line874">Texture guides are the shorthanded versions of texture shader entries ONLY. It basically references a template to be used. Use the guides first, since if they’re generally easier to write, and save space in out material files, and nearly impossible to mess up. <spanclass="anchor"id="line-2"></span><spanclass="anchor"id="line-3"></span><pclass="line867"><strong>Here’s an example of a texture guide line:</strong><spanclass="anchor"id="line-4"></span><spanclass="anchor"id="line-5"></span><pre>guide textures/terminal/t1_wall1 generic_shader("terminal/t1_wall1")
<spanclass="anchor"id="line-6"></span></pre><spanclass="anchor"id="line-7"></span><pclass="line867"><strong>"Generic_shader"</strong> is THE basic shader. It will show the basic base texture in game. If you use this shader it will default to solidmetal as the material type. <spanclass="anchor"id="line-8"></span><spanclass="anchor"id="line-9"></span><pclass="line867"><hr/><pclass="line874"><spanclass="anchor"id="line-10"></span><spanclass="anchor"id="line-11"></span><pclass="line867">
<h3id="head-d8b1c82f3f9c142b7495448b7e8639ca847a8684">Lets break the above example down piece by piece:</h3>
<spanclass="anchor"id="line-12"></span><spanclass="anchor"id="line-13"></span><pclass="line867"><strong>Guide</strong>– this lets the game know to reference a guide. This looks for a template in the materials.guide file. <spanclass="anchor"id="line-14"></span><spanclass="anchor"id="line-15"></span><pclass="line867"><strong>Textures/terminal/t1_wall</strong>– is the shader title, so this is what shows up in the editor, and is referenced by the game. <spanclass="anchor"id="line-16"></span><spanclass="anchor"id="line-17"></span><pclass="line867"><strong>Generic_shader</strong> is the type of shader being used. There are a lot of different generic shaders, and depending on what you want the texture to do, this name may change. (i.e. generic_glow, generic_alpha, etc,) There is a listing all of the current generic shaders at the end of this section. <spanclass="anchor"id="line-18"></span><spanclass="anchor"id="line-19"></span><pclass="line867"><strong>(“terminal/t1_wall1”)</strong> is the targa being referenced. <spanclass="anchor"id="line-20"></span><spanclass="anchor"id="line-21"></span><pclass="line874">You’re probably wondering where these templates are, what the guide references, and what they look like and do. <spanclass="anchor"id="line-22"></span><spanclass="anchor"id="line-23"></span><pclass="line867"><spanclass="anchor"id="line-24"></span><pre>guide generic_shader(TextureParm)
<spanclass="anchor"id="line-32"></span></pre><spanclass="anchor"id="line-33"></span><pclass="line862">As you can see, they look exactly like a long hand version of a texture shader, but the targa entries use a <strong><aclass="nonexistent"href="./TextureParm.html">TextureParm</a></strong> entry. Place the shader title between the guide and generic_shader entries. That entry will be what appears in the editor. The <aclass="nonexistent"href="./TextureParm.html">TextureParm</a> in the shader title replaces all of the <aclass="nonexistent"href="./TextureParm.html">TextureParm</a> entries in the body of the shader. So in the terminal/t1_wall1 example above it would do the following: <spanclass="anchor"id="line-34"></span><spanclass="anchor"id="line-35"></span><pre>guide textures/terminal/t1_wall1 generic_shader("terminal/t1_wall1")
<spanclass="anchor"id="line-43"></span></pre><spanclass="anchor"id="line-44"></span><spanclass="anchor"id="line-45"></span><pclass="line874">You can write any number of shader guides, but there’s a point where you should just write it long hand… here’s an example of a shader guide that uses more than one parm: <spanclass="anchor"id="line-46"></span><spanclass="anchor"id="line-47"></span><pre>guide generic_glow(TextureParm, Glowparm)
<spanclass="anchor"id="line-59"></span> green Parm1
<spanclass="anchor"id="line-60"></span> blue Parm2
<spanclass="anchor"id="line-61"></span> }
<spanclass="anchor"id="line-62"></span>}
<spanclass="anchor"id="line-63"></span></pre><spanclass="anchor"id="line-64"></span><spanclass="anchor"id="line-65"></span><pclass="line874">It would be written as a texture guide like this: <spanclass="anchor"id="line-66"></span><spanclass="anchor"id="line-67"></span><pre>guide textures/terminal/t_shaft1 generic_glow("terminal/t_shaft1", "terminal/t_shaft1_g")
<spanclass="anchor"id="line-68"></span></pre><spanclass="anchor"id="line-69"></span><pclass="line874">If you have Multiple Parameters in the shader guide they must be separated by a comma and a space, all parameters need to be in quotes and the whole parameter section must be opened and closed by parentheses. <spanclass="anchor"id="line-70"></span><spanclass="anchor"id="line-71"></span><pclass="line862">The first entry is the <aclass="nonexistent"href="./TextureParm.html">TextureParm</a> while the second is the <aclass="nonexistent"href="./GlowParm.html">GlowParm</a>. If you’re writing a new shader guide or using an existing guide, you should take a look at how they’ve been written, since sometimes the parameters may have been switched or moved. If you decide to write a shader guide try to name it something fairly descriptive, since generic_1 isn’t a good way to keep things in order. Generic_1 tells me nothing of what the shader can do at a glance, but generic_glow does. <spanclass="anchor"id="line-72"></span><spanclass="anchor"id="line-73"></span><pclass="line874">Here’s a listing of the current shader guides: <spanclass="anchor"id="line-74"></span><spanclass="anchor"id="line-75"></span><pclass="line867"><hr/><pclass="line874"><spanclass="anchor"id="line-76"></span><spanclass="anchor"id="line-77"></span><pclass="line867">
<spanclass="anchor"id="line-81"></span>guide generic_shader_mi(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>) –<em>generic shader with an impact image.</em><br/>
<spanclass="anchor"id="line-82"></span>guide generic_typeshader(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, <aclass="nonexistent"href="./TypeParm.html">TypeParm</a> ) –<em>generic shader with one impact surface. You’ll need to enter a type impact name.</em><spanclass="anchor"id="line-83"></span><spanclass="anchor"id="line-84"></span><pclass="line862">guide generic_full_noheight(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>) –<em>a shader that uses no height map</em><spanclass="anchor"id="line-85"></span><spanclass="anchor"id="line-86"></span><pclass="line862">guide generic_shader_heightmap(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, Heightparm) –<em>a shader with a height parameter variable.</em><spanclass="anchor"id="line-87"></span><spanclass="anchor"id="line-88"></span><pclass="line862">guide generic_nonormal(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>) –<em>a shader with no normal map</em><br/>
<spanclass="anchor"id="line-89"></span>guide generic_nonormal_height(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, Heightparm) –<em>a shader with no normal and can change the numerical entry of the height pass.</em><br/>
<spanclass="anchor"id="line-90"></span>guide generic_nonormal_height_type(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, Heightparm, <aclass="nonexistent"href="./TypeParm.html">TypeParm</a> ) –<em>no local map, with a height variable, and can call out an impact type</em><spanclass="anchor"id="line-91"></span><spanclass="anchor"id="line-92"></span><pclass="line862">guide generic_Localvariant(<aclass="nonexistent"href="./LocalParm.html">LocalParm</a>, <aclass="nonexistent"href="./TextureParm.html">TextureParm</a>) –<em>a shader that uses a different local map</em><br/>
<spanclass="anchor"id="line-93"></span>guide generic_Localvariant_mi(<aclass="nonexistent"href="./LocalParm.html">LocalParm</a>, <aclass="nonexistent"href="./TextureParm.html">TextureParm</a>) - <em>local variant with a material image</em><spanclass="anchor"id="line-94"></span><spanclass="anchor"id="line-95"></span><pclass="line862">guide generic_colorvariant(<aclass="nonexistent"href="./VariantParm.html">VariantParm</a>, <aclass="nonexistent"href="./TextureParm.html">TextureParm</a>) –<em>shader that uses a different diffuse variant</em><br/>
<spanclass="anchor"id="line-96"></span>guide generic_colorvariant_mi(<aclass="nonexistent"href="./VariantParm.html">VariantParm</a>, <aclass="nonexistent"href="./TextureParm.html">TextureParm</a>) –<em>generic shader using a different diffuse with a material image</em><spanclass="anchor"id="line-97"></span><spanclass="anchor"id="line-98"></span><pclass="line867">
<spanclass="anchor"id="line-101"></span>guide generic_alpha_mi(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>) –<em>hard edged alpha with a material image</em><br/>
<spanclass="anchor"id="line-102"></span>guide generic_alpha_type(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, <aclass="nonexistent"href="./TypeParm.html">TypeParm</a>) –<em>hard edged alpha with an impact type.</em><spanclass="anchor"id="line-103"></span><spanclass="anchor"id="line-104"></span><pclass="line862">guide generic_shader2sidedalpha_mi(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>) –<em>2 sided hard edged alpha with material image</em><br/>
<spanclass="anchor"id="line-105"></span>guide generic_shader2sidedalpha(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>) –<em>2 sided hard edged alpha</em><spanclass="anchor"id="line-106"></span><spanclass="anchor"id="line-107"></span><pclass="line862">guide generic_alpha_lv(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, <aclass="nonexistent"href="./LocalParm.html">LocalParm</a>) –<em>hard edged alpha local variable</em><br/>
<spanclass="anchor"id="line-108"></span>guide generic_shader2sidedalpha_lv(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, <aclass="nonexistent"href="./LocalParm.html">LocalParm</a>) –<em>2 sided hard edged alpha with a local variant.</em><spanclass="anchor"id="line-109"></span><spanclass="anchor"id="line-110"></span><pclass="line862">guide generic_alphaNoShadow2S(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>) –<em>hard edged alpha, no shadow, 2 sided.</em><spanclass="anchor"id="line-111"></span><spanclass="anchor"id="line-112"></span><pclass="line867">
<spanclass="anchor"id="line-113"></span><spanclass="anchor"id="line-114"></span><pclass="line862">guide generic_glow(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, Glowparm) –<em>a shader with a glow pass</em><br/>
<spanclass="anchor"id="line-115"></span>guide generic_glow_mi(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, Glowparm) –<em>glow pass with a material image</em><spanclass="anchor"id="line-116"></span><spanclass="anchor"id="line-117"></span><pclass="line862">guide generic_alphaglow(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, Glowparm) –<em>hard edged alpha with a glow pass</em><spanclass="anchor"id="line-118"></span><spanclass="anchor"id="line-119"></span><pclass="line862">guide generic_glowflicker(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, Glowparm, Flickerparm) –<em>glow pass with a flicker table</em><br/>
<spanclass="anchor"id="line-120"></span>guide generic_glowflicker2(<aclass="nonexistent"href="./TextureParm.html">TextureParm</a>, Glowparm1, Flickerparm1, Glowparm2, Flickerparm2) –<em>2 glow passes, 2 tables (should probably write it long hand)</em><spanclass="anchor"id="line-121"></span><spanclass="anchor"id="bottom"></span></div><pid="pageinfo"class="info"lang="en"dir="ltr">ArtReference Q4Shaders Guides (last edited 2006-01-22 23:56:06 by <spantitle="MattBreit @ 24-241-228-159.dhcp.mdsn.wi.charter.com[24.241.228.159]"><aclass="nonexistent"href="./MattBreit.html"title="MattBreit @ 24-241-228-159.dhcp.mdsn.wi.charter.com[24.241.228.159]">MattBreit</a></span>)</p>
<li><ahref="http://moinmoin.wikiwikiweb.de/">MoinMoin Powered</a></li><li><ahref="http://www.python.org/">Python Powered</a></li><li><ahref="http://validator.w3.org/check?uri=referer">Valid HTML 4.01</a></li>