Jump to content
The Dark Mod Forums

rich_is_bored

Member
  • Posts

    885
  • Joined

  • Last visited

  • Days Won

    18

Posts posted by rich_is_bored

  1. There are internal images (_scratch, _white, _black, _currentRender) created and updated by the engine that you can reference in material shaders. Couple that with some kind of probe entity responsible for capturing the local environment shot and dynamic reflections will be virtually automatic. You scatter a few of these probe entities in your map, link them up in a network, and the game should be able to handle blending between them. All you'd need to make use of the reflections in your materials would be to reference the internal image, say _probe.

    • Like 1
  2. I haven't been following this discussion very closely so perhaps this isn't terribly useful but reading the posts about ARB and alpha reminded me of an issue I encountered when creating a color grading shader. I noticed that after a texture lookup, red color data was being stored in the alpha channel. You had to swizzle the channels around to correct it like this ...

    # do lookup
    TEX low, lut_coord, texture[1], 2D;
    TEX high, lut_coord_high, texture[1], 2D;
    MOV low.rgba, low.agbr;
    MOV high.rgba, high.agbr;

    I never really looked into why. I figured I was doing something wrong but it could be a bug in the engine.

    • Like 1
  3. That's surprising. I wasn't expecting it to work.

     

    Was it editing the material shader alone that did the trick? I'll have to update the package accordingly.

     

    I'd really like to put the conditional back in provided it doesn't break anything. Skipping the color grading process is the proper fail safe in the event someone has turned off post processing. Color grading isn't so critical that your map should be unplayable without it.

  4. Yeah, I've read through that but nothing jumps out at me as the cause of this issue. It does however answer a question I had about how bloom is implemented. The fragment programs responsible; brightPass_opt.vfp and finalScenePass_opt.vfp, are called from within the engine. The color grading shader cannot be implemented in the same fashion without modifying the TDM codebase and compiling a custom executable. That's fine if it became a core part of the mod but it's not an option for a single mission.

     

    However, there are some slight differences in the materials that may be worth looking into. Take for instance postprocess/finalScenePassOptimized...

    material postprocess/finalScenePassOptimized {
        noshadows
        noimpact
        sort    postProcess
        {
            rgba 1
            vertexParm        0     parm0, parm1, parm2, parm3        
            program        finalScenePass_opt.vfp
    
            fragmentMap 0 forceHighQuality     _currentRender
            fragmentMap 1 linear             _bloomImage
            fragmentMap 2 nopicmip             _cookedMath
        }
    }

    There is no conditional. "rgba" is set to 1. _currentRender is passed to the fragment program with the parameter forceHighQuality. I can't see what good those changes would do but it might be worth making similar changes to the color grading material so it more closely matches other post process effects. Something like this ...

    textures/postprocess/sepia
    {
        noshadows
        noimpact
        sort    postProcess
        {
            rgba 1
            vertexProgram clut.vfp
            fragmentProgram    clut.vfp
            fragmentMap 0 forceHighQuality _currentRender
            fragmentMap 1 linear textures/clut/sepia_clut.tga
        }
    }

    Also, if you suspect bloom and such is interfering with the clut shader, you can override brightPass_opt.vfp and finalScenePass_opt.vfp with dummy files (empty files with no content). The console will complain about it but the net result is those graphics calls will be skipped.

     

    I can't test this since it's working on my end. Out of curiosity, what GPU are you using?

     

    • Like 1
  5. I've tested with your settings and I replicated the freezing picture. I've narrowed it down to post processing being disabled. It makes sense since you're telling the engine that you don't want to run post processing effects.

     

    The peculiar thing to me is that anything is visible at all. If you've disabled post processing then in the material shader the conditional "if (fragmentPrograms == 1)" should evaluate to false and the entire stage should be skipped. And yet even on my end, I'm still seeing color grading with post processing disabled.

     

    As for the black screen with color dots, that must be unique to your hardware setup. For the record I'm using an NVidia GeForce GTX 970.

  6. Just tested it in Mother Rose and went into the house...

     

    nvmvetn.jpg

     

    I want to say it's a graphics setting but at the same time the shader obviously runs because you've posted screenshots above. Try Mother Rose again but this time hide the HUD with g_showHud and test the shader directly with g_testPostProcess. At least then we will know for certain if it's the gui overlay or not.

    • Like 1
  7. @freyk:

     

    Sure, if all you want to do is apply a color cast that works.

     

    @RPGista:

     

    Are there missions where you don't get a black screen? I've tested it in the training mission and it works fine. I'm not sure how to handle this aside from doing something silly like binding a sphere to the player if the gui overlay approach doesn't work.

  8. I saw similar issues when testing using g_testPostProcess. It has something to do with visportals as disabling them fixes the problem.

     

    To use this in production you need to modify the hud gui by creating an extra windowDef and applying the material there.

     

    I'm not able to whip up a modified GUI ATM but if nobody addresses the problem for you in the next day or so I'll see what I can do.

    • Like 2
  9. I don't know how we can put so much faith in the findings of a security firm paid for by the DNC. It's a bit like how retail food chains will pay a private company to do health inspections so they can avoid penalties the state might impose on them. The DNC needs to turn their servers over to an independent agency like the FBI. What are they afraid of? A second opinion will only corroborate the facts.

    • Like 1
  10. Webb is probably full of shit. I say probably because I can't be bothered to watch all 200+ of his videos to see if there's anything credible there or not.

     

    I don't understand how he has the time and ammo to crap out a dozen videos a day but he's too busy investigating corruption to spell it out for us plebs. I hope his videos are monetized. At least then someone is benefiting from his efforts.

  11. You can't both distribute something for consumption and lock it away so people can't access it. If people can play your mission, they will be able to steal your content. Piracy wouldn't be a thing if encryption, compression or any other form of obstruction was an impassible barrier to theft.

     

    I suggest "signing" your assets and maintaining a portfolio or blog. You can prove you are the author when this kind of thing happens if the copy you distribute contains hidden data that is revealed by comparing it to an unaltered version you never distribute.

    • Like 4
×
×
  • Create New...