Log in

View Full Version : [TEC] searchlights disappear


vickers03
05-17-09, 04:50 AM
there are some searchlight effects that disappear
when the ship with the lights is out of view.
i think the problem lies in the searchlights shader
code, maybe someone who knows shader language could take look:hmmm:

Nisgeis
05-17-09, 04:47 PM
There are a number of effects that disappear if the point source of the effect is out of frustum. I think, but I haven't chacked, that this is the case with the search lights, e.g. when the searchlight is off camera, the searchlight beam is not drawn. This is also noticable in the unmodified smokestacks. Smoke disappears and is not emitted when the funnel is off camera.

vickers03
05-17-09, 04:59 PM
all things listed in particles.dat and searchlights.dat
are no problem, they can be changed to not use
frustum test.
you see in the pic above the three effects the searchlight is composed of,
two of them are in the searchlights.dat,
the third, which disappears, maybe a shader effect
as there is a searchlight ps and vs in data/shaders.

Nisgeis
05-17-09, 05:18 PM
Not everything in particles.dat can be changed to ignore frustum, it depends on if it's a fast particle effect or not. What effect is it you say is disappearing? The water reflections? Don't the lightbeams also disappear when the point source is out of frustum?

vickers03
05-17-09, 06:19 PM
please take a look at the picture in #1 post,
everything explained there

Nisgeis
05-18-09, 04:24 PM
The search light pixel shader appears to only affect the shading of the search light beam, the light spill cast on the surface is probably drawn in the engine and passed to the water surface shader, so probably not something that can be modded that way. The light spill effect will disappear when the light beam object is off screen, so I would theorise that lengthening the beam object and adjusting the alpha channel of raza2.dds would allow the beam to be on screen, but invisible and allow the spill effect to be drawn as well.

vickers03
05-18-09, 04:56 PM
interesting, thanks