Math for Game Developers - Lambertian Surfaces

Поделиться
HTML-код
  • Опубликовано: 11 окт 2024
  • Lambertian surfaces receive light according to Lambert's Cosine Law, which we can calculate using a dot product.
    Find the source code here: github.com/BSV...
    New video every Thursday. Question? Leave a comment below, or ask me on Twitter: / vinobs

Комментарии • 5

  • @Warman2410
    @Warman2410 8 лет назад +1

    Thank you so much, before tuning in I was unsure if I understood the law right, but now I fully get it!

  • @dougord7122
    @dougord7122 10 лет назад +1

    Merry Christmas man, You the bawm!

    • @jeremyh9841
      @jeremyh9841 7 лет назад

      happy christmas 2 years late

  • @GMLscripts
    @GMLscripts 10 лет назад

    I was initially confused by RemapVal() until I found it in the functions.si file. But then I saw Clamped() in there too. Why not use built-in GLSL function clamp()? Also, what the heck is Lerp(), ie. pow(x, log(flLerp) * -1.4427)?

    • @JorgeVinoRodriguez
      @JorgeVinoRodriguez  10 лет назад

      Oh I didn't know clamp() existed :) Lerp() is poorly named but it's a biased interpolation, 0.5 is linear, values like 0.2 or 0.8 would ease in or out.