• MorphOS Developer
    bigfoot
    Posts: 508 from 2003/4/11
    Quote:

    ernsteiswuerfel wrote:
    Thanks bigfoot, that was fast! Out of interest - what was the cause of the rear view mirrors glitch in Virtual GP 2?


    It was this entry in the changelog:
    Quote:

    - Fixed-function-as-shaders: Fixed alpha channel output from the vertex shader when GL_LIGHTING is enabled.


    To elaborate, when GL_LIGHTING is enabled, the alpha channel of the primary colour output of the lighting operation is taken from the alpha channel of the application-specified diffuse colour of material. I had initially overlooked this part, and thus my lighting calculations produced the wrong alpha value.

    And speculating from here on, I'm guessing that Virtual GP 2 mixes a rear view mirror colour together with the rendered scene based on the vertex colour's alpha channel, as generated by the OpenGL lighting computation, and with that alpha value being wrong, the blending factor was also wrong, and thus it probably only rendered the static rear view mirror colour.
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »21.12.22 - 11:35
    Profile Visit Website