Jump to content
The Dark Mod Forums

Renderer improvements


Recommended Posts

Ok, fixed three occurrences of OUTSIDE, where PARTIAL should have been. The render speed is down at 30 msec again.

 

Oops, that's what happens when I get too aggressive with search-and-replace (using ack instead of grep, and Vim macros this is actually very efficient, but you can make mistakes clearly).

 

I'll take this as an eye opener what an effective culling algorithm can achieve (and I'm sure there are more effective ways to do that). :)

 

Yes, I was just thinking that in fact. I do wonder whether many of the so-called "optimisations" in the GtkRadiant codebase actually do more harm than good, but clearly this one is very effective and necessary.

Link to comment
Share on other sites

  • Replies 66
  • Created
  • Last Reply

Top Posters In This Topic

Just a quick question about the static sky render. Will there be an option to enable/disable this quickly without having to go into preferences? I'm thinking for finding leaks it may be hard using the rendered skybox views.

 

The skybox is only rendered in the lighting mode, in the regular preview mode you will just see the sky editorimage as you do with the current release. This follows the objective that the lighting mode should be as accurate as possible, whereas the regular mode is what you would normally use for building brushes, finding leaks etc.

Link to comment
Share on other sites

  • 3 weeks later...

GLSL shaders

 

I have resurrected the GLSL lighting shaders, and these are now used by default on the Linux builds. GLSL is the OpenGL Shading Language, which is a C-like shading language that is compiled and linked directly by the OpenGL libraries, in contrast to NVIDIA's Cg which must be compiled into the ARB assembler format using proprietary tools. Although the ARB assembly program method is not actually deprecated yet, the use of GLSL is what is recommended for modern shader applications, and is more convenient since it is used directly and does not require NVIDIA's Cg compiler to be invoked first.

 

Although GLSL should enjoy mature support from any modern graphics driver, this should of course be tested. @Greebo -- will you have any time to do some testing on the Windows environment? It will be necessary to define the RADIANT_USE_GLSL macro at compile-time in order to use the GLSL shaders, and if all goes well the result should look pretty much identical to the old ARB shaders. If there are no problems, we can switch over to GLSL as default on all platforms, keeping the old shaders only as a fallback.

Link to comment
Share on other sites

I just compiled a Win32 build on my work machine with RADIANT_USE_GLSL defined, and everything worked so far (incl. lighting mode).

 

This machine is a quite new Dell with an NVIDIA Quadro NVS 160M, so I think it's more on the modern side as far as the OpenGL support is concerned.

Link to comment
Share on other sites

That's good so far, I have an ATI 4850 on Linux so between us we have tested both platforms and both major GPU vendors. Also, the ATI Linux driver is well-known to be shit, so if anything has dodgy GLSL support I would expect it to be on my setup.

 

I've realised that the GLSL shader doesn't add the vertex colour, but this will be a trivial 1-line fix, I just need to test it.

Link to comment
Share on other sites

Just compiling the latest source with the GLSL enabled on Win32 and noticed this in the output window:

 

42>..\..\radiant\render\OpenGLRenderSystem.cpp(243) : warning C4800: 'const GLboolean' : forcing value to bool 'true' or 'false' (performance warning)

 

And that's about the only warning that I found.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Problems with the GLSL shaders are unlikely to appear during compilation, it is during application startup (when the GLSL code is actually compiled by the graphics driver) and of course the rendering itself that would be affected.

Link to comment
Share on other sites

That's just a VC++ warning about GBOOLEAN used as bool value. The GBOOLEAN is a typedef'd int, that's why VC++ is complaining, I think. (I just hate those stupid typedefs for trivial built-in language types.)

Link to comment
Share on other sites

(I just hate those stupid typedefs for trivial built-in language types.)

 

To be fair, GL is a C API and C does not have a bool type (probably later version do, e.g. C99, but not the version GL was standardised against). I will fix this warning in any case, since the type conversion might not be portable.

Link to comment
Share on other sites

Wait, C had no bools? Didn't know that, must have slipped by me - that somehow makes more sense then, but I still don't like it. :) We should've used gtkmm from the start, but it's probably too late now.

Link to comment
Share on other sites

We should've used gtkmm from the start, but it's probably too late now.

 

Note that this is an OpenGL/GLEW function, not GTK or GLib (although with so many G's it's easy to get confused).

 

You're correct though, GTKmm would be a much better choice than our home-grown wrappers, but converting the application would obviously be a mammoth task.

Link to comment
Share on other sites

On a topic-related note: how's your status regarding the renderer? Are you through with the first phase or are you still in the middle of it? I'm asking because it might be time for another release in the near future.

 

(Also, I've been noticing that many models (e.g. the zombie) have a "shader not found" in DR, which were working fine before, but I didn't want to point this out unless you're done with your changes.)

Link to comment
Share on other sites

On a topic-related note: how's your status regarding the renderer? Are you through with the first phase or are you still in the middle of it? I'm asking because it might be time for another release in the near future.

 

I'm not in the middle of any changes at the moment, the next task is to refactor the renderer to group by light, so that fog, blend and ambient light shaders can be implemented, but I haven't started on this so it would be a good point for a release.

 

(Also, I've been noticing that many models (e.g. the zombie) have a "shader not found" in DR, which were working fine before, but I didn't want to point this out unless you're done with your changes.)

 

That sounds like a bug, which I will have to investigate. This should probably be fixed before release.

Link to comment
Share on other sites

(Also, I've been noticing that many models (e.g. the zombie) have a "shader not found" in DR, which were working fine before, but I didn't want to point this out unless you're done with your changes.)

 

I'm having that issue also, but pretty much every model is showing up with Shader Not Found.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Confirmed, there is a bug whereby the diffusemap is not used for an editor image if there is no qer_editorimage line. I've fixed this for simple diffusemap lines (it was just a typo), but I have to add extra code in case the diffusemap is inside a proper material stage with { }.

 

EDIT: Fixed for the entire stage as well.

Link to comment
Share on other sites

Awesome thanks :wub: . I will download the source and recompile tonight when I get to work. I love working on the weekends, it's so dead.

 

Also I noticed that some models are completely broken. For example the bathtub in waterworks, it's materials refer to marble_white_shiney, but the path doesn't exist. It looks like someone re-organized the textures for the mod.

I always assumed I'd taste like boot leather.

 

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

    • 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
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...