TTLG|Jukebox|Thief|Bioshock|System Shock|Deus Ex|Mobile
Page 2 of 2 FirstFirst 12
Results 26 to 38 of 38

Thread: Faux 8-bit mode with NewDark + shader

  1. #26
    Classical Master 2008
    Registered: Jun 2002
    Location: Civitas Quinque Ecclesiae HU
    I have tried to install this fix, but it is straight up murdering my frame rate on Dirk Bogan's newest mission. Am I doing something wrong?

  2. #27
    Member
    Registered: Apr 2011
    Location: Lyon, France
    If you're using the earliest version then yeah, it is a framerate killer. The one that was posted here plays a lot nicer: https://www.ttlg.com/forums/showthre...=1#post2452175

  3. #28
    Classical Master 2008
    Registered: Jun 2002
    Location: Civitas Quinque Ecclesiae HU
    Thanks! Much, much better. This is the closest Thief has looked to the way I remembered it since... about 2000.
    TRV and AVTHENTIC!

  4. #29
    Well, I looked at the shader carefully and seems you can manually change the gamma editing this value: "float qGamma =.68". I set it to .18 so the ingame gamma is actually useful, if you need more darkness.

    I'm also using one of Retroarch's shaders ported to Reshade, GTU, to add a little bit of blur and blending effect, at the lack of knowing how to make a CRT shader look good for the scanlines. Check them out here: https://github.com/Matsilagi/reshade-retroarch-shaders
    Last edited by Taffingtaffer; 27th Jul 2020 at 07:16.

  5. #30
    Member
    Registered: Nov 2003
    Location: uʍouʞu∩
    This is pretty awesome. Just tested it out on one of my FMs.

    Here's a video of it.

  6. #31
    Member
    Registered: Nov 2001
    Location: Sunny Finland
    Quote Originally Posted by Taffingtaffer View Post
    "float qGamma =.68". I set it to .18
    Whatever works, but lowering qGamma may still leave low-lit areas pure black.

    If too dark, try changing the number on the line
    Code:
    float3 hsv = rgb2hsv(saturate(vColor.xyz - .02));
    from .02 to .01, or to 0.

  7. #32
    Member
    Registered: Aug 2009
    Location: thiefgold.com
    Quote Originally Posted by Kupildivan View Post
    I found DGVOODOO that can launch the game in 16-bit mode, and not only this game.
    Didn't work for me. The executable gives the option to adjust the colour saturation, but that's it (I extracted the DLL's into the game directory as instructed, both x64 and x86 to be safe)



  8. #33
    New Member
    Registered: Sep 2017
    Quote Originally Posted by Azaran View Post
    Didn't work for me. The executable gives the option to adjust the colour saturation, but that's it (I extracted the DLL's into the game directory as instructed, both x64 and x86 to be safe)
    In Thief's directory there are files cam.cfg and cam_ext.cfg.
    Cam.cfg must have these lines changed or 16-bit mode won't work:

    force_32bit 0
    game_screen_depth 16
    And my cam_ext.cfg contains only these 4 lines:

    mipmap_mode 2
    tex_filter_mode 16
    SlowFrame 16
    new_mantle
    Of course it slows down FPS because dgVoodoo is some kind of old videocard emulator.

  9. #34
    Member
    Registered: Feb 2012
    Location: Russia
    Video looks real nice with ESRGAN pack. Old-school but detailed.

  10. #35
    Member
    Registered: Mar 2020
    Location: London, UK
    Is it possible just to use the re-shade function for the better contrast? Not a fan of the faux 8bit.

  11. #36
    New Member
    Registered: Mar 2013
    Location: Mexico
    Thanks for the shader! It looks very accurate to software mode, but now I can play it with NewDark fixes.

  12. #37
    Member
    Registered: May 2008
    Location: Southern,California
    hey gort i saw in mission you at one point saw dewdrop under a bench by any chance did the shader work to make dewdrop look 8-bit also if so can i get a video of a close up of him

  13. #38
    Posting the second version of jermi's shader just in case, since the OP isn't updated and the link with the .zip is down. Save it on a file named cc.fx

    Code:
    // Emulate TDP software rendering.
    
    static const float3 LUMINANCE_VECTOR = float3(0.2125, 0.7154, 0.0721);
    
    float g_fGamma;
    float g_fSaturation;
    float g_fContrast;
    float g_fBrightness;
    float4 g_fColorFilter;
    float2 g_fScreenSize;
    
    // the frame texture
    sampler s0 : register(s0);
    
    /*
     * RGB <-> HSV conversion by Ronja Böhringer.
     * https://creativecommons.org/licenses/by/4.0/
     */
    
    float3 hue2rgb(float hue) {
        hue = frac(hue); //only use fractional part
        float r = abs(hue * 6 - 3) - 1; //red
        float g = 2 - abs(hue * 6 - 2); //green
        float b = 2 - abs(hue * 6 - 4); //blue
        float3 rgb = float3(r,g,b); //combine components
        rgb = saturate(rgb); //clamp between 0 and 1
        return rgb;
    }
    
    float3 hsv2rgb(float3 hsv)
    {
        float3 rgb = hue2rgb(hsv.x); //apply hue
        rgb = lerp(1, rgb, hsv.y); //apply saturation
        rgb = rgb * hsv.z; //apply value
        return rgb;
    }
    
    float3 rgb2hsv(float3 rgb)
    {
        float maxComponent = max(rgb.r, max(rgb.g, rgb.b));
        float minComponent = min(rgb.r, min(rgb.g, rgb.b));
        float diff = maxComponent - minComponent;
        float hue = 0;
        if(maxComponent == rgb.r) {
            hue = 0+(rgb.g-rgb.b)/diff;
        } else if(maxComponent == rgb.g) {
            hue = 2+(rgb.b-rgb.r)/diff;
        } else if(maxComponent == rgb.b) {
            hue = 4+(rgb.r-rgb.g)/diff;
        }
        hue = frac(hue / 6);
        float saturation = diff / maxComponent;
        float value = maxComponent;
        return float3(hue, saturation, value);
    }
    
    float4 SatGammaPS(in float2 uv : TEXCOORD0, uniform int bDoSat, uniform int bDoGamma, uniform int bDoContrBright) : COLOR
    {
         float4 vColor = tex2D(s0, uv);
         float levels = 16.0;
         float qGamma = .68;
         float3 hsv = rgb2hsv(saturate(vColor.xyz - .02));
         hsv.z = pow(hsv.z, qGamma);
    
         if (hsv.x > .02 && hsv.x < .3 && hsv.z < .3) {
    	  /*
    	   * There's a bunch of brown-ish colors in TDP global
    	   * palette, so these colors have more levels, and some hue
    	   * errors.
    	   */
              levels *= 1.48;
              float f = floor(hsv.z * levels);
              f = fmod(f, 3.0) - 1.0;
              hsv.x += f * .05;
              hsv.x = frac(hsv.x + 1);
         }
         hsv.z = floor(hsv.z * levels) / levels;
         hsv.z = pow(hsv.z, 1.0 / qGamma);
         hsv.y *= lerp(1, pow((1.0-hsv.z), 2.0), .5);
         vColor.xyz = hsv2rgb(saturate(hsv));
    
         float lumi = dot(vColor.xyz, LUMINANCE_VECTOR);
         vColor.xyz = lerp(lumi.xxx, vColor.xyz, g_fSaturation * 1.4) * g_fColorFilter.xyz;
         vColor.xyz = saturate(vColor.xyz * g_fContrast * 1.5 + g_fBrightness);
    
         if (bDoGamma)
         {
              vColor.xyz = pow(vColor.xyz, g_fGamma);
         }
    
         return vColor;
    }
    
    // apply saturation/color filter, brightness/contrast and gamma
    technique TeqBrSatGamma
    {
         pass P0
         {
              PixelShader = compile ps_3_0 SatGammaPS(1, 1, 1);
         }
    }
    
    // apply brightness/contrast and gamma
    technique TeqBrGamma
    {
         pass P0
         {
              PixelShader = compile ps_3_0 SatGammaPS(0, 1, 1);
         }
    }
    
    // apply brightness/contrast and saturation/color
    technique TeqBrSat
    {
         pass P0
         {
              PixelShader = compile ps_3_0 SatGammaPS(1, 0, 1);
         }
    }
    
    
    // apply saturation/color filter and gamma
    technique TeqSatGamma
    {
         pass P0
         {
              PixelShader = compile ps_3_0 SatGammaPS(1, 1, 0);
         }
    }
    
    // apply only gamma
    technique TeqGamma
    {
         pass P0
         {
              PixelShader = compile ps_3_0 SatGammaPS(0, 1, 0);
         }
    }
    
    // apply only brightness/contrast
    technique TeqBr
    {
         pass P0
         {
              PixelShader = compile ps_3_0 SatGammaPS(0, 0, 1);
         }
    }
    
    // apply only saturation/color
    technique TeqSat
    {
         pass P0
         {
              PixelShader = compile ps_3_0 SatGammaPS(1, 0, 0);
         }
    }
    
    // plain copy
    technique TeqCopy
    {
         pass P0
         {
              PixelShader = compile ps_3_0 SatGammaPS(0, 0, 0);
         }
    }
    Last edited by Taffingtaffer; 11th May 2023 at 10:51.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •