shader error

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Killerdude
Sergeant Major
Posts: 110
Joined: Fri May 11, 2007 12:16 am

shader error

Post 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?
[Rome wasn't mapped in a day!]
neillomax
Lieutenant General
Posts: 880
Joined: Thu Jun 23, 2005 6:57 am

Post by neillomax »

32bit ?
Killerdude
Sergeant Major
Posts: 110
Joined: Fri May 11, 2007 12:16 am

Post 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 :roll:
[Rome wasn't mapped in a day!]
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post 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.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Post Reply