Page 5 of 12

Posted: Sun Feb 28, 2010 4:01 am
by Diziet Sma
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.

Posted: Sun Feb 28, 2010 4:12 am
by Diziet Sma
El Viejo wrote:
No improvement in FPS though, I get a steady 64 with all of them.
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.

Posted: Sun Feb 28, 2010 12:17 pm
by Frame
Thats real funny all this stuff about the decals and textures not showing up... I have run into the exact same problem(with registration ID for standard ships), and thinking it was ATIs fault ("again") I had to go back as far as 8.43 HIS driver version to solve the problem.

However, if this stuff about gltexcoord[0].st has changed, I'm probably going to reinstall 10.2 agp hot fix again.

downloading the moray example to see how it works...

Posted: Sun Feb 28, 2010 12:32 pm
by Cody
Diziet Sma wrote:
If you up the frequency to 75 or 80 Hz, you'd probably see a commensurate improvement in your maximum framerate.
Nope... refresh rate is already set to max of 75 Hz.
The 64 FPS I do get is rock steady, though. Hardly ever drops below 60, if it drops at all.
I can tweak the CCC and raise the FPS slightly, but then I get the occasional stutter in-game. I am content as is.

Posted: Sun Feb 28, 2010 12:58 pm
by Frame
As suspected, registration ID is now working with CCC 10.2 and display driver of same version..

the problem is

Code: Select all

vec2 baseTexCoord = gl_TexCoord[0].st;
above Line I used in the shaders as these was a rip-off Griffs shader code, however heavy modified...

and it was fine in ATI Display Driver 8.43(ccc not working due to newer .Net Framework)

Luckily I had already build in Normal Mapping Support for future use, so it was a matter of changing a line..

namely

Code: Select all

//vec2 baseTexCoord = gl_TexCoord[0].st;
vec2 baseTexCoord = vTexCoord;
Because i use this vertex shader (which is the normal mapping one griff used for his sidewinder)

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; 
}
This however will affect the entire series of Griff's Normal Mapped Decal ships... these "should be fixable" with the exact same above fix as for the registration id oxp....

Things not using normal maps, like Griffs first Krait and the Trade outpost are however affected by this...

The registration ID will shortly release a new version...

Posted: Sun Feb 28, 2010 3:56 pm
by Griff
yeah, sorry about the gl_TexCoord[0].st thing, that was a really daft bug to have introduced into the shaders, :oops:
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

Posted: Sun Feb 28, 2010 4:19 pm
by Frame
Griff wrote:
yeah, sorry about the gl_TexCoord[0].st thing, that was a really daft bug to have introduced into the shaders, :oops:
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
Thanks :-) , mistakes happens, all the time.. was it not for your work, a lot of the shaderfied oxps might never have happened...

That is going to be the next update to the Registration ID OXP.. as rotation seems a requirement to place the ID correctly...

Posted: Sun Feb 28, 2010 4:31 pm
by Cody
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,
Multiple decals? Oh good... very good.

Posted: Sun Feb 28, 2010 6:07 pm
by JensAyton
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
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.

OO_TANGENT_ATTR is always predefined as 1 in Oolite 1.73 and later.

Posted: Sun Feb 28, 2010 6:39 pm
by another_commander
Ahruman wrote:
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
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.

OO_TANGENT_ATTR is always predefined as 1 in Oolite 1.73 and later.
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.

I guess it never occured to me back then to check inside material-defaults.plist.

Posted: Sun Feb 28, 2010 6:44 pm
by JensAyton
Oolite: Even our preprocessor macros are data-driven.™ ;-)

Posted: Mon Mar 01, 2010 3:08 pm
by Cody
A test with Griff’s tweaked OXP set, available here, shows that CCC (or Catalyst Software Suite) version 10.2 (internal driver version 8.702-100202a-095689C-ATI) now displays all the Griff ship set perfectly in the demo shots, including custom paint jobs and decals. A brief in-game session shows the same.
I've got a long in-game session to follow, now.

Great work Griff!

Posted: Mon Mar 01, 2010 5:27 pm
by lfnfan
gr9. Looking forward to the results of your long in-game session.

Be careful out there

Posted: Tue Mar 02, 2010 2:04 am
by Cody
Had a nice long session using CCC 10.2 and everything seems to work well… nice paint jobs, decals etc.
Griff’s tweaked shipset throws up a few errors in the Latest.log but in-game everything runs smoothly.
So now I’m no longer irked by ATI and their latest drivers. I like my HD 3650.
All is well for the moment and the ‘Clear Air Turbulence’ is in for some long cross-chart runs.

Just one pic... of the 'Clear Air Turbulence', of course (I've been playing with the custom colours a little).
I was too busy splashing bandits to take pics of other ships.

Image

Posted: Tue Mar 02, 2010 9:00 am
by Diziet Sma
The CAT is looking good, El Viejo... 8)

I might have to see what I can to to sex up the Gunboat Diplomat. :lol: