Bug 5102 - Cogs screen stays black at startup
Status: RESOLVED FIXED
Alias: None
Product: Cogs
Classification: Unclassified
Component: Everything
Version: unspecified
Hardware: PC Linux
: P3 normal
Assignee: Ryan C. Gordon
QA Contact:
URL:
: 5108
Depends on:
Blocks:
 
Reported: 2011-07-26 16:00 EDT by alex.richardson
Modified: 2011-07-30 02:26:21 EDT
6 users (show)

See Also:



Description alex.richardson 2011-07-26 16:00:02 EDT
When I start Cogs the Logo appears, and then the screen stays black.

When looking at the console output the following lines appear suspicious:

Shader compile log for data/effects/TextureBumpCubemap.fsh:
Fragment shader failed to compile with the following errors:
ERROR: 0:41: error(#132) Syntax error: 'smooth' parse error
ERROR: error(#273) 1 compilation errors.  No code generated


It seems that smooth may be a keyword or something like that (maybe only my driver, fglrx?). Since when I replace smooth with something else, i.e. smoother
the game works.

The following patch fixes the issue for me:

--- TextureBumpCubemap.fsh      2011-07-26 21:53:45.475304298 +0200
+++ TextureBumpCubemap.fsh_new  2011-07-26 21:53:45.508303520 +0200
@@ -38,8 +38,8 @@
     //** normal and a "bumped" normal.  Note that this "flat"
     //** normal is based on the texture space coordinate basis.
     //**--------------------------------------------------------
-    vec3 smooth = vec3(0.5, 0.5, 1.0);
-    fvNormal = smooth*(1.0-bumpiness) + fvNormal*bumpiness;  //lerp( smooth, fvNormal, bumpiness );
+    vec3 smoother = vec3(0.5, 0.5, 1.0);
+    fvNormal = smoother*(1.0-bumpiness) + fvNormal*bumpiness;  //lerp( smoother, fvNormal, bumpiness );
     fvNormal = normalize( ( fvNormal * 2.0 ) - 1.0 );
     
     //**---------------------------------------------
Comment 1 Dag Stenstad 2011-07-26 17:29:06 EDT
The fix from Alex Richardson worked for me.

ATI Technologies Inc Mobility Radeon HD 3650, fglrx 8.84.60.
Comment 2 Johan Bové 2011-07-26 18:38:21 EDT
Confirmed the fix to work for me as well. Thanks.

ATI Technologies Inc Mobility Radeon HD 5650, fglrx 8.84.60.
Comment 3 Nick Markwell 2011-07-26 19:52:25 EDT
Fix works for me, too.

ATI Technologies Inc Mobility Radeon HD 5450, fglrx (not sure of the version, whatever archlinux has).
Comment 4 nigga 2011-07-26 22:34:00 EDT
Thanks for the fix. Hopefully they include this in an update of some sort
Comment 5 jrenggli+icculus 2011-07-27 07:01:32 EDT
Fix works here as well

ATI Radeon HD 4250, fglrx 2:8.840-0ubuntu4

I also hope they'll update the link in the Humble Bundle
Comment 6 Ryan C. Gordon 2011-07-28 02:41:53 EDT
Good catch! It looks like the ATI drivers keep "smooth" as a reserved word.

Alex's patch will get you going in the short term, but we're going to put an updated build on the Humble Bundle site soon to correct this.

--ryan.
Comment 7 Ryan C. Gordon 2011-07-28 02:51:04 EDT
*** Bug 5108 has been marked as a duplicate of this bug. ***
Comment 8 Ryan C. Gordon 2011-07-30 02:26:21 EDT

This is fixed in the build we just uploaded.

It should be live on the Humble Bundle site now. Just redownload the Linux
version with your existing download key.

You can get rid of the existing install by running the uninstall-cogs.sh script
in the game's installation directory. Then install the new build like you did
the previous one.

--ryan.