Need help. Someone who understands bumpmapping and citro3d

Discussion in '3DS - Homebrew Development and Emulators' started by DiscostewSM, Oct 4, 2016.

  1. DiscostewSM
    OP

    DiscostewSM GBAtemp Guru

    Member
    5,009
    2,641
    Feb 10, 2009
    United States
    Sacramento, California
    So there's a trick to get the 3ds to use bumpmapping to imitate a 255-color paletted texture (not 256 because one entry is always 0 because of a 0-length normal calculation, but that can be used as a transparent entry), and it works, but I'm looking to further enhance it by forcing what I'd call "palette rotation" that would shift the colors to different entries when rendered, except without changing the color LUTs used or their order, nor the source bumpmapped texture. Instead, I would like to see if it can be done within a vertex shader, as I see I can adjust normals, the view, etc from within it on a per-vertex basis. Or, if it can be done in the geometry shader, that would be fine as well. Unfortunately, my tinkering has not given the kind of results I'm looking for, and because I'm not really fluent in lighting and especially bumpmapping, I don't know whether this thing I'm looking to do is even possible.

    Help would be appreciated. If you know how bumpmapping works on the 3ds, and have some understanding of the citro3d library, I can give you the test project I'm working with.
     
    Billy Acuña likes this.
  2. Billy Acuña

    Billy Acuña GBAtemp Addict

    Member
    2,053
    1,225
    Oct 10, 2015
    Mexico
    Bump because this sounds interesting.
     
  3. DiscostewSM
    OP

    DiscostewSM GBAtemp Guru

    Member
    5,009
    2,641
    Feb 10, 2009
    United States
    Sacramento, California
    Well, the application for it would, imo, really help with retro emulation. Various emulators are already using the GPU to render the graphics for them, but they require having to convert from their palette state to a direct-color state, which not only takes from the CPU, but also has to be reconverted each time the palette changes, which can happen mid-frame.