Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Valathil on July 09, 2011, 02:17:11 pm

Title: RELEASE: New beam lighting OPEN BETA; New Version 07/13/11!!
Post by: Valathil on July 09, 2011, 02:17:11 pm
Ok here it is people. Take it, try it out, report anything suspicious.

Code: [Select]
Index: code/weapon/beam.cpp
===================================================================
--- code/weapon/beam.cpp (Revision 7338)
+++ code/weapon/beam.cpp (Arbeitskopie)
@@ -986,6 +986,9 @@
 // mprintf(("killing beam becase it isn't ok to be fireing\n"));
  beam_delete(moveup);
  } else {
+ // add a muzzle light for the shooter
+ beam_add_light(moveup, OBJ_INDEX(moveup->objp), 0, NULL);
+
  // if the warming up timestamp has expired, start firing
  if(timestamp_elapsed(moveup->warmup_stamp)){
  // start firing
@@ -993,9 +996,6 @@
 // mprintf(("killing beam becase it shouldn't have started fireing yet\n"));
  beam_delete(moveup);
  }
-
- // add a muzzle light for the shooter
- beam_add_light(moveup, OBJ_INDEX(moveup->objp), 0, NULL);
  }
  }
 
@@ -1013,6 +1013,8 @@
 // mprintf(("killing beam becase it isn't ok to fire\n"));
  beam_delete(moveup);
  } else {
+ // add a muzzle light for the shooter
+ beam_add_light(moveup, OBJ_INDEX(moveup->objp), 0, NULL);
  // if we're done warming down, the beam is finished
  if(timestamp_elapsed(moveup->warmdown_stamp)){
 // mprintf(("euthaniseing beam\n"));
@@ -1544,7 +1546,10 @@
  bwi = &wip->b_info;
 
  // some noise
- noise = frand_range(1.0f - bwi->sections[0].flicker, 1.0f + bwi->sections[0].flicker);
+ if( bm->warmup_stamp<0&&bm->warmdown_stamp<0 )  // disable noise when warming up or down
+ noise = frand_range(1.0f - bwi->sections[0].flicker, 1.0f + bwi->sections[0].flicker);
+ else
+ noise = 1.0f;
 
  // widest part of the beam
  float light_rad = beam_get_widest(bm) * blight * noise;
@@ -1566,11 +1571,27 @@
  float fg = (float)wip->laser_color_1.green / 255.0f;
  float fb = (float)wip->laser_color_1.blue / 255.0f;
 
+ float pct = 0.0f;
+
+ if (bm->warmup_stamp != -1) { //calculate muzzle light intensity
+ // get warmup pct
+ pct = BEAM_WARMUP_PCT(bm);
+ } else
+ // if the beam is warming down
+ if (bm->warmdown_stamp != -1) {
+ // get warmup pct
+ pct = MAX(1.0f - BEAM_WARMDOWN_PCT(bm)*1.3f,0.0f);
+ }
+ // otherwise the beam is really firing
+ else {
+ pct = 1.0f;
+ }
  // add a unique light
  // noise *= 0.1f; // a little less noise here, since we want the beam to generally cast a bright light
- light_add_point_unique(&near_pt, light_rad * 0.0001f, light_rad, 1.0f, fr, fg, fb, OBJ_INDEX(objp));
+ light_add_point_unique(&near_pt, light_rad * 0.0001f, light_rad, pct, fr, fg, fb, OBJ_INDEX(objp));
 }
 
+extern int Use_GLSL;
 // call to add a light source to a large object
 void beam_add_light_large(beam *bm, object *objp, vec3d *pt0, vec3d *pt1)
 {
@@ -1609,7 +1630,25 @@
 
  // add a unique light
  noise *= 0.1f; // a little less noise here, since we want the beam to generally cast a bright light
- light_add_tube(pt0, pt1, 1.0f, light_rad, 1.0f * noise, fr, fg, fb, OBJ_INDEX(objp));
+
+ vec3d near_pt, a, b;
+ float dist;
+
+ vm_vec_sub(&a, pt1, pt0);
+ vm_vec_normalize_quick(&a);
+ vm_vec_dist_to_line(&objp->pos, pt0, pt1, &near_pt, &dist); // Calculate nearest point for fallback fake tube pointlight
+ vm_vec_scale_add(&b, &near_pt, &a, bwi->beam_muzzle_radius * (-3.0f)); // Valathil: Move the light away from the ship somewhat
+
+ if(dist> light_rad + objp->radius ){
+ return; // Too far away
+ }
+
+ if( Use_GLSL > 1)
+ light_add_tube(pt0, pt1, 1.0f, light_rad, 1.0f * noise, fr, fg, fb, OBJ_INDEX(objp));
+ else
+ light_add_tube(pt0, &b, 1.0f, light_rad, 1.0f * noise, fr, fg, fb, OBJ_INDEX(objp));
+
+
 }
 
 // mark an object as being lit
@@ -1675,35 +1714,15 @@
 
  // from the beam passing by
  case 1:
- // object type
- switch(Objects[l->objnum].type){
- case OBJ_SHIP:
- Assert(Objects[l->objnum].instance >= 0);
-
- // large ships
- if(Ship_info[Ships[Objects[l->objnum].instance].ship_info_index].flags & (SIF_BIG_SHIP | SIF_HUGE_SHIP)){
- beam_add_light_large(l->bm, &Objects[l->objnum], &l->bm->last_start, &l->bm->last_shot);
- }
- // small ships
- else {
- beam_add_light_small(l->bm, &Objects[l->objnum]);
- }
- break;
-
- // asteroids get small lights
- case OBJ_ASTEROID:
- beam_add_light_small(l->bm, &Objects[l->objnum]);
- break;
-
- // debris gets small lights
- case OBJ_DEBRIS:
- beam_add_light_small(l->bm, &Objects[l->objnum]);
- break;
- }
+ Assert(Objects[l->objnum].instance >= 0);
+ beam_add_light_large(l->bm, &Objects[l->objnum], &l->bm->last_start, &l->bm->last_shot); //Valathil: Everyone gets tube lights now WOHOO
  break;
 
  // from a collision
  case 2:
+ // Valathil: Dont render impact lights for shaders, handled by tube lighting
+ if( Use_GLSL > 1)
+ break;
  // a few meters from the collision point
  vm_vec_sub(&dir, &l->bm->last_start, &l->c_point);
  vm_vec_normalize_quick(&dir);
Index: code/graphics/gropengllight.cpp
===================================================================
--- code/graphics/gropengllight.cpp (Revision 7338)
+++ code/graphics/gropengllight.cpp (Arbeitskopie)
@@ -91,7 +91,7 @@
  switch (FSLight->type) {
  case LT_POINT: {
  // this crap still needs work...
- GLLight->ConstantAtten = 0.0f;
+ GLLight->ConstantAtten = 1.0f;
  GLLight->LinearAtten = (1.0f / MAX(FSLight->rada, FSLight->radb)) * 1.25f;
 
  GLLight->Specular[0] *= static_point_factor;
@@ -102,15 +102,36 @@
  }
 
  case LT_TUBE: {
+
+ GLLight->ConstantAtten = 1.0f;
+ GLLight->LinearAtten = (1.0f / MAX(FSLight->rada, FSLight->radb)) * 1.25f;
+ GLLight->QuadraticAtten = (1.0f / MAX(FSLight->rada_squared, FSLight->radb_squared)) * 1.25f;
+
  GLLight->Specular[0] *= static_tube_factor;
  GLLight->Specular[1] *= static_tube_factor;
  GLLight->Specular[2] *= static_tube_factor;
 
- GLLight->SpotDir[0] = FSLight->vec2.xyz.x * 1.5f;
- GLLight->SpotDir[1] = FSLight->vec2.xyz.y * 1.5f;
- GLLight->SpotDir[2] = FSLight->vec2.xyz.z * 1.5f;
- GLLight->SpotCutOff = 90.0f;
+ GLLight->Position[0] = FSLight->vec2.xyz.x; // Valathil: Use endpoint of tube as light position
+ GLLight->Position[1] = FSLight->vec2.xyz.y;
+ GLLight->Position[2] = FSLight->vec2.xyz.z;
+ GLLight->Position[3] = 1.0f;
 
+ if( Use_GLSL > 1) {
+
+ // Valathil: When using shaders pass the beam direction (not normalized IMPORTANT for calculation of tube)
+ vec3d a;
+ vm_vec_sub(&a, &FSLight->vec2, &FSLight->vec);
+ GLLight->SpotDir[0] = a.xyz.x;
+ GLLight->SpotDir[1] = a.xyz.y;
+ GLLight->SpotDir[2] = a.xyz.z;
+ GLLight->SpotCutOff = 90.0f; // Valathil: So shader dectects tube light
+ }
+ else {
+ GLLight->SpotDir[0] = 1.0f; // Valathil: When not using shaders pass a fake spotdir
+ GLLight->SpotDir[1] = 0.0f;
+ GLLight->SpotDir[2] = 0.0f;
+ GLLight->SpotCutOff = 180.0f; //Valathil: Should be a point light not a spot; using tube only for the light sorting
+ }
  break;
  }
 

main-f.sdr
Code: [Select]
#ifdef FLAG_LIGHT
uniform int n_lights;
#endif

#ifdef FLAG_DIFFUSE_MAP
uniform sampler2D sBasemap;
#endif

#ifdef FLAG_GLOW_MAP
uniform sampler2D sGlowmap;
#endif

#ifdef FLAG_SPEC_MAP
uniform sampler2D sSpecmap;
#endif

#ifdef FLAG_ENV_MAP
uniform samplerCube sEnvmap;
uniform bool alpha_spec;
varying vec3 envReflect;
#endif

#ifdef FLAG_NORMAL_MAP
uniform sampler2D sNormalmap;
varying mat3 tbnMatrix;
#endif

#ifdef FLAG_FOG
varying float fogDist;
#endif

varying vec4 position;
varying vec3 lNormal;

#if SHADER_MODEL == 2
  #define MAX_LIGHTS 2
#else
  #define MAX_LIGHTS 8
#endif

#define SPEC_INTENSITY_POINT 5.3 // Point light
#define SPEC_INTENSITY_DIRECTIONAL 3.0 // Directional light
#define SPECULAR_FACTOR 1.75
#define SPECULAR_ALPHA 0.1
#define SPEC_FACTOR_NO_SPEC_MAP 0.6
#define ENV_ALPHA_FACTOR 0.3
#define GLOW_MAP_INTENSITY 1.5
#define AMBIENT_LIGHT_BOOST 1.0

void main()
{
vec3 eyeDir = vec3(normalize(-position).xyz); // Camera is at (0,0,0) in ModelView space
vec4 lightAmbientDiffuse = vec4(0.0, 0.0, 0.0, 1.0);
vec4 lightDiffuse = vec4(0.0, 0.0, 0.0, 1.0);
vec4 lightAmbient = vec4(0.0, 0.0, 0.0, 1.0);
vec4 lightSpecular = vec4(0.0, 0.0, 0.0, 1.0);
vec2 texCoord = gl_TexCoord[0].xy;

 #ifdef FLAG_LIGHT
  #ifdef FLAG_NORMAL_MAP
// Normal map - convert from DXT5nm
vec3 normal;

normal.rg = (texture2D(sNormalmap, texCoord).ag * 2.0) - 1.0;
  #ifdef FLAG_ENV_MAP
vec3 envOffset = vec3(0.0);
envOffset.xy = normal.xy;
  #endif
normal.b = sqrt(1.0 - dot(normal.rg, normal.rg));
normal = tbnMatrix * normal;
float norm = length(normal);
if( length(normal) > 0.0)  // fix broken normal maps
normal /= norm ;
else
normal = tbnMatrix * vec3(0.0, 0.0, 1.0);
  #else
vec3 normal = lNormal;
  #endif

vec3 lightDir;
lightAmbient = gl_FrontMaterial.emission + (gl_LightModel.ambient * gl_FrontMaterial.ambient);
float dist;
#pragma optionNV unroll all
for (int i = 0; i < MAX_LIGHTS; ++i) {
  #if SHADER_MODEL > 2
if (i > n_lights)
break;
  #endif
float specularIntensity = 1.0;
float diffuseIntensity = 1.0;
float attenuation = 1.0;
float tubeEffect = 0.0;
float NdotHV = 0.0;
vec3 beamDir = vec3(0.0);
// Attenuation and light direction
  #if SHADER_MODEL > 2
if (gl_LightSource[i].position.w == 1.0) {
  #else
if (gl_LightSource[i].position.w == 1.0 && i != 0) {
  #endif
// Positional light source
dist = distance(gl_LightSource[i].position.xyz, position.xyz);

lightDir = (gl_LightSource[i].position.xyz - position.xyz);

specularIntensity = SPEC_INTENSITY_POINT;

  #if SHADER_MODEL > 2
if (gl_LightSource[i].spotCutoff < 91.0) {  // Tube light
vec3 nearest = gl_LightSource[i].position.xyz;
float beamlength = length(gl_LightSource[i].spotDirection);
beamDir = normalize(gl_LightSource[i].spotDirection);
float neardist = dot(position.xyz - gl_LightSource[i].position.xyz , beamDir); // Get nearest point on line
if(neardist < 0.0)
{
nearest = gl_LightSource[i].position.xyz + beamDir * (neardist); // Move back from the endpoint of the beam along the beam by the distance we calculated
lightDir = nearest - position.xyz;
dist = length(lightDir);
}
specularIntensity *= 10.0; // Stupid FS scales back the Tube lights for NO REASON
diffuseIntensity *= 5.0;
}
  #endif
attenuation = 1.0 / (gl_LightSource[i].constantAttenuation + (gl_LightSource[i].linearAttenuation * dist) + (gl_LightSource[i].quadraticAttenuation * dist * dist));

} else {
// Directional light source
lightDir = normalize(gl_LightSource[i].position.xyz);
specularIntensity = SPEC_INTENSITY_DIRECTIONAL; // Directional light
}

// Ambient and Diffuse
lightAmbient += (gl_FrontLightProduct[i].ambient * attenuation);
lightDiffuse += (gl_FrontLightProduct[i].diffuse * (max(dot(normal, normalize(lightDir)), 0.0)) * attenuation) * diffuseIntensity;
lightDiffuse += (gl_FrontLightProduct[i].diffuse * (max(dot(normal, -beamDir), 0.0)) * attenuation) * diffuseIntensity; // 2nd diffuse pass to compensate for tube light direction
// Specular
NdotHV = clamp(dot(normal, normalize(eyeDir + normalize(lightDir))), 0.0, 1.0);
lightSpecular += ((gl_FrontLightProduct[i].specular * pow(NdotHV, gl_FrontMaterial.shininess)) * attenuation) * specularIntensity;
}

lightAmbientDiffuse = lightAmbient + lightDiffuse;
 #else
lightAmbientDiffuse = gl_Color;
lightSpecular = gl_SecondaryColor;
 #endif

 #ifdef FLAG_DIFFUSE_MAP
 // Base color
vec4 baseColor = texture2D(sBasemap, texCoord);
 #else
vec4 baseColor = gl_Color;
 #endif
 
vec4 fragmentColor;
fragmentColor.rgb = baseColor.rgb * max(lightAmbientDiffuse.rgb * AMBIENT_LIGHT_BOOST, gl_LightModel.ambient.rgb - 0.425);
fragmentColor.a = baseColor.a;

 #ifdef FLAG_SPEC_MAP
 // Spec color
fragmentColor.rgb += lightSpecular.rgb * (texture2D(sSpecmap, texCoord).rgb * SPECULAR_FACTOR);
fragmentColor.a += (dot(lightSpecular.a, lightSpecular.a) * SPECULAR_ALPHA);
 #else
fragmentColor.rgb += lightSpecular.rgb * (baseColor.rgb * SPEC_FACTOR_NO_SPEC_MAP);
 #endif

 #ifdef FLAG_ENV_MAP
 // Env color
  #ifdef FLAG_NORMAL_MAP
vec3 envReflectNM = envReflect + envOffset;
vec3 envIntensity = (alpha_spec) ? vec3(texture2D(sSpecmap, texCoord).a) : texture2D(sSpecmap, texCoord).rgb;
fragmentColor.a += (dot(textureCube(sEnvmap, envReflectNM).rgb, textureCube(sEnvmap, envReflectNM).rgb) * ENV_ALPHA_FACTOR);
fragmentColor.rgb += textureCube(sEnvmap, envReflectNM).rgb * envIntensity;
  #else
vec3 envIntensity = (alpha_spec) ? vec3(texture2D(sSpecmap, texCoord).a) : texture2D(sSpecmap, texCoord).rgb;
fragmentColor.a += (dot(textureCube(sEnvmap, envReflect).rgb, textureCube(sEnvmap, envReflect).rgb) * ENV_ALPHA_FACTOR);
fragmentColor.rgb += textureCube(sEnvmap, envReflect).rgb * envIntensity;
  #endif
 #endif

 #ifdef FLAG_GLOW_MAP
 // Glow color
fragmentColor.rgb += texture2D(sGlowmap, texCoord).rgb * GLOW_MAP_INTENSITY;
 #endif

 #ifdef FLAG_FOG
fragmentColor.rgb = mix(fragmentColor.rgb, gl_Fog.color.rgb, fogDist);
 #endif

gl_FragColor = fragmentColor;

#ifdef FLAG_LIGHT
//gl_FragColor.rgb = vec3(dist/15000.0);
#endif
}
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: MetalDestroyer on July 09, 2011, 03:22:53 pm
Which code should people have top copy, if we want to test it ? The first one seems to be a C/C++ code with some weird comment caracters. And You didn't give any tips on how to use the first code for non developer.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: The E on July 09, 2011, 03:57:47 pm
Well, if you do not know how to apply code patches and build your own executables, this is (for the moment) not for you.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Valathil on July 09, 2011, 04:23:20 pm
Sadly yes i have to agree with the E
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Kolgena on July 09, 2011, 04:25:30 pm
Waiting patiently for a build with the first block of code incorporated, if it will ever exist before going into trunk.


not like I can test right now without my laptop, but whatever
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Luis Dias on July 09, 2011, 04:56:02 pm
^ Wat Kol said.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Valathil on July 09, 2011, 05:34:41 pm
FFS guys. Ok main-f.sdr and main-v.sdr go into data/effects folder. Use this at your OWN risk. If something doesn't work don't bother anyone else about it. If you cant get it to work delete the files again and wait for final release. Comments about the effect and suggestions for improvements are very welcome though.
File name: beam_lighting.rar File size: 4.86 MB (http://www.fileserve.com/file/3HbC8sf)
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: MatthTheGeek on July 09, 2011, 06:59:06 pm
Did you just put up a link to a ****ty "I make you wait" DL site that eventually leads to a Dl that doesn't actually work on purpose, or ?

I mean, it's not like if there wasn't a crapton of hosting websites that don't have that kind of crap. Or it's not like if there wasn't a nice attachment function integrated to the forum.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Black Wolf on July 09, 2011, 07:22:21 pm
Did you just put up a link to a ****ty "I make you wait" DL site that eventually leads to a Dl that doesn't actually work on purpose, or ?

Did you just waste a post whinging about it? This is an important thread - don't gum it up with mess and drama.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: MatthTheGeek on July 09, 2011, 07:25:05 pm
It's just that I thought it was an Open Beta. Looks like it's actually closed to everyone that doesn't have a paying account on fileserve.com.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Luis Dias on July 09, 2011, 07:30:10 pm
It doesn't work Valathil, here let me show you my log......


:lol: just kidding don't shoot me :).
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Black Wolf on July 09, 2011, 07:40:56 pm
:rolleyes:

Bloody hell you're needy sometimes.

www.mediafire.com/download.php?vapqy8lwdaimo2u

From now on, let's try to keep the topic drama free.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: sigtau on July 09, 2011, 07:43:37 pm
^ This.

Aside from Black Wolf's post, the original fileserv link *does* work, scroll down until you see "Slower Download" on the right, click on it, and type the Captcha code.  Scroll back up, wait for the timer, and the download link will appear.

Worked just fine for me.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: MatthTheGeek on July 09, 2011, 07:47:03 pm
Exactly what I did, it starts the download, but I always get an corrupted archive of random size at the end.

Now BW's link work. How hard was that.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Echelon9 on July 09, 2011, 08:12:30 pm
Thanks Valathil, initial compile and test on Mac shows it's working.

Here is the pack of Mac binaries, patch and the two shader files (http://members.iinet.net.au/~tjkidd/fs2open/build/mac/Valathil%20lighting%20v1.zip) ready to drop in.

SHA(Valathil lighting v1.zip)= fa8aa47fc3d08bee408d05084534940891111c44
MD5(Valathil lighting v1.zip)= 185203a6336a21ae52fda4c6a3d5980d
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Kolgena on July 10, 2011, 10:33:07 am
Does anyone else feel that it might be better to have the spool up/down beam glows closer than 300 units to the fire point? I think it could look better if the glow was small but there, then suddenly larger (not necessarily brighter) from tube light the instant the beam fires. As it is now, it's sort of a spool up to maximum that gets sustained upon firing and lacks oomph.

This could reduce the artifacts from spawning a light far from the hull as well. I know the engine used to use 300 units before, but beam lighting was so much worse back then that a little inaccuracy like that wasn't nearly as noticeable.

Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Valathil on July 10, 2011, 12:01:48 pm
keep in mind that firing ship still has only point light not tube light. tried to make it tube light, doesn't look very good. lacked oomph as you put it. but a jump in intensity is doable yes
EDIT: here is with intensity jump
http://www.mediafire.com/?si24ce41cf1y4rm

(yes mediafire so matt doesnt  :( again  :pimp:)
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Kolgena on July 10, 2011, 12:16:12 pm
Oh, right. Forgot about that.

Is it possible to easily do a jump in position? Start at say 100, then move to 300 once firing?
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Valathil on July 10, 2011, 12:28:21 pm
that would look really ****ty i find the intensity jump sufficient look at it
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Colonol Dekker on July 10, 2011, 04:38:48 pm
Is there any footaģe of this? I'm not sure what "beam lightning" entails. But it sounds enthralling. :)
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Kolgena on July 10, 2011, 04:43:39 pm
http://www.hard-light.net/forums/index.php?topic=76973.0

The third video at bottom of 2nd page is most representative of what is found here.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Valathil on July 12, 2011, 08:40:17 pm
I need some feedback people, did noone try it or whats going on? If noone says anything im just assuming it works and is fine as is.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Zacam on July 12, 2011, 10:25:17 pm

There was some mention about this in the #SCP-FSU channel. Unfortunately, on e of the people who would be able to provide specifics seems to have gotten banned (temporarily), so I'll probably have to funnel it.

Near as I can recall, system is running a 9800GT and the issue being that apparently only green beams are really showing any effect what so ever.

More details as they happen, but yes. Feedback from any body and everybody would be a good thing. I realize that Trunk is usually a good gauge of what is stable, but if you all wait for this to hit a nightly, that just lowers the inclination to correct for it later when any issues with it could be better resolved now. Plus, any issues found with it now won't prevent it from being available (potentially) in the RC's when they start happening, but if people wait until then to complain about it, it will just unnecessarily extend (or can) the RC phase before a stable Release build is done.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Kolgena on July 12, 2011, 11:14:28 pm
Still waiting for my laptop to get back. Don't have an FS install right now. Will test it once I do.
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Timerlane on July 13, 2011, 01:37:37 am
the issue being that apparently only green beams are really showing any effect what so ever.
At least as far as ships other than the firing ship, I tend to agree. From what I've seen, green beams seem to be the only ones that really project color to any other ships in the area. I saw some nice yellow and blue effects off the hull of a firing Sobek, and some red glow off the bottom of a Lilith, but for colors other than green, if there was any visible color projected on other ships in the area, it was far harder to notice.

FTR, I use Spidey's lighting settings (http://www.hard-light.net/wiki/index.php/Sample_Lighting_Settings#Spidey.27s_Settings).
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Colonol Dekker on July 13, 2011, 02:07:16 am
It loos great. I misread it as beam lightNing though :lol:
Title: Re: RELEASE: New beam lighting OPEN BETA
Post by: Valathil on July 13, 2011, 01:14:37 pm
New version fixed something and i believe improved the speculars on the beams. please tell me if this fixes the nongreenbeams not working

http://www.mediafire.com/?og34b6gaopfk7do (http://www.mediafire.com/?og34b6gaopfk7do)
Title: Re: RELEASE: New beam lighting OPEN BETA; New Version 07/13/11!!
Post by: Timerlane on July 13, 2011, 06:19:19 pm
(http://img.photobucket.com/albums/v379/Timerlane/redbeamlight.jpg)

That, it does. :)
Title: Re: RELEASE: New beam lighting OPEN BETA; New Version 07/13/11!!
Post by: jg18 on July 13, 2011, 09:28:57 pm
Ok, I'll take a look. Since I use OS X, I'll build a copy of trunk patched with the patch in your first post. A few questions though:

1. I don't know how to use shaders. Is there a description or instructions available?

2. Is there a mission, preferably in the FS2 main campaign, where I can test this out?

3. What should I be looking for? (besides whether it compiles :p)

FWIW, the machine I'll use for testing this is an iMac from late 2007, running OS X 10.6.8, with an Intel Core 2 Duo 2.4 GHz, 2 GB RAM, and an ATI Radeon HD 2600 Pro with 256 MB VRAM.
Title: Re: RELEASE: New beam lighting OPEN BETA; New Version 07/13/11!!
Post by: The E on July 14, 2011, 04:04:57 am
Shader usage should be automatic, unless you have the no_glsl commandline flag active. Shader files need to be in mediavps_3612/data/effects, with the .sdr extension. As for missions to test it out, King's Gambit would probably be a good test.
Title: Re: RELEASE: New beam lighting OPEN BETA; New Version 07/13/11!!
Post by: jg18 on July 14, 2011, 11:14:42 am
Are there two shader files or just one? The first post lists just one, but some of the posts mention two.

Also: The default build seems to be a standard build, in that it doesn't look in the inferno data folder for pilots. Should I make an inferno build, and if so, how? Is it just by defining the INF_BUILD macro using the -D compiler flag?

Thanks.