Jump to content


Sin City style post-process effect


  • You cannot reply to this topic
2 replies to this topic

#1 Methulah

    Senior Member

  • Members
  • PipPipPipPip
  • 727 posts

Posted 08 October 2005 - 10:09 PM

Hey all.
Do any of you know what would be involved to make a Sin City style shader for the Source (Haf-Life 2) engine? I'm afraid my knowlege of graphics programming is pretty shocking, but I can do some basic things in HLSL.

If anyone knows how this is done, or a tutorial that would allow me to do it, that would be fantastic.

(Note: For all you that didn't watch Sin City, first off, you should. It was awesome, and secondly, the effect is an almost grayscale, except that there is a little bit of color. Kind of like turning down the color setting on your TV to the lowest setting where you can still see color.)

('nother note: For those of you who have seen Sin City, I'm not fussed about the reds and yellows coming up as bright. All colors can be uniform.)
Django Merope-Synge :: django@white-epsilon.com
Lead Designer/Project Manager - White Epsilon

#2 kusma

    Valued Member

  • Members
  • PipPipPip
  • 163 posts

Posted 08 October 2005 - 10:55 PM

try calculating the luminosity of the color, and blend all three components with that.
should be something like this:

float lum = color.r * 0.299 + color.g * 0.587 + color.b * 0.114;
float3 diff = float3(lum, lum, lum) - color.rgb;
color.rgb += diff * t;

where t is a factor between 0 and 1 controlling how saturated the colors are. the color-weighting in the luminosity-calculations are accoding to NTSC.

#3 Methulah

    Senior Member

  • Members
  • PipPipPipPip
  • 727 posts

Posted 09 October 2005 - 04:57 AM

Right, I did some more research and found out that Source Engine has a DLL for all the post-process effects. I think that adding that would probably achieve the effect I want. If I get bored I might even have it so that when the player goes into bullet-time, the world is coloured normally. Thanks for your time.
Django Merope-Synge :: django@white-epsilon.com
Lead Designer/Project Manager - White Epsilon





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users