herodoturtle 1 hour ago

It's pretty cool that someone can ask an interesting graphics-related question, and John Carmack of all people steps in to answer it. And then even Eric S. Raymond adds a comment further below.

  • parasti 55 minutes ago

    Fabien Sanglard isn't just someone.

Dwedit 5 hours ago

You might have heard about sRGB (the commonly used colorspace) not being linear, and that to get halfway between black and white (linear RGB of 50%), you get an sRGB value of around 74%.

But there is one place where sRGB is truly linear, and that is signal voltage for a CRT display. 50% of sRGB truly means 50% of signal voltage (between the minimum and maximum voltages).

tannhaeuser 3 hours ago

Hard to believe, but Nvidia, founded by former SGI engineers, was considered an entrepreneur and challenger of 3dfx, the dominant pioneer in PC 3D hardware 30 years ago.

Edit: see comments re founders

  • rob74 2 hours ago

    Yeah, 3dfx were the pioneers in the 3D graphics space, but because of various mistakes on their side (relying on their proprietary API and on add-on 3D cards for too long, alienating board partners by starting to build their own cards) and faster development by the competitors, Nvidia (and ATI) ate their lunch.

    • po1nt 2 hours ago

      Funny. Nvidia does the same thing today.

    • rasz 1 hour ago

      Didnt the board specifically push for vertical integration to chase those sweet downstream margins?

  • tverbeure 2 hours ago

    It was founded by 2 former Sun engineers and 1 LSI logic engineer.

  • trq01758 2 hours ago

    3dfx founders were ex Silicon Graphics, for Nvidia - Jensen worked at LSI and AMD, others were from Sun.

bni 30 minutes ago

I had a Nvidia RIVA 128 card before I bought a Voodoo 2 instead.

The Riva came with the OEM PC I got. I remember HL2 looked very washed out on it and being quite unhappy with that. Funny that the 3dfx "solved" it for me.

Cloudef 2 hours ago

Is there repost that's not on that garbage site?

  • cowlevel 1 hour ago
    • Cloudef 1 hour ago

      Thanks. Thought it would be more interesting though. This is literally what colorspaces are for.

      EDIT: I think there's a good point though that the game assets should be produced to the asset pipeline losslessly so that they can be transformed to the game's own internal colorspace(s) (depending what the renderer is doing, it can make sense to have multiple colorspaces for different calculations)

    • iririririr 7 minutes ago

      i thought nitter was dead?!?!

dcrazy 4 hours ago

I remember watching John document his education about linear color blending on Twitter. I believe it was when he was adding HDR to Rage. It was amazing to me that he had had such a blind spot for so long.

  • oblio 37 minutes ago

    If you read Masters of Doom and some of his blogposts/comments, you'll notice that he is laser focused in general, which also means that his blind spots are many :-)

    Where he does focus, though, he goes incredibly deep.

Luke2642 2 hours ago

I dream of a parallel timeline when OKLAB became the standard colourspace in 1980! It's a very colourful dream, the lightness stays consistent as the hues change, and colour interpolation just works!

  • fps-hero 1 hour ago

    Humans are too flawed with colour perception. I wish color were 2D, but much like music, it depends on what notes you play.

    It’s bad enough that monitors do not produce colour accuracy, or to the full gamut.

    Honestly, it’s the one thing Apple got right. Everyone in the creative industry runs Apple, and Apple had a consistency with color. Good luck getting your stuff approved if you produced it on Windows.

    • barrkel 1 hour ago

      Expecting a full gamut is unreasonable when you consider what it would mean: huge brightness for blue and red, artificial limiting of green.

      Our eyes are simply more sensitive to yellowish green. Any reasonable tech will have a gamut that is tented towards green.

  • barrkel 1 hour ago

    Oklab/oklch is good for consistent luminance across hue, but the real world gamut is so limited - our display / print tech is always able to make green/yellow far brighter than red/blue, for any given tech - it can be a little frustrating to use.

  • cccbbbaaa 38 minutes ago

    When it comes to colour spaces, there is no “one size fits all”. Perceptual colour spaces are good for, well, perceptual transformations, but many transformations ought to be done in a linear colour space, eg. exposure, color calibration and white balance adjustment, etc. This is how darktable operates (everything before the tonemapper is done in a linear colour space, everything after is done is a perceptual colour space such as JzAzBz or DT UCS 2022 [0], the latter being based on OKLab). And experience has shown that perceptual colour spaces can lead to issues: https://ansel.photos/en/news/color-controls-finally-correct/...

    [0] https://eng.aurelienpierre.com/2022/02/color-saturation-cont...

vessenes 5 hours ago

I'm so curious what John's AI startup is doing. I got to talk to him briefly right when he was launching, and I was excited to hear about what he's building. John, any recent updates?

nullc 3 hours ago

A lot of people today trying to 'be correct' and resample in linear space end up getting worse results either because of introducing banding from quarantining back to 8-bits or because the non-linear space resampling often happens to do something closer to the right thing thanks to human contrast-sensitivity function.

  • thrdbndndn 1 hour ago

    Human contrast sensitivity doesn't change the physics of light mixing/blending, which should always happen in linear space.

    I do agree with you on the quantisation issues when working in linear space without taking proper care, though.

anal_reactor 2 hours ago

A bit tangential, but in modern games with HDR I still get the fucking banding of dark colors.

Someone enlighten me what HDR actually does then.

  • cowlevel 1 hour ago

    mainly it confuses the heck out of everyone because some display industry association tried to tie it to absolute luminosity and then made HDR content way too bright or dark relative to everything around it

  • Cloudef 1 hour ago

    HDR is extra brightness on your display. In practice it's kind of a mess, as both the hardware and software implementation has to be good. If you have cheap display, you'll get something marketed as HDR even though it would look better with it turned off, as they likely use very big extra brightness zones, so it won't end up looking right. On software side, unless it's a console, the PC stack was not designed for HDR and it really takes co-operation of the whole stack to make it look correct on the display. For a while, for best result you had to basically bypass most of your display stack to get correct results. Valve's been working on it for their own platform, and wayland has some experimental support.

    EDIT: For TV, HDR works well assuming you don't have cheap TV.

rasz 4 hours ago

In numbers:

VGA default gamma y = 1 aka linear

3DFX default gamma y = 1.5

You might, like I did, think wtf is he talking about, default is linear and 3dfx bends it. But CRT monitors y = 2.2! When added up (multiply exponents) 3dfx is closer to linear output than ordinary VGA. You would still have to set 3dfx to 2.2 to get perfect linear output.

TLDR: Carmack is partially right. As he says even game developers were clueless. Nobody had to change their workflows. You could call glide grGammaCorrectionValue or even easier set DOS environment variable SST_GAMMA to 1 to get Exact same color mapping as ordinary VGA.

Why did 3dfx boost that? deffo not to get linear output, if they wanted linear they would set 2.2. Probably a Color twist on loudness war, brighter better, or maybe felt bad half the bits would get wasted (crushed into near blacks) in 16bit rendering.

  • superjan 4 hours ago

    Where was this applied in the 3dfx? In the analog output?

    • ack_complete 3 hours ago

      grGammaCorrectionValue() sounds like the DAC -- so during scanout.

      Which by itself isn't the worst, if you have a 24-bit framebuffer and sRGB read conversion. Without read conversion and going from 565 textures to 565 framebuffer with a 1.5 gamma... blecch. Checking the curves, the banding on the low end is worse than an Atari 2600!

cyberax 5 hours ago

Another interesting question: I remember getting a 3D accelerator (some Riva card?) and getting surprised how everything started looking reddish in Quake 2, compared to software rendering.

Does anyone know the reason for that?

  • nopurpose 3 hours ago

    I explained to myself at the time that it is because skybox light start to tint everything underneath it.

  • fredoralive 3 hours ago

    IIRC the software renderer in Quake 2 doesn't do coloured lighting.

  • Panzerschrek 2 hours ago

    Quake II uses old 8-bit approach in its software rasterizer, which isn't capable of applying colored lighting. It's a shame, that no progress was made since original Quake. Half-Life (also derived from Quake) did better job and supports colored lighting in software mode.

    In OpenGL mode colored lighting is there. But map designers overused it too much, especially in outdoor locations having yellow sky lighting, which looks somewhat depressive.

  • magicalhippo 29 minutes ago

    From what I can gather it's mainly a holdover from Quake[1] and the limited colors afforded by an 8-bit palette.

    The lightmaps and such support colored lighting, but by default the software renderer just used the max IIRC of the color channels as a monochrome light value.

    Just for giggles I recently had Claude rewrite the software renderer for Quake 2 to support true-color output and so could enable `sw_colorlight 1` when using the software renderer. Doing so results in the same reddish tint as the GL renderer, but with the software renderer aesthetics.

    I think you can set `sw_colorlight` to `1` even in the classic renderer, but it'll look quite bad due to the limited colors afforded by the 8-bit palette.

    Makes sense I guess, the plot takes place on Mars, so perhaps that's why they went heavy on the red-orange.

    edit: uploaded some screenshots to show the difference:

    Classic SW with `sw_colorlight 1`: https://imglink.cc/cdn/fv5Z3WB_aS.jpg

    True-color SW with `sw_colorlight 1`: https://imglink.cc/cdn/fx8prYfGs6.jpg

    [1]: https://quake.fandom.com/wiki/Colored_lightning