1. Welcome to VRCat! Please note that this message board is not related to VRChat in any official manner. It is run entirely by the community, and moderated by the community. Any content present has not been reviewed by VRChat moderators or staff. Your use of these forums implies understanding of this message. Thanks!
    Dismiss Notice

Avatars Retro Sprite Shader

Discussion in 'Tutorials and Tools' started by error.mdl, Aug 10, 2018.

  1. error.mdl

    error.mdl New Member

    Joined:
    Nov 30, 2017
    Messages:
    9
    Likes Received:
    19
    VRChat:
    error.mdl
    Simple shader that emulates the behavior of directional sprites from many mid-90's pseudo-3d games (Wolfenstein, Doom, Hexen, Duke Nukem, Daggerfall, Marathon, etc.)

    heMkij4.gif

    The shader rotates a quad about its Y-axis to face the player, and displays the correct texture for the viewing angle. It can do sprite sheet animations that either animate automatically based on a framerate or can be manually animated through the frame number.

    The shaders can be found in Error.mdl/Retro Sprites/. There are three directional variations (8, 4, and 1) and two opacity variations (cutout and transparent).

    The shader should be applied to a quad that faces forward along the Z-axis. For convenience, an fbx of such a quad is included. Unity's quad primitive also works, but it faces along the negative Z direction so the textures will be mirrored.

    When scaling the quad, keep the x and z scales equal. Otherwise, the sprite will grow and shrink as it rotates.

    Download:
     
    #1 error.mdl, Aug 10, 2018
    Last edited: Aug 14, 2018
    shotariya and Splinks like this.
  2. error.mdl

    error.mdl New Member

    Joined:
    Nov 30, 2017
    Messages:
    9
    Likes Received:
    19
    VRChat:
    error.mdl
    Why is this still awaiting moderation?