Posted: Sun Feb 28, 2010 4:01 am
Up (very) late... The tsunami thing was kind of incidental, I live far enough from the coast that it's not a concern, in a personal sense at least.
For information and discussion about Oolite.
https://bb.oolite.space/
From what I recall, I don't think you'll see an improvement in framerate even if the drivers did improve things. I'm pretty sure Oolite locks the max-framerate to the screen refresh frequency to avoid flicker problems. If you up the frequency to 75 or 80 Hz, you'd probably see a commensurate improvement in your maximum framerate.El Viejo wrote:No improvement in FPS though, I get a steady 64 with all of them.
Nope... refresh rate is already set to max of 75 Hz.Diziet Sma wrote:If you up the frequency to 75 or 80 Hz, you'd probably see a commensurate improvement in your maximum framerate.
Code: Select all
vec2 baseTexCoord = gl_TexCoord[0].st;
Code: Select all
//vec2 baseTexCoord = gl_TexCoord[0].st;
vec2 baseTexCoord = vTexCoord;
Code: Select all
#define OO_TANGENT_ATTR 1 // <---- Define OO_TANGENT_ATTR to 1 so that Oolite gives correct tangent data to shader.
#ifdef OO_TANGENT_ATTR
attribute vec3 tangent;
#else
const vec3 tangent = vec3(1.0, 0.0, 0.0);
#endif
varying vec2 vTexCoord;
varying vec3 vEyeVector; // These are all in tangent space
varying vec3 vLight0Vector;
varying vec3 vLight1Vector;
void main()
{
// Build tangent basis
vec3 n = normalize(gl_NormalMatrix * gl_Normal);
vec3 t = normalize(gl_NormalMatrix *tangent);
vec3 b = cross(n, t);
mat3 TBN = mat3(t, b, n);
vec3 eyeVector = -vec3(gl_ModelViewMatrix * gl_Vertex);
vEyeVector = eyeVector * TBN;
#ifdef OO_LIGHT_0_FIX
vec3 light0Vector = gl_LightSource[0].position.xyz + eyeVector;
vLight0Vector = light0Vector * TBN;
#endif
vec3 light1Vector = gl_LightSource[1].position.xyz + eyeVector;
vLight1Vector = light1Vector * TBN;
vTexCoord = gl_MultiTexCoord0.st;
gl_Position = ftransform();
// gl_TexCoord used for the decal function in the fragment
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
}
Thanks , mistakes happens, all the time.. was it not for your work, a lot of the shaderfied oxps might never have happened...Griff wrote:yeah, sorry about the gl_TexCoord[0].st thing, that was a really daft bug to have introduced into the shaders,
hopefully i'll have the normal mapped shipset updated soon with fixed shaders, the new anaconda shaders might interest you Frame regarding your registration oxp, the decal code has been moved into a function in the shader, you just need to call this function multiple times (with updated decal position & rotation info each time) to add multiple decals to the ship, this cuts down on a lot of duplicated decal related code in the shader when adding multiple decals
Multiple decals? Oh good... very good.Griff wrote:you just need to call this function multiple times (with updated decal position & rotation info each time) to add multiple decals to the ship,
This is complete nonsense. Oolite doesn’t know or care what you #define in a shader, but it predefines OO_TANGENT_ATTR so the shader can know whether it’s running in a version of Oolite where the tangent attribute exists.Frame wrote:Code: Select all
#define OO_TANGENT_ATTR 1 // <---- Define OO_TANGENT_ATTR to 1 so that Oolite gives correct tangent data to shader. #ifdef OO_TANGENT_ATTR
Mea culpa this one, I'm afraid. I had advised Griff to use this definition because I could not find any reference to it in the code and had assumed that it is not pre-defined.Ahruman wrote:This is complete nonsense. Oolite doesn’t know or care what you #define in a shader, but it predefines OO_TANGENT_ATTR so the shader can know whether it’s running in a version of Oolite where the tangent attribute exists.Frame wrote:Code: Select all
#define OO_TANGENT_ATTR 1 // <---- Define OO_TANGENT_ATTR to 1 so that Oolite gives correct tangent data to shader. #ifdef OO_TANGENT_ATTR
OO_TANGENT_ATTR is always predefined as 1 in Oolite 1.73 and later.