Horde3D http://horde3d.org/forums/ |
|
Shader problems with OSS drivers on Linux http://horde3d.org/forums/viewtopic.php?f=2&t=1118 |
Page 1 of 1 |
Author: | phoenix64 [ 10.03.2010, 22:10 ] |
Post subject: | Shader problems with OSS drivers on Linux |
Extract from the terrain shader: Code: [[FS_AMBIENT]] uniform vec4 sunDir; uniform sampler2D heightNormMap, detailMap; varying vec2 texCoords; vec3 light = -normalize( sunDir.xyz ); void main( void ) { vec3 detailMap = texture2D( detailMap, texCoords * 300.0 ).rgb; Here, detailMap is declared as a vec3, but used as a sampler in the same line. The open source nvidia driver chokes on this while the proprietary ones go over this happily. This does not work in C/C++, is it really valid in GLSL? EDIT: The GLSL specs seem to say this is okay. I'll probably hack on Mesa a bit now ![]() EDIT2: Quote: It's probably incorrect in our compiler. You're best off playing it safe and using another variable name. I wouldn't be surprised if other GLSL compilers got this wrong too. -Brian I think this advice might be right. |
Author: | marciano [ 17.03.2010, 01:42 ] |
Post subject: | Re: Shader problems with OSS drivers on Linux |
Thanks for reporting this. Overloading the name was actually not intended and is fixed now. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |