idea - global base shader


(pazur) #1

would it be possible to have a kind of global base shader from which all shaders iherit parameters just like with q3map_baseshader? i imagine this like having a path in worldspawn to this shader…

im using a mixture of original wolf shaders and my own shaders. now its no problem to change my own shaders but i would have to replace all wolf shaders by my own. in my map i would like to give all shaders “surfaceparm nomarks” because wolf fog is causing ugly blend effects on marks. i also imagine having a global “nopicmip”.

maybe i missed somethig and this already exists. what do you think ydnar? or would others also like to see such a feature?


(U.S.S. Speed) #2

Don’t think it could be possible without engine coding, since the q3map shader code are only used by the compiler.

While the other part of the shader are used by the engine.


(pazur) #3

yea, true. wolf “reads” the original shader file to determine the surfaceparms… some way to override this would be cool. the next map i will make will not use any original shaders :confused:


(Emon) #4

You could write a little program in C++ or VB or something that adds/removes lines to shaders.


(pazur) #5

im no real programmer. i know a bit VB. before i get into writing a prog to do that i think its quicker to use the find-replace gtk function on the shaders that i used for outdoor


(U.S.S. Speed) #6

CTRL-C and CTRL-V are your friends.


(digibob) #7

Surfaceparms are actually encoded into the bsp, they aren’t read from the shaders by the engine.


(pazur) #8

oh. if they are encoded into bsp then theoretical this would be possible with surfaceparms but not with all keywords a shader can have as i undersand it now.


(wudan) #9

CloneShader is used for fur, but I’ve used it to copy attributes of other shaders, is this an acceptable use, because it would give an almost CSS like quality to shader writing.