Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: KeldorKatarn on March 30, 2009, 10:57:29 am
-
Is this a Direct3D OpenGL difference or what is it?
I mean, there's only one specular exponent, isn't there?
-
-spec_exp isn't exponent, it's explosion. It affects how bright the lights from explosions are.
-
In that case this wiki-entry sould be revised:
http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-spec_exp
-
huh, well either the wiki's wrong, or I'm wrong and I don't know how people are supposed to change the explosion brightness.
-
Maybe someone who knows the could could confirm either one here?
Explosions might also be bound to the point light factor actually. But then I'd still not understand what exp stands for if ogl_spec is the exponent...
-
how about explosion ?
-
it isn't explosion.. it is the exponent. I looked it up inside the code.
I'm still not sure what the difference to the OpenGL shininess value is.. I think the OpenGL value is used in the shaders, the exp value in the fixed function pipeline, but I'm not 100% sure, the code isn't exactly easy to read. But it is NOT explosions. Those are affected by the point light factor.
-
Both refer to the specular exponent of all lights, they just get applied in different areas. The -spec_exp value is directly applied to the light itself before any other lighting calculations are done. The -ogl_spec value is for the final lighting calculation of all lights and is used the same way in both the fixed function lighting calculations and in the shaders.
-
What does that mean "applied to the light itself" how so? And where is it accessed? Multiplied to what?
Is that value used in the shaders at all? I'm not really sure I'm getting this... how can the specular light be calculated before any other calculation?
-
Oh, I get it; ogl_spec is a coefficient and spec_exp is the exponent.
i.e. the total specular component of the lighting is ogl_spec * (n ^ spec_exp), where n is probably some dot product
-
Wrong. The OpenGL shininess is accessed by the shaders and used as an exponent by gl_FrontMaterial.Shininess.
-
Are you asking or telling?
-
Are you asking or telling?
What's life without the ability to ask stupid question?
-
/me laughs coffee out his nose
-
So would anyone knowing this code like to contribute any more information? Even a "I simply have no idea" would be helpful... So far I haven't found out what the heck this is supposed to change once shaders are used...
-
Both refer to the specular exponent of all lights, they just get applied in different areas. The -spec_exp value is directly applied to the light itself before any other lighting calculations are done. The -ogl_spec value is for the final lighting calculation of all lights and is used the same way in both the fixed function lighting calculations and in the shaders.
Seems to sum it up rather nicely, I think.
-
Ok fine.. I'll refrain from asking any question here from now on.
-
Reh? I am not understanding what the issue is then. But that is a rather dramatic way to decide you haven't gotten what you are after.
Perhaps further clarification would allow us to provide a better response.
Applied to the light itself means that it sets the overall factor for the lighting before it's effects on, with or by any other surfaces or means takes place.
The shaders and fixed render pipeline operate with-ogl_spec the same way, the shaders act with gl.FrontMaterialShininess, which it can derive adjusted values from the usage of -ogl_spec as well as the resultant light from -spec_exp.
Now mind, as I am not a coder, I could be wrong. But this is what I infer with what little OpenGL knowledge I have and a great deal of assumption.
-
Could anyone give a DEFINITE answer to this that REALLY clearifies this?
-
Could anyone give a DEFINITE answer to this that REALLY clearifies this?
Apparently not. If taylors answer and my attempted exposition has not helped any, I don't know what will.