Author Topic: Technopredator has questions about shaders  (Read 2871 times)

0 Members and 1 Guest are viewing this topic.

Offline technopredator

  • Does not compute
  • 27
  • Don't get mad, consequences are revenging you.
Technopredator has questions about shaders
These shaders can be used with other mods if I put them in the 'mod_name\data\effects' directory? what about if I put them in the main 'data' ('FS2O\data\effects') directory?

Shaders are loaded by the mod or are loaded automatically by FS2O? how are they used? on the fly or all load together and are active all the time? how do I know when a shader is loaded? the .log file? I ran the debug version and the game has the same shaders are provided in the first post, if I put them in the main 'data' directory, do they replace the ones in the game? I've read that they will. I already tried with and without copying the shaders in the 'data' directory and both .log files don't seem to have a reference to replaced shaders, only that 6 more files were found, it doesn't say if they replaced something or are loaded and used, it doesn say anything about the new shaders.

I compared them using Total Commander function 'Compare by content' and there are only 8 differences that again, say nothing. I'll attach both .lof files.

[attachment deleted by a ninja]

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Technopredator has questions about shaders
I don't know where this post was supposed to go, but the TBP board was probably not the right place.

As for the real question here: I do not know which shaders you are using, or where you got them from, but it is highly unlikely they will work with 3.6.12 builds.
« Last Edit: January 04, 2012, 09:26:19 am by The E »
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline technopredator

  • Does not compute
  • 27
  • Don't get mad, consequences are revenging you.
Re: Technopredator has questions about shaders
E, the shaders are from the OP, and from TBP of course and was asking about those shaders, so IMO it was the right place to ask about them, but I actually don't mind as long as I get the knowledge. Are there threads about shader tutorials? so I can answer myself those questions? and would be great if developers could hand a explanation how the code is handling them.
« Last Edit: January 06, 2012, 08:02:23 am by technopredator »

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Technopredator has questions about shaders
See, the problem was that the logs you posted very definitely had nothing to do with TBP.

Anyway, let's see about the list of questions.

1. Yes, shaders will always be used if they are in a mod's "data/effects" directory.
2. How are they used? Well, a shader is a program that is run on your GPU to create images. Each shader is made up of a vertex and a fragment shader program, which is compiled by the display driver and uploaded to the GPU. These programs are used to handle parts of the rendering pipeline that used to be fixed-function; Vertex shaders handle vertex transformations and setup, while fragment shaders generate the actual colour values for pixels.
3. The engine will compile all shaders used during startup. The only exception are the post-processing shaders, which are recompiled on the fly if the post-processing setup changes due to sexps.
4. You generally do not know which shader the engine is using at any given time. This information is not printed to the log, because it is generally useless. However, you can generally infer which shader is used if you know the combination of texture a given object is using. In the log, you will find compilation messages following this format:
Compiling shader: <vertex shader filename> (<decomposed filename>), <fragment shader filename> (<decomposed filename>)
In the case of main shaders (which are used for all model-rendering related duties), the decomposed filename indicates which shader flags are active, and this information can be used to figure out which shader is used for a given model. Here's a list of possible flags:
l : Shader handles lighting
f : Shader handles fogging
n : Shader handles normal maps
e : Shader handles environment maps
a : Shader uses animated effects
b : Shader uses diffuse maps
g : Shader uses glow maps
s : Shader uses shine maps

One note about the shaders floating around at the moment. They are ALL written for 3.6.13/3.6.14 builds, and WILL NOT WORK CORRECTLY on 3.6.12. They do incorporate a few advances (such as anisotropic lighting and per-fragment lighting) which rely on information provided by the engine to the shader only available in 3.6.13 and later builds.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline technopredator

  • Does not compute
  • 27
  • Don't get mad, consequences are revenging you.
Re: Technopredator has questions about shaders
Yes you're right I didn't ran TBP with the shaders I only tried them and I only wanted to know about shaders, so you were right to make it a thread, thx for that.

Thx a lot for the info, I'll take it into account and will serve me to research in Wikipedia more about shaders. BTW, does Freespace wiki have as detailed info about shaders as you gave me?

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Technopredator has questions about shaders
Not really. I am not exactly sure what you want to do, but editing shaders require an understanding of the OpenGL Shading Language (Called GLSL for short), as well as an understanding of how rendering works. Once you have that, and using the information in this post, you can write your own.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline technopredator

  • Does not compute
  • 27
  • Don't get mad, consequences are revenging you.
Re: Technopredator has questions about shaders
I wanted exactly that :D write shaders. I want to learn to code and aimed it at 3D and I want to be a good modeler too, I love 3D & Spaceships so I hope someday I could be of use here, since FS has always fascinated me, specially its game engine, I have ran FS1 from i486 CPUs to a Pentium 4 HT and always was smooth, with the correct balance in every way, in short a master piece, no doubt, so I want to help continue that beautiful work and the game is good, also I hope some day I can get an Aerospace Engineering degree and do a thesis with FS2O.

Thx a lot for the guidance, I appreciate it.

Cheers.

 

Offline Davros

  • 29
Re: Technopredator has questions about shaders
I would hate to see fs1 on a 486

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Technopredator has questions about shaders
Probably wouldn't be as bad as you think, on the right setup.  I had a 486 with a Kingston Turbochip 4x overdrive CPU running at 133 MHz, and 64MB of EDO RAM.  It ran Windows 95 OSR2 like a champ, and with the right graphics card probably could have run FS1 passably.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

  

Offline technopredator

  • Does not compute
  • 27
  • Don't get mad, consequences are revenging you.
Re: Technopredator has questions about shaders
As I wrote the performance was flawless, medium speed CPU and PCI/Integrated video card, the problem I though would be with faster CPUs where most old games break, also faster video cards models and drivers, chipsets, motherboards, PCI-E/AGP Busses, OPenGL versions, hard drives, Windows versions, etc everything evolving and I have yet to see FS1 perform bad or even mediocre.

Edit: I meant with the right settings, old i486 & video cards could  not had handled high or even medium in some cases.
« Last Edit: January 06, 2012, 07:09:56 pm by technopredator »