Page 1 of 1
shader error
Posted: Wed Feb 17, 2010 4:00 pm
by Killerdude
I was adding a light beam as described in the general tutorial. Except for file names and paths the shader is identical to the tut. When I test it, console is spammed with shader beamfade.tga incorrectly uses rgbgen lightinggrid or lighting spherical was rgbgen vertex intended? I have double checked that the files are saved as 24bit tga files.
Does anyone have a solution for this?
Posted: Wed Feb 17, 2010 6:58 pm
by neillomax
32bit ?
Posted: Wed Feb 17, 2010 7:45 pm
by Killerdude
The tut said 24 bit. I just tried 32 bit and still no beam.
I tried opening the shader with q3ase.exe and it chocked on line 10 with expected shader key word or '}' found qer_keyword. It also chocked on line 37 with expected stage key word or '}' found nextbundle. I am not sure if q3ase can be trusted for troubleshooting.
Here is my shader ...
Code: Select all
textures/midnightlaunch/beamfade
// this is the name of the texture, which will appear in MOHradiant and the directory, where it can be found.
{
qer_editorimage textures/midnightlaunch/beamfade.tga
// the picture that shall be shown in the MOHradiant textureviewer
qer_keyword utility
qer_trans .4
// the amount of transparency in mohradiant. It has nothing to do with the transparency in MOHAA game.
surfaceparm nolightmap
surfaceparm nonsolid
surfaceparm trans
cull none
sort additive
{
map textures/midnightlaunch/beamdust.tga
blendFunc add
tcMod scroll 0.05 0
// the speed of texture scrolling in x and y direction
tcMod scale 1 1
// size of applied texture higher value is a smaller texture. Smaller textures scroll proportionally faster
nextbundle
map textures/midnightlaunch/beamfade.tga
}
}
I am gonna look for a map with a beam and maybe borrow it

Posted: Sat Feb 20, 2010 11:14 am
by Rookie One.pl
Keep in mind that 24-bit TGA files do not have an alpha channel (i.e. do not support transparency), while 32-bit ones do have it.
These messages simply say that your shader does not tell the engine how it should calculate lighting for surfaces that use it. Try adding "rgbgen vertex" after "map textures/midnightlaunch/beamdust.tga".
Actually, which rgbgen function should be used depends on the effect you want to achieve, but vertex is a safe choice, because it will also cause the beam to be coloured with the light source's colour.