[Gtkradiant] [Bug 102] New: Documentation of targetShaderName and targetShaderNewName

gtkradiant@zerowing.idsoftware.com gtkradiant@zerowing.idsoftware.com
Fri, 22 Jun 2001 03:50:58 -0500


           Summary: Documentation of targetShaderName and
           Product: GtkRadiant
           Version: 1.1-TA
          Platform: All
        OS/Version: All
            Status: NEW
 Status Whiteboard:
          Severity: enhancement
          Priority: P2
         Component: web
        AssignedTo: ttimo@idsoftware.com
        ReportedBy: jbaxter@lemur.stanford.edu

Cf. this thread: http://www.quake3world.com/ubb/Forum6/HTML/014812.html#9

The targetShaderName and targetShaderNewName keys can be used with any entity 
that supports the target key (the entity instance does not actually have to use 
the target key for these new keys to work).  If both are defined, then when the 
entity decides to activate its targets, all shaders/textures in the map that 
were originally the same name as the targetShaderName value, will be changed to 
the targetShaderNewName value.

For example this would make it look like the red light shader is "turning on":

"targetShaderName" "textures/proto2/redlight_off"
"targetShaderNewName" "textures/proto2/redlight_on"

And this would turn it back off:

"targetShaderName" "textures/proto2/redlight_off"
"targetShaderNewName" "textures/proto2/redlight_off"

Note that the ORIGINAL shader name is used in both instances, not whatever it 
happens to be currently.  Also, of course, this will happen globally.  If the 
mapper wanted to affect only a certain set of red lights, he/she would need to 
make a unique shader name to be used with that set.

The code that supports these keys is in G_UseTargets in g_utils.c.

These keys have not been documented anywhere; it would be good to stick info 
about them in the Radiant manual and in entities.def.