Horde3D

Next-Generation Graphics Engine
It is currently 14.05.2024, 17:09

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 10.03.2010, 22:10 
Offline

Joined: 15.06.2008, 11:21
Posts: 166
Location: Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: 17.03.2010, 01:42 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Thanks for reporting this. Overloading the name was actually not intended and is fixed now.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group