Page 10 of 12

Posted: Sat May 01, 2010 11:38 am
by JensAyton
Griff, gl_MultiTexCoord# is not valid in fragment shaders. What you should be doing is reading gl_MultiTexCoord0 in the vertex shader and passing it through a varying to the fragment shader – either the build-in varying gl_TexCoord, or a custom one. The Oolite vertex shaders use a custom one, varying vec2 vTexCoords, and this is the recommended way for GLSL in general.

Posted: Sat May 01, 2010 1:26 pm
by Griff
thanks A, i'll have a go this afternoon at fixing the random hits shaders, i'll try and switch the light macro to a function and while i'm at it change all the tex0, tex1 stuff too

Posted: Sat May 01, 2010 3:17 pm
by Griff
OK, i think i've got the shaders sorted for random hits, but i've hit a snag, the shipdata.plist is written in XML which makes my hair stand on end, most of it hasn't changed but i've no idea how to write out the new texture uniform stuff, could somebody translate this into xml so i can use it as a guide to copy from:

Code: Select all

	shaders = 
		{ 
            "griff_krait_diffuse.png" =  
			{ 
                vertex_shader = "griff_normalmap_ships.vertex"; 
                fragment_shader = "griff_krait_r_channel_decals.fragment"; 
                textures = 
						(
							"griff_krait_diffuse.png", 
							"griff_krait_effects.png"
						);
				uniforms =
						{
						uColorMap = { type = texture; value = 0; };
						uEffectsMap = { type = texture; value = 1; };
						uTime = "universalTime";
						nearly_dead = "throwingSparks";	
						hull_heat_level = "hullHeatLevel";	 				
						engine_power = "speedFactor"; 			
						}; 	
			}; 
		};

Posted: Sat May 01, 2010 3:28 pm
by JensAyton

Code: Select all

    <key>shaders</key>
    <dict>
        <key>griff_krait_diffuse.png</key>
        <dict>
            <key>vertex_shader</key>
            <string>griff_normalmap_ships.vertex</string>
            <key>fragment_shader</key>
            <string>griff_krait_r_channel_decals.fragment</string>
            <key>textures</key>
            <array>
                <string>griff_krait_diffuse.png</string>
                <string>griff_krait_effects.png</string>
            </array>
            <key>uniforms</key>
            <dict>
                <key>uColorMap</key>
                <dict>
                    <key>type</key>
                    <string>texture</string>
                    <key>value</key>
                    <string>0</string>
                </dict>
                <key>uEffectsMap</key>
                <dict>
                    <key>type</key>
                    <string>texture</string>
                    <key>value</key>
                    <string>1</string>
                </dict>
                <key>uTime</key>
                <string>universalTime</string>
                <key>nearly_dead</key>
                <string>throwingSparks</string>
                <key>hull_heat_level</key>
                <string>hullHeatLevel</string>
                <key>engine_power</key>
                <string>speedFactor</string>
            </dict>
        </dict>
    </dict>
See? Much simpler. ;-)

Posted: Mon May 03, 2010 9:27 pm
by Cody
Oh well, I suppose it had to happen. I’ve started getting a few ‘black screen/vpu recover’ events… I’m none too happy with the way Catalyst 10.4 loads Oolite. In hope, I’ll presume that it’s the driver at fault, and not my aging system.

I guess I’ll have to roll-back to 10.1 again… <sigh>.

Posted: Tue May 04, 2010 9:22 am
by Griff
thanks for posting the shader definitions in XML, in the end i couldn't muster up enough enthusiasm to go through the shipdata.plist file and make all the changes over the weekend!

Posted: Wed May 26, 2010 9:09 pm
by Cody
It’s near the end of the fifth month of the tenth year of the millennium… which means it’s time for ATI/AMD to release Catalyst 10.5, driver version 8.732. It’s installed and so far, so good… now for another few days of ‘deep immersion’ testing. Oh well, as Star Gazer said… ‘it’s a dirty job, but someone has got to do it’.

Now where do I want to go tonight… right across the fifth from Bizalein to Gesolaon, that should do for starters.

<Station control, this is Rolling Thunder, bay seventeen... request launch sequence>

Posted: Wed May 26, 2010 11:46 pm
by Palmski
Sorry to keep on asking about this, but I don't think the Griff Boa is displaying correctly for me:

Image

It seems to have gl_TexCoord[0].st referenced throughout the .fragment files so I'm guessing this is another one for the list.

I'll happily have a go at fixing it myself if someone can give me an overview of how to do it that a poor simple Java programmer can understand :wink:

Posted: Thu May 27, 2010 7:31 am
by Palmski
Scratch that, I just upgraded to Catalyst 10.5 and it's displaying ok again. Also interesting to note that I put back the gl_TexCoord[0].st entries in YAH and that also shows up ok in game now (apologies for the rubbish screenshot):

Image

Good news possibly?

Posted: Thu May 27, 2010 7:38 am
by Griff
oo, that does look like good news, as long as the updated shaders that switched to using 'multiTexcoord' are still working! *praying smiley.gif*
thanks for doing the driver testing palmski, it doesn't look like the attempts i made to put these older pre-normal map shaders through a "normal map shader but without using a normal map" conversion process worked that well judging by the trippy capt kev dodo station screenshots that baffled players started posting after i made the changes to the oxp!

Posted: Thu May 27, 2010 8:30 am
by Palmski
I'll do some more testing tonight - this was just a quick look while drinking my pre-work coffee when I noticed El Viejo's post about 10.5 being out. Fingers crossed though!

Posted: Thu May 27, 2010 9:07 am
by Killer Wolf
sigh, 10.5 : do i believe it's going to solve my install/rendermonkey problems, or do i ignore it given the last 3 updates haven't sorted anything? :-/

Posted: Thu May 27, 2010 10:31 am
by Cody
Palmski wrote:
I just upgraded to Catalyst 10.5 and it's displaying ok again.
What’s this… an ATI driver update that actually cures a problem instead of creating one? Whatever next?

KW… I know what you’re thinking, but you’ll have to try it… won’t you?

Posted: Thu May 27, 2010 12:07 pm
by Zieman
Tried 10.5 and:
HOORAY!

Now I see all the beautiful shadered stuff again!
Even the animated billboards work again!

YEEHAW!

:D

Posted: Thu May 27, 2010 12:32 pm
by Cody
Glad to hear that, Zieman… maybe ATI are progressing just a little.
10.5 seems to load Oolite okay and runs smoothly in-game (so far).