Commit graph

85 commits

Author SHA1 Message Date
Ian Curtis c499e6640c fixed shading code 2016-04-29 23:03:46 +00:00
Bart Trzynadlowski 57d5bc8367 Legacy engine: preliminary per-vertex fixed shading. Only limited testing with LA Machineguns (appears to work), Sega Rally 2 (appears okay), and Scud Race (fixes expert course bridge but not other mis-colored polygons). 2016-04-29 03:56:06 +00:00
Bart Trzynadlowski 34e8f00382 Legacy engine: extracting fixed shading component (but still can't use it because unsure of how to activate) 2016-04-28 13:18:15 +00:00
Ian Curtis 09e27e3082 color flag 2016-04-27 16:42:31 +00:00
Ian Curtis 8f6ab2fcf9 simplify 2016-04-27 08:13:22 +00:00
Bart Trzynadlowski c0ec610e99 Polygon header bit analysis code (need to #define DEBUG and use -gfx-state option) 2016-04-27 04:09:50 +00:00
Bart Trzynadlowski 3682ab7300 Updated polygon header description with double-sided bit (forgot it in last update!) 2016-04-26 23:06:40 +00:00
Bart Trzynadlowski 85a77bb016 Added an updated description of the polygon header to the top of Legacy3D/Models.cpp 2016-04-26 23:04:11 +00:00
Ian Curtis 3e8439c09c fix model normals, add code for fixed shading, as of yet flag to turn it on is unknown 2016-04-26 09:06:48 +00:00
Bart Trzynadlowski b730fc466c Legacy engine: vertex normals are standalone and do not need to be added to polygon normal 2016-04-26 00:12:02 +00:00
Bart Trzynadlowski 908d979cd7 Flattened out nested if-statements in new engine's fragment shader to improve compatibility with older GPUs (e.g., NVS 300) 2016-04-22 23:46:49 +00:00
Ian Curtis 58d187e59a parse viewports in normal order 2016-04-19 22:05:12 +00:00
Ian Curtis df9fefd064 walk siblings before children, fixes some of the transparency drawing issues in ocean hunter 2016-04-18 22:25:05 +00:00
Ian Curtis 057ee94210 simplify 2016-04-18 14:06:10 +00:00
Ian Curtis a5301efed6 avoid cast warning 2016-04-17 00:02:16 +00:00
Ian Curtis c4dc96ef71 simplify list code 2016-04-17 00:00:51 +00:00
Bart Trzynadlowski 34d4d8981d Fixed 8-bit texture decoding in legacy 3D engine. Contour mode/alpha still needs to be made consistent (as much as possible) with new engine. 2016-04-15 04:26:42 +00:00
Ian Curtis f52cb3c491 tweak frustum planes 2016-04-08 23:29:31 +00:00
Bart Trzynadlowski 22907b033f Fixes for non-Windows builds: Makefile updated and fixed header files in Vec.cpp 2016-04-05 04:30:52 +00:00
Ian Curtis 5f68544641 revert viewport code 2016-04-04 10:50:05 +00:00
Ian Curtis ecea4cad56 change tex format 4 2016-04-04 10:21:34 +00:00
Bart Trzynadlowski 38d5d14157 Clamping diffuse+ambient light intensity to 1.0 (legacy engine) 2016-04-04 04:32:10 +00:00
Bart Trzynadlowski faf5f9cf48 Added a comment about viewports 2016-04-04 04:31:26 +00:00
Bart Trzynadlowski 6d9426759b Fixed texture enable bit (fixes Star Wars light sabers and Sega Rally 2 cones) and added a hack for (and more comments about) color modulation. Scud Race, Sega Rally 2, LA Machineguns, etc. look correct now, but Fighting Vipers 2 shadows are no longer dark enough. Other bugs may exist. 2016-04-04 03:50:24 +00:00
Bart Trzynadlowski 1d4f5c871d Fixed Types.h include 2016-04-04 03:43:55 +00:00
Ian Curtis d155fbd6e4 rgb values were swapped for paletted colours 2016-04-03 23:21:50 +00:00
Ian Curtis 3bc2794b0a Use the correct texture enable bit 2016-04-03 16:10:40 +00:00
Bart Trzynadlowski 3c8352f4ca Added a comment: observation of Star Wars and Scud Race color modulation issues. 2016-04-03 04:09:06 +00:00
Ian Curtis 688af26846 Possible work around for slightly incorrect viewport positions in ECA and harley 2016-04-02 22:13:59 +00:00
Ian Curtis c7412828d4 Use proper texture wrapping mode for 2d. Stops garbage down the top and left sides. Should really use NPOT texture. 2016-04-02 12:23:46 +00:00
Ian Curtis 7e7847bc83 Allow asymmetric projection matrices. Fixes a bunch of missing effects and bad camera angles in harley. 2016-03-31 09:27:42 +00:00
Ian Curtis aee89390ba add LOD table data. Maybe we can get clipping planes out of these 2016-03-28 20:11:46 +00:00
Ian Curtis e79b241a49 properly mark dynamic meshes as such 2016-03-28 19:58:36 +00:00
Ian Curtis e1278f4451 allow 8 bit mono textures to be contour textures, fixes a bunch of missing transparency in harley la riders 2016-03-27 08:39:40 +00:00
Ian Curtis ffaed8ae32 clear the rom mesh buffer 2016-03-26 22:48:51 +00:00
Ian Curtis 4992e59673 Cache rom models, for better performance. 2016-03-26 22:44:26 +00:00
Ian Curtis 8488f22ac5 2016-03-24 13:26:28 +00:00
Ian Curtis 0327db246f WIP 2016-03-24 13:17:17 +00:00
Ian Curtis 23172c9aec fix for bad matrix with NaN 2016-03-23 01:05:02 +00:00
Ian Curtis f031e5d095 finish front/back face culling code based on matrix determinant. Optimised opengl to avoid redundant state changes. 2016-03-22 23:39:59 +00:00
Ian Curtis 8ea5978093 fix parenthesis error 2016-03-22 21:59:51 +00:00
Ian Curtis e7eb912eaa add maths functions 2016-03-22 13:47:28 +00:00
Ian Curtis 93f6b01e0b Update project to vs 2013. Clean compile warnings 2016-03-22 12:30:23 +00:00
Ian Curtis ce99c47f8a Remove double copy of shaders 2016-03-22 11:40:24 +00:00
Bart Trzynadlowski 3627213577 Fixed compiler warnings, whitespace, and moved local variable declarations to site of assignment 2016-03-22 03:43:31 +00:00
Bart Trzynadlowski 3afe3cf1a7 Moved 2016-03-21 23:27:30 +00:00
Bart Trzynadlowski d61b01ab6f Removing legacy 3D engine files that were already moved to Graphics/Legacy3D 2016-03-21 23:12:17 +00:00
Bart Trzynadlowski 34301e97e1 Adding new 3D engine by Ian Curtis. Old engine moved to Graphics/Legacy3D/. 2016-03-21 04:10:14 +00:00
Bart Trzynadlowski f1e93bcd8f - Fixed Win32 GCC Makefile.
- Reverted Nik's polygon palette index change in Models.cpp. Subtracting 1 was breaking Scud Race.
- Added an explicit typecast in Inputs.cpp, which GCC requires for some reason.
2012-07-16 02:27:55 +00:00
Nik Henson 183dca563d Committing various small updates that have been hanging around in my source tree for a while now:
- Added 'crosshairs' command line and config option.
- Added 'vsync' command line and config option (so far only tested on NVidia cards on Windows 7 - other graphics drivers, O/Ss or driver settings may simply chose to ignore this).
- Added fullscreen toggle within game using Alt+Enter key combination.
- Added framework for lamp outputs and 'outputs' command line and config option.  So far only the lamps for driving games are hooked up in the emulator (others to be added later).
- Added an initial outputs implementation for Windows that sends MAMEHooker compatible messages (-outputs=win to enable)
- Fixed fps calculation in Main.cpp that was producing incorrect results and so giving the impression that frame throttling wasn't working properly when in fact it was.
- Fixed palette indexed colours as the index was always off by one, causing incorrect colours in various games, eg drivers' suits and flashing Start sign in Daytona 2.
- Altered caching of models so that models with palette indexed colours use the dynamic cache rather than the static one.  This is so that changes in palette indexed colours appear on screen, eg the flashing Start sign on the advanced course of Daytona 2 (although currently the START message itself is not visible due to other problems with texture decoding).
- Fixed small bug in TileGen.cpp which meant both palettes were being completely recomputed pretty much with every frame.  This was a significant performance hit, particularly as palette recomputation is currently being done in SyncSnapshots (it should be moved out of here at some point, although for now it's no big deal).
- Made sure all OpenGL objects and resources are deleted in Render2D/3D destructors, in particular the deleting of the VBO buffer in DestroyModelCache.
- Made sure that GLSL uniforms are always checked to see if they are bound before using them in order to stop unecessary (but harmless) GL errors.
- Altered the default texture sheet handling to use a single large GL texture holding multiple Model3 texture sheets rather than multiple GL textures as before (if required, the old behaviour can still be selected with the mulisheet fragment shader).  I believe this fixes the disappearing crosshairs/corrupt GL state problem which the multisheet fragment shader seemed to be triggering somehow.
- Fixed a bug in debugger which meant memory watches were not triggering properly
2012-07-15 21:04:46 +00:00