Help save net neutrality! Learn more.

Activity for Ian

  • Ian Ian committed [r679]

    Shift fog maths to fragment shader to fix bug in virtua on.

  • Ian Ian committed [r678]

    The vertex shader is run before clipping is done. If fogging values are calculated and clamped in the vertex shader it can interpolate bad values, since the range has been truncated. This happens if the polys overlap the near plane. The solution to clamp the values in the fragment shader. This fixes a bunch of fogging errors I long thought were transparency related errors in the ocean hunter.

  • Ian Ian committed [r677]

    Fixed shading also works with untextured polys. Fixes some shading issues in La machineguns. (Harry Tuttle)

  • Ian Ian committed [r676]

    Update step 1.5 luminous logic with Harry's findings. Fixes various shading issues.

  • Ian Ian committed [r675]

    Finish the hash function (Harry Tuttle)

  • Ian Ian committed [r674]

    Remove fixed shading check from specular.

  • Ian Ian committed [r672]

    Star wars is the only game to pass unsigned fixed shaded values (per vertex brightness) to the renderer. Originally we thought that the specular flag would turn on unsigned values since it's the only game to set specular with these polys, but this logic turned out to be incorrect. The JTAG interface seems to config the GPU to turn on this functionality. (Harry Tuttle)

  • Ian Ian committed [r671]

    update visual studio project

  • Ian Ian committed [r670]

    update spotlight code (Harry Tuttle)

  • Ian Ian committed [r667]

    add missing header

  • Ian Ian committed [r665]

    Fix the sky in one of the levels in virtua on. The problem was caused by the fact we didn't split the mesh by the fog % burn through, so all the polys had the same value. We could use a vertex attrib, but % burn through fog is so rarely used and when it is, normally every poly in the mesh has the same value.

  • Ian Ian committed [r663]

  • Ian Ian committed [r662]

    update project files

  • Ian Ian committed [r661]

    work around for visual studio bug

  • Ian Ian committed [r660]

    fix missing header

  • Ian Ian committed [r659]

    cannot specify explicit initializer for arrays - fix for visual studio

  • Ian Ian posted a comment on ticket #41

    I'll update it when I have a bit of time :)

  • Ian Ian committed [r647]

    Calculating the length of the vertex results in quite broken values for fogging when the vertices are traversing the view frustum. The hardware also wouldn't have been doing a square root per vertex for fogging. Simply using the z values is enough. Todo check clamping of values for the near/far planes.

  • Ian Ian committed [r646]

    add interface for sun clamp

  • Ian Ian committed [r645]

    Optimise vertex data to cut down on unnecessary copying

  • Ian Ian committed [r644]

    Modern hardware does backface culling in window space by calculating the face normal for the polygon, then doing a dot product against the view vector. The real3d pro-1000 on the other hand passes a pre-calculated face normal for each polygon which is used for culling. We were using this face normal to rewind the polygons so that regular backface culling would work. This worked 99.9% of the time. However this was failing on some models in Virtua Striker. The reason was because the pre-calcula...

  • Ian Ian committed [r642]

    Changed fixed shaded logic for step 1.5 hw based upon Harry's findings

  • Ian Ian committed [r641]


  • Ian Ian committed [r640]

    Harry made some important discoveries with regards to fixed shading on the model 3 (per vertex poly brightness values). Firstly values are allowed to be negative, and they are used as a drop in replacement in the standard lighting equation for the normal dot light vector. This quite radically changes the brightness in LA Machine guns, but now correctly matches the arcade.

  • Ian Ian committed [r636]

    Finish fixed shading for 2.0 hardware. I'm pretty sure it actually works identically to step 1.5 hardware. The oddball is LA machine guns where the viewport ambient doesn't seem to effect the brightness. But the ambient works differently in this game because it uses the unclamped light model. Still need to investigate if the diffuse factor effects fixed shading.

  • Ian Ian committed [r635]

    With fixed shading, when lighting is disabled, fixed shading appears to be a flat shaded version based upon the poly colour, instead of per vertex attributes.

  • Ian Ian committed [r634]

    Pad struct and align on 4 byte boundary.

  • Ian Ian committed [r633]


  • Ian Ian committed [r632]

    fixed shading doesn't effect the alpha channel

  • Ian Ian committed [r631]

    Fixed shading (per vertex poly colours) on step 1.5 hardware have the viewport ambient value added to them. This fixes various shading on scud. To do this had to switch the maths to the vertex shader.

  • Ian Ian committed [r630]

    Fix attribute locations. glBindAttribLocation must be called linking

  • Ian Ian committed [r628]

    make the new3d engine default :] Legacy engine can still be selected using -legacy3d in the command line

  • Ian Ian committed [r627]

    use generic vertex attributes

  • Ian Ian committed [r626]

    Technically matrix casts are only allowed in glsl 1.2 and later

  • Ian Ian committed [r625]

    Remove debug code

  • Ian Ian committed [r624]

    Sometime ago I managed to work out that specular on the model3 is not real specular, and really is just an extension of diffuse lighting. But attempts were derailed by corner cases and the fact we were not handling the normals correctly. Anyway Harry managed to successfully come up with an algorithm, and coefficients that give an almost perfect match to specular on the model3, based soley on observations from video footage! He also worked out that the lighting on hardware 1.5 onwards appears ...

  • Ian Ian committed [r623]


  • Ian Ian committed [r622]

    Add the unclamped light model we know exists to the shaders.

  • Ian Ian committed [r621]

    Ski champ for some reason is passing denormalised numbers for the modelscale. This is causing a NaN in our shader killing the lighting for these models, so we simply skip these, since they are essentially zero anyway. Thanks to Harry for finding this bug :)

  • Ian Ian committed [r620]

    We were force normalising the result of matrix * normal, which looked correct in most cases. But this didn't preserve the scaling of the matrix, or the scaling of the model normals which resulted in many over bright areas. On it's own this generally worked, but games like Star Wars looked quite broken. Harry correctly figured out if you scale these normals by the scaling value that is sometimes present in the culling nodes the lighting looks correct. Still more work to do to correctly figure ...

  • Ian Ian committed [r619]

    Implement unclamped light model based upon Harry's findings. Unknown how this is turned on/off.

  • Ian Ian committed [r618]

    Use c++11 raw string literals

  • Ian Ian committed [r617]

    Clamp the ambient light to a max of 0.75. LA Machine guns seems to use an ambient value of 1, which is full bright for everything. But for some reason the hardware seems to treat this as ~ 0.75. This fixes various missing shading in the game. This doesn't seem to have any negative effects on other games I have tested. Clamping in the shader as we might need the full range of values for fixed shading.

  • Ian Ian committed [r616]

    remove WIP code

  • Ian Ian committed [r615]

    convert sun angle coordinate system outside of the shader

  • Ian Ian committed [r614]

    A second go at fixing the fixed lighting in star wars .. Fixed shading is per vertex poly colours. For some reason in star wars they are treated as unsigned values instead of signed, like in every other game. These polys are all marked with specular enabled, where as in the rest of the games they are missing this flag. That's the only difference I can find.

  • Ian Ian committed [r613]

    fix double offset

  • Ian Ian committed [r612]

    Revert previous fixed shading changes. Implement new logic for fixed shading on step 1.5 hardware based upon Harry's findings.

  • Ian Ian committed [r611]

    remove debug code

  • Ian Ian committed [r610]

    Fix the fix shading in star wars. Fixed shading still needs some work for mag truck and dirt devils to match the arcade.

  • Ian Ian committed [r609]


  • Ian Ian committed [r608]

    Tweak scroll fog logic again .. should fix missing 2d fogging in Spikeout.

  • Ian Ian committed [r607]

    rewrite scroll fog logic

  • Ian Ian committed [r606]

    Remove debug code

  • Ian Ian committed [r605]

    minor culling node optimisations

  • Ian Ian committed [r604]

    don't need cast, conversion is implicit

  • Ian Ian committed [r603]

    better state handling

  • Ian Ian committed [r602]

    parse out some culling node values

  • Ian Ian committed [r601]

    There are 2 bits in the polyheader labelled dis...

  • Ian Ian committed [r600]

    The real3d has a flag that allows the hw to ski...

  • Ian Ian committed [r598]

    light parameters must be clamped (HarryTuttle)

  • Ian Ian committed [r597]

    Virtua fighter has a few massive polys that sho...

  • Ian Ian committed [r595]

    remove unused variable

  • Ian Ian committed [r589]

    add missing include

  • Ian Ian committed [r585]

    add missing include

  • Ian Ian committed [r580]


  • Ian Ian committed [r579]

    Daytona seems to use this completely undocument...

  • Ian Ian committed [r572]

    more whitespace ..

  • Ian Ian committed [r571]

    white space ..

  • Ian Ian committed [r570]

    Cache dereferenced values. Cuts loading time fr...

  • Ian Ian committed [r567]

    Rewrite the spot light code, and implement the ...

  • Ian Ian committed [r559]

    compile fixes

  • Ian Ian committed [r558]

    MSYS2 compile fix (HarryTuttle)

  • Ian Ian committed [r557]

    Replace glsl 3 function. Apparently this doesn'...

  • Ian Ian committed [r556]

    fix compile warnings

  • Ian Ian committed [r552]

    don't ask

  • Ian Ian committed [r551]

    fix project files

  • Ian Ian committed [r550]

    fix multiple default constructors

  • Ian Ian committed [r549]

    add missing include

  • Ian Ian committed [r540]

    The mipmap data in some games seems to being se...

  • Ian Ian committed [r539]

    Just use 1 hash map for the textures, instead o...

  • Ian Ian committed [r538]


  • Ian Ian committed [r537]

    calculate the correct number of mipmap textures

  • Ian Ian committed [r536]

    Originally to do mipmapping, I just used the ba...

  • Ian Ian committed [r534]

    use 32bit types

  • Ian Ian committed [r531]

    fix scissor code for native resolution (thanks ...

  • Ian Ian committed [r530]

    remove debug code

  • Ian Ian committed [r529]

    The model3 has this weird issue where the 2d an...

  • Ian Ian committed [r528]

    Texture coordinates seem to be scaled relative ...

  • Ian Ian committed [r527]

    Change microtexture scaling values. Seem to muc...

  • Ian Ian committed [r526]

    More fixes to microtexture coordinates. They go...

  • Ian Ian committed [r525]

    Fix microtexture texture coordinates (thanks Ha...

  • Ian Ian committed [r524]

    fix the bad projection matrix in dirt devils an...

  • Ian Ian committed [r523]

    The hardware actually seems to treat the quad p...

  • Ian Ian committed [r522]

    Support high priority polygons. They are treate...

  • Ian Ian posted a comment on ticket #14453

    I have the same issue

  • Ian Ian committed [r521]

    Add high priority poly function. Used by harley.

  • Ian Ian committed [r520]

    When the translator map?? bit is enabled the co...

  • Ian Ian committed [r519]

    Put a check in there, in case near values come ...

  • Ian Ian committed [r518]

    Dynamically calculate near/far frustum planes f...

1 >