If statements in Shaders?
Posted: Sun Sep 28, 2003 9:39 pm
Ok so i was messin around with another game based on Q3 and i noticed there were if statements in the shaders. Here is an example of one of the ones i found.
I havent actually played the game yet but i was thinkin this changes the crosshairs when the weapon is firing. Has anyone had any experience with this or if it can be applied to mohaa. I hope this hasnt been asked but i did a couple of searches and didnt come up with anything.
Ok so i was messin around with it some more and I found the same if statements refering to door textures. It appears that there is a light bar on the door that changes when the door is either open or closed as well as open or locked... Anythoughts or insights on this would be great.
Code: Select all
weapons/compressionscreen-locked
{
//nomipmaps
{
clampmap models/weapons/comp_rifle/viewmodel/cscreen-base.tga
}
if mtex
{
map models/weapons/comp_rifle/viewmodel/cscreen-base.tga
blendFunc GL_SRC_ALPHA GL_ONE
nextbundle
map models/weapons/comp_rifle/viewmodel/cscreen-scroll.tga
tcMod scroll 0.2 0
}
endif
{
clampmap models/weapons/comp_rifle/viewmodel/cscreen-reticle2.tga
blendfunc add
rgbGen wave sin 1.0 0.55 1.0 3.25
}
}Ok so i was messin around with it some more and I found the same if statements refering to door textures. It appears that there is a light bar on the door that changes when the door is either open or closed as well as open or locked... Anythoughts or insights on this would be great.