SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 05-17-09, 04:50 AM   #1
vickers03
Pooped from posting
 
Join Date: May 2007
Location: germany
Posts: 999
Downloads: 712
Uploads: 37


Default [TEC] searchlights disappear

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

Last edited by vickers03; 05-22-09 at 04:11 PM.
vickers03 is offline   Reply With Quote
Old 05-17-09, 04:47 PM   #2
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

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.
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Old 05-17-09, 04:59 PM   #3
vickers03
Pooped from posting
 
Join Date: May 2007
Location: germany
Posts: 999
Downloads: 712
Uploads: 37


Default

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.
vickers03 is offline   Reply With Quote
Old 05-17-09, 05:18 PM   #4
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

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?
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Old 05-17-09, 06:19 PM   #5
vickers03
Pooped from posting
 
Join Date: May 2007
Location: germany
Posts: 999
Downloads: 712
Uploads: 37


Default

please take a look at the picture in #1 post,
everything explained there
vickers03 is offline   Reply With Quote
Old 05-18-09, 04:24 PM   #6
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

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.
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Old 05-18-09, 04:56 PM   #7
vickers03
Pooped from posting
 
Join Date: May 2007
Location: germany
Posts: 999
Downloads: 712
Uploads: 37


Default

interesting, thanks
vickers03 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.