Skip to content

Color Material and Lighting limitations, VCL tooling, and general interest to revival of this project #26

@meisei4

Description

@meisei4

I am trying to start studying this project and have made an experimental branch https://github.com/meisei4/ps2gl/blob/experimentation_only (not planning to request merge, I just have it for studying so far) and I am finding some issues with Color behavior quite a lot.

I know that from this Issue: #11, the fix has been to add to the examples ColorMaterial enabling and Lighting as well, but I am trying to figure out how to get things working without Lighting or Material.


Lesson05 Behavior

I was able to get lesson05 working to what I think is expected to show up (but it still requiring lighting and material though):

Current main branch behavior: Image

Where two things happen:

  1. The Colors for the quad based cube are not set at a per face basis like they seem to be intended to (instead they are only attached per vertex, where unlike the Normals and Texcoords, there is no filling of the per vertex colors via any GetCurColor (something i will bring up later, and have tried to reconcile with CurMatColor, and CurGeomColor in some experiments i have added <- this is likely only introducing more complexity though compared to how i think OpenGL would expect this to work).

  2. After enough time the rotations result in the per vertex colors completely fading to black because they depend on the lighting.


Experiments fork

Here is my fork’s result after updating the two issues to allow for updating the Colors at a per vertex basis (still trying to figure out if this should be on Material or if it’s better as an actual Geometry attribute... it seems to cause issues with other tests like lesson02).

Code changes involve:

Image

intended Examples

I have also added two examples that I am trying to get working:

The unlit version relies on a very poor attempt at working backwards from general_pvc_diff_tri_vcl.vsm to make this microcode:
https://github.com/meisei4/ps2gl/blob/experimentation_only/vu1/proper_nolights_pv_color_vcl.vsm

That aims to get the RGBA data to just pass through without any lighting instructions. I spent a little bit too much time on this and kind of gave up because I am hoping I can be pointed towards better VCL tools... (or even any vsm examples that cover the most simple way to diagnose what registers are set up for RGBA when its a pass through and then also just how kInputQPerV works with the ordering of lanes when XferColors, XferNormals and everything is being passed

As you can see in the result, I am able to get Vertex data through, it is just that the Registers for loading in the correct RGBA data seem to be scrambling or reading from the wrong lanes or something and alignment is all wrong.


Contribution Interest

I would really like to help contribute to this project in light of the potential it has for raylib interfacing, but I am having trouble with the approach here and whether or not VU1 should be how this GL layer is done.

I will provide some links of the resources I have found just for documenting myself below (some I have tried, e.g. VCL Linux compiler, but having no luck with getting it to work, and it seems like many ps2sdk libraries no longer use VU microcode to draw things anymore).

Resources

very dense ps2 documentation: * http://lukasz.dk/playstation-2-programming/an-introduction-to-ps2dev/


I hope to come back to this, but I believe that I need to take a break and am hoping for potential review of the locations in the code I am trying to experiment with, to get any insight as to what the main design is intended to be here and what is the best way to begin reviving this project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions