[fixed] bug relating to incorrect GLSL sampler2D handling

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

[fixed] bug relating to incorrect GLSL sampler2D handling

Post by robmar »

Where should SVN bugs be posted, as the "latest SVN bugs" looks to have been abandoned.

Anyway, GLSL code that works under 1.7.2 breaks under SVN 4111.

Under SVN 4111 the GLSL function texture2D only ever returns the first of 3 textures of an ISceneNode object regardless of the index parameter passed.

3 very different textures are set to the materials, but the following returns only the first texture:-

gl_FragColor = texture2D(t1, originalCoord);
gl_FragColor = texture2D(t2, originalCoord);

The c++ project code is the same, just compiled for 1.7.2 standard release, and for SVN 4111.

Is this a known issue on SVN 4111?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: SVN4111 bug relating to incorrect GLSL sampler2D handlin

Post by hybrid »

Why would the SVN bugs track be abandoned? No way. But you're not forced to post there. Anyway, do you mean SVN trunk with rev. 4111, or the 1.7 branch? Could be related to Nadro's change to the shader variable setting, check the console output for warnings.
I think we have to re-establish the texture setting process via floating point arrays - and just warn about its deprecation - instead of simply not setting the variable.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: SVN4111 bug relating to incorrect GLSL sampler2D handlin

Post by Nadro »

Deprecated flag is a good idea. I added a comment into an example no. 10, that users have to use an int interface instead of a float, but I think that only new users look into an examples, so this isn't an enough solution :P I'll fix it in a upcoming commit.

Update: I already fixed it.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Post Reply