Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Shader problems with ATI Radeon drivers [Solved]

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post 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.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post 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.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post 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...
Bounty Scanner
Number 935
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16073
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post 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.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post 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...
Bounty Scanner
Number 935
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post 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
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post 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...
Bounty Scanner
Number 935
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16073
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post 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.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6573
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Oolite: Even our preprocessor macros are data-driven.™ ;-)
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16073
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post 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!
Last edited by Cody on Wed Mar 03, 2010 3:44 pm, edited 3 times in total.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
lfnfan
Deadly
Deadly
Posts: 250
Joined: Tue Mar 24, 2009 1:29 pm
Location: london, uk

Post by lfnfan »

gr9. Looking forward to the results of your long in-game session.

Be careful out there
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16073
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post 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
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post 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:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Post Reply