1. Forums
  2. Discord
  3. About Mapcore
  4. Patreon Supporters
  • Login
  • Register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • More Options
  1. Mapcore
  2. Discussions
  3. Level Design

Hammer: lighting preview after EP2

  • R_Yell
  • June 14, 2007 at 9:35 AM
  • ^Slick
    • June 16, 2007 at 1:55 PM
    • #21
    Quote from Defrag

    The 8 light limit is only for the fixed function pipeline -- you can sum up a zillion lights using shaders (though obviously it'll cost you). I'm not really bothered what they do, as long as it's fairly fast to render and gives a good indication of the final result.

    I argee, looking forward to it in my opinion.

  • Warby
    • June 16, 2007 at 5:06 PM
    • #22

    defrag can you explain that in more detail i am very interested in this topic !?

  • Defrag
    • June 16, 2007 at 6:27 PM
    • #23

    The fixed function pipeline (FFP) is just the bog-standard method of rendering. The programmer has little control over effects and lighting -- it's basically like dialling in some values and the API (D3D / OpenGL) takes care of various algorithms for you. This makes it nice and easy, but since the algorithms are fixed, you have little control over the result. There are various hardware limits as to what you can do and the 8 light thing is one of 'em. You can have a zillion lights, but only turn 8 on at any one time. I couldn't tell you in much detail why these limits exist (probably just to ensure a base level of compatibility), but they do.

    However, the FFP has been effectively replaced by shaders now. Instead of dialling in the values via the API, the graphics programmer has complete control over what happens to each vertex & fragment/pixel. The graphics cards now have little/no notion of what it's 'meant' to be doing. All the graphics card knows is that at the end of a vertex shader, it outputs some values (vertex position, normal, whatever else the programmer wants) and, at the end of a pixel shader, it outputs some more values (usually just a single colour). What you do to get these values is completely flexible now -- it could be any kind of lighting model (say Cook-Torrence[sp] instead of just Phong) and any kind of lighting setup (calculate the contribution of one light per rendering pass, or sum up an arbitrary number of lights in a single rendering pass).

    Now we've got support for static & dynamic branching and loops in shaders. What this means is that you can run a loop in a lighting shader and have an almost unlimited number of lights (you'd only be limited by the number of registers storing the light parameters and graphics cards have tonnes of those). It'd run like a dog if you're not careful, but the power is there. For something like a lighting preview, it'd probably be acceptable to cull unseen lights and render at a horrid framerate.

    DX10 doesn't even have a FFP -- it's entirely shader-based. Shader capable cards have been around since 2001 and many games don't even use the FFP (as if you're writing shaders to do various things, it's more work to create in parallel a FFP equivalent of the shaders you're writing). What I'm trying to say is that these days, if you have the need for it, you technically can use as many lights as you want.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!

Register Yourself Login
Discord

The Mapcore Discord is our lively IRC channel of the 2000s reborn. Chat about level design, gaming, and more.

Latest Posts

  1. Custom Gamemodes Contest

    Angel
    July 20, 2026 at 11:46 AM
  2. FAQ

    Angel
    July 20, 2026 at 10:14 AM
  3. Tangerine

    Harry Poster
    July 18, 2026 at 11:10 AM
  4. Any of the old guard still around? D:

    Warby
    July 12, 2026 at 8:23 PM
  5. About our archived forums

    Thrik
    June 30, 2026 at 2:12 PM
  6. Mapcore Discord

    mason_fan123
    June 24, 2026 at 8:52 PM
  7. [CS2] Valley

    Serialmapper
    June 22, 2026 at 11:56 AM
  8. Free Music / SFX Resource - Over 2500 Tracks

    Eric Matyas
    June 18, 2026 at 12:32 PM
  9. Pango [WIP]

    Elowen
    June 11, 2026 at 10:13 AM
  10. [CS2] Dvina

    Jeremy Rivera
    June 11, 2026 at 10:03 AM
  1. Privacy Policy
  2. Contact
Powered by WoltLab Suite™