Jump to content
The Dark Mod Forums

DarkRadiant Preview Bug


BigBadWolf

Recommended Posts

Having a brief look through the code (on my Linux machine, where I have not previously seen the bug), it seems that the problem could be that the GLSL shader is using the texture matrixes from texture units which have not had a texture matrix set or initialised. The only changes to the texture matrix are:

 

OpenGLRenderPass::render(), which initialises the texture matrix of the currently-bound texture unit (with no attempt to determine which this is) to identity, and

 

GLSLBumpProgram::applyRenderParams() , which loads the local2light transformation matrix into the texture matrix of texture unit 3.

 

I suspect this worked before because the unused texture matrices were simply left at the identity, but maybe the newer drivers are not initialising texture matrices for texture units that are not used, so this operation in the GLSL shader gives a wrong result.

 

If this reasoning is correct, then the solution could be as simple as removing the offending multiplication operation in the GLSL shader altogether, since it performs no purpose when the texture matrices are never used in the code.

 

Robert (Tr3b) suggested to load our own uniform texture matrix into the shader. This might be necessary on the long run anyway, as each shader stage can have translate and scale instructions on them (diffuse and bump, all independently) - I cannot imagine accomplishing such a thing without hacking the texture matrix of each unit.

 

Of course, the quick fix would be to remove the references to texture units 1 and above.

Link to comment
Share on other sites

Indeed, my "quick fix" suggestion was based on the assumption that at the moment the texture matrix modification keywords such as scale, translate etc are not supported. When these are implemented they will indeed have to use the texture matrix as you say.

Link to comment
Share on other sites

  • 4 weeks later...

That does look like the same problem, but I can't immediately see from his description whether the problem occurs only if he doesn't load the identity matrix into the texture units, or if it happens no matter what. It does sound like a driver bug in any case, since as far as I know all un-initialised matrices in OpenGL should be left at identity by the driver.

Link to comment
Share on other sites

Hello, I too have had this problem and I don't know if THIS has been mentioned, but I was running 1.2.2 x64, bump map worked fine, then I installed 1.4.0 and now bump mapping doesn't work.

 

Just thought that might count for something.

 

EDIT: And here's more news, I installed catylist 10.10d to no improvement

 

EDIT: and 3.0 is the last to allow bump map rendering, so I'll use it with the latest release.

Edited by Mr Lemony Fresh
18588.png
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 2 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...