WebGL 2: Texture Atlases or Sprite Sheets (Textures Part 3)

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ธ.ค. 2024

ความคิดเห็น • 9

  • @bartoszkrupa5354
    @bartoszkrupa5354 23 วันที่ผ่านมา

    I came here to check something about UBO and lightning, but your materials are so good that I decided to watch everything from the very beginning. Great work and pleasure to listen to you.

  • @gnorts_mr_alien
    @gnorts_mr_alien 2 ปีที่แล้ว +5

    amazing stuff. intermediate info nobody bothers to share, so hard to find.

  • @pratnama
    @pratnama 11 หลายเดือนก่อน +1

    mipmaps is very boring to keep a video size standard line 720p 1080p etc....
    thanks Andrew for your nice tutorials, very helpful

  • @cliffearl7483
    @cliffearl7483 ปีที่แล้ว

    Really awesome stuff. I think a logical progression would to be to demonstrate how to anchor the sprites by their center, rotate, and scale them. That'd pretty much form the base for a WebGL2 2D engine. Also, I can;t figure out that stuff for myself :D

  • @roblouie5604
    @roblouie5604 2 ปีที่แล้ว

    Greatly appreciate these as always. However, I feel like something is surely missing here. Using a texture atlas like this, I cannot see any good path forward for custom tiling of a given texture. If I work with individual textures, tiling(aka repeating) a texture is trivial. If I make my uvs span from 0 to 2, I get 2 repeated tiled textures within my one triangle. This functionality is an absolute requirement for large geometry, landscapes, etc. However with texture atlases this seems impossible, which makes me think most engines must surely just swap out textures when drawing? If there's something here I'm just missing I'd love to know. Will keep googling and playing around as well.

    • @roblouie5604
      @roblouie5604 2 ปีที่แล้ว

      So, I actually asked this on SO. Was told that for repeating textures, use a texture array (which your next video covers :)). For non-repating stuff like sprites, character skins, ui elements, etc, make use of atlases. So, I'm going with that.

    • @osakaandrew
      @osakaandrew  2 ปีที่แล้ว

      @@roblouie5604 Glad you found more info on this. Really, I think it helps to look at texture atlases as as a specialized tool. Specialized tools tend to get used a LOT in some situations and rarely everywhere else -- but when they are used in those rare cases, it may be to solve a particular problem. So they'll be used a lot in falling tile games, or top-down 2D games (stardew valley for example). In all these examples, the geometry will always be "quad". But for complex 3D shapes, think about how you would deal with an object that has blinking lights (an airport, and airplane, a space ship, etc). Using a texture atlas here helps by removing an extra draw call you might have to make for these "extras".

  • @jakubwegrzyn3798
    @jakubwegrzyn3798 2 ปีที่แล้ว

    Great tutorial, thank you for making it :)

  • @konstantinbondarenko5235
    @konstantinbondarenko5235 ปีที่แล้ว

    Thank you so much