Ian Curtis
|
a5858e635d
|
To calculate the mipmap value the opengl needs to calculate the difference in the texture coordinates between adjacent pixels. If there are no adjacent pixels the hw may need to spawn invisible fragments outside of the visible polygon. Our algorithm was culling these out so the mipamp calculation failed for edge pixels. Anyway this fixes quad rendering looking broken with the latest nvidia drivers.
|
2019-12-10 11:40:39 +00:00 |
|
Ian Curtis
|
06688de5fc
|
Really should cull against 5 frustum planes.
|
2019-11-15 20:00:25 +00:00 |
|
Ian Curtis
|
06b43c45b3
|
Ocean hunter in the middle of the game is passing a few matrices with FLT_MAX inside them, which blows apart our near/far calculation. The hardware must have some method to sanitize the near/far for instance if you render something extremely close to the origin you will also blow apart any near/far calc.
|
2019-11-02 20:11:48 +00:00 |
|
Ian Curtis
|
714f6a123a
|
skip invalid culling nodes
|
2019-07-28 12:14:13 +00:00 |
|
Ian Curtis
|
17f4103123
|
A culling node must follow immediately after a viewport.
|
2019-07-26 16:39:58 +00:00 |
|
Ian Curtis
|
f634d19fdc
|
Fix shader. Why this worked on my nvidia card .. I'm not sure.
|
2019-01-24 19:11:26 +00:00 |
|
Ian Curtis
|
8094c2e2b7
|
Composite the alpha layers at the end of rendering. To do this we need to mask the alpha pixels with the opaque pixels from the next priority layer. Fixes some overlapping shadows in vf3tb that have different priority layers. I assume that was a game bug, but it works on the real h/w.
|
2019-01-21 14:30:42 +00:00 |
|
Ian Curtis
|
864bb36b5a
|
Technically backface culling should cull polys when the dot product = 0, since when it equals 0 the polys is perpendicular to the camera and thus invisible. When you complete sega rally2 (if you can get that far lol) the champagne is invisible. The reason is because all the face normals are 0. So when multiplied by the model matrix they are still 0 and get culled. Tweaking the condition to only cull polys when greater than 0 fixes this, and allows these 'bad' polys to render as they do on the model3.
|
2019-01-16 01:07:56 +00:00 |
|
Ian Curtis
|
6075352868
|
Optimise depth calculation for quad shader.
|
2018-11-27 20:43:27 +00:00 |
|
Ian Curtis
|
538a714086
|
Fade out microtextures with higher textures LODs. Fixes incorrectly applied microtextures in LA machineguns.
|
2018-10-23 00:16:23 +00:00 |
|
Ian Curtis
|
bf4d725970
|
Smooth texture repeat makes no sense for alpha/contour textures with pixel dilate. HW seems to treat them as non smooth anyway. Also implement some line of sight stuff, used by Scud. Really need to check the threading/synchronisation of the register reads but it basically works.
|
2018-10-19 20:59:46 +00:00 |
|
Ian Curtis
|
42eaa7f3d8
|
fix copy paste error :]
|
2018-10-14 10:05:24 +00:00 |
|
Ian Curtis
|
3eeec35e7c
|
Correctly emulate the real3d pro-1000 texture modes in our shader.
|
2018-10-13 13:29:45 +00:00 |
|
Ian Curtis
|
7bcc70a170
|
Update makefile
|
2018-10-01 17:42:45 +00:00 |
|
Ian Curtis
|
3dbfa73734
|
Both lemans24 and dirt devils are rendering some totally transparent objects as the first model in each viewport. The HW seems to skip these entirely, and including them breaks our near/far plane calculations leading to Z fighting.
|
2018-09-19 20:43:41 +00:00 |
|
Ian Curtis
|
e3255e45f3
|
Tweak the ratio for the near plane. Fixes missing text on the map indicator at the start of spikeout. The vertices are 0.003 units apart so a tonne of precision is required at the near plane to not depth test out.
|
2018-09-18 21:46:38 +00:00 |
|
Ian Curtis
|
c5b156d95d
|
remove debug code
|
2018-09-18 21:20:15 +00:00 |
|
Ian Curtis
|
5dab9910e2
|
avoid double matrix load
|
2018-09-16 08:43:13 +00:00 |
|
Ian Curtis
|
b5f9ad9651
|
Quad rendering engine. Set QuadRendering = 1 in the ini file to use, or -quad-rendering at the end of the command line to use.
|
2018-09-13 12:50:34 +00:00 |
|
Ian Curtis
|
e4f5f0bcaf
|
Sega bass fishing is starting some off the meshes with a shared vertex. Without having a previous vertex to share with, the values were just uninitialised and junk. The hardware itself seems to hold the value from the previous mesh, and sega bass fishing relies on this undefined behaviour to function correctly. Storing the cached vertices as member variables instead of locally to the function means it holds the values from the last mesh, and uses those values instead of random garbage.
|
2018-09-02 21:36:24 +00:00 |
|
Ian Curtis
|
c1c2dedcfa
|
remove dead variable
|
2018-08-09 21:57:51 +00:00 |
|
Ian Curtis
|
9f5a19a04a
|
Use correct PCI IDs (Harry Tuttle)
|
2018-07-09 08:06:06 +00:00 |
|
Ian Curtis
|
73ff32a10d
|
fix cast, and remove extra ; that had snuck into the shaders
|
2018-06-18 10:24:46 +00:00 |
|
Ian Curtis
|
f9be1259c0
|
Opaque polys definitely depth test with less than or equal. Virtua striker is drawing co-planar polys for the bar gfx
|
2018-06-17 11:30:01 +00:00 |
|
Ian Curtis
|
c7ffd0a808
|
Draw transparent polys to separate layers and composite at the end. This solves a tonne of transparency errors we had been battling with for a long time. The model3 is strange in the fact it only supports a max of two translucent overlapped polys. They are not blended into the frame normally. Doing this means the topmost translucent polys only are visible in the scene, the equivalent of doing a depth pass first, but without the added cost.
|
2018-06-16 21:31:29 +00:00 |
|
Ian Curtis
|
7497e3f1a6
|
forgot parentheses
|
2018-05-29 14:54:23 +00:00 |
|
Ian Curtis
|
f9f43ca66b
|
|
2018-05-28 12:55:13 +00:00 |
|
Ian Curtis
|
c1e0e3728b
|
optimise hash function and parse out transparency layer select bit
|
2018-05-28 11:59:48 +00:00 |
|
Ian Curtis
|
2af58f4352
|
select correct bit ..
|
2018-05-24 20:19:54 +00:00 |
|
Ian Curtis
|
8452d4c0ef
|
Parse out TranslucencyPatternSelect
|
2018-05-24 20:13:15 +00:00 |
|
Ian Curtis
|
4d275ba49e
|
Parse siblings after children. It's the only way to get Daytona water fall to look correct without h/w poly sorting.
|
2018-05-03 18:37:49 +00:00 |
|
Bart Trzynadlowski
|
3f9b1b76e5
|
Added a stretch mode (-stretch) and modified new renderer's viewport code (hopefully correctly) to handle aspect ratio correction and widening the way the legacy one does.
|
2018-05-03 03:46:44 +00:00 |
|
Ian Curtis
|
c6b86c0812
|
Render the opaque part of texture transparency in the first pass. Fixes numerous transparency related issues in lemans24 and some in ocean hunter. I don't really know if this is the 'correct' way of solving this because the real3d pro-1000 is a complete black box. There is still a lot we don't understand about how it handles transparency.
|
2018-05-02 20:10:02 +00:00 |
|
Ian Curtis
|
11a3cdbfd1
|
remove unnecessary copies
|
2018-04-24 13:51:53 +00:00 |
|
Ian Curtis
|
d21e71dced
|
work around for non working jtag code in star wars
|
2018-03-21 10:26:05 +00:00 |
|
Ian Curtis
|
b184ca3e1b
|
Clamping must be applied before the spotlight is applied on step 1.0 h/w.
|
2018-03-10 09:13:28 +00:00 |
|
Ian Curtis
|
8266eecabb
|
Parse out line of sight position. Only known to be used by scud.
|
2018-01-15 21:27:21 +00:00 |
|
Ian Curtis
|
99b5b9ba1b
|
make the logic a bit clearer
|
2018-01-15 14:40:59 +00:00 |
|
Ian Curtis
|
22a6166b82
|
fix Ian's bad maths :)
|
2018-01-15 13:08:39 +00:00 |
|
Ian Curtis
|
a1350d95a2
|
Update microtexture coordinate logic (Harry Tuttle)
|
2018-01-14 12:56:24 +00:00 |
|
Ian Curtis
|
863ea95013
|
simplify maths
|
2018-01-10 20:37:21 +00:00 |
|
Ian Curtis
|
adb5196625
|
comment out unneeded code
|
2018-01-10 16:12:33 +00:00 |
|
Ian Curtis
|
d708ce9ba2
|
top/bottom were swapped for off axis projection
|
2018-01-10 16:08:02 +00:00 |
|
Ian Curtis
|
6efa03112e
|
Rewrite projection maths based upon previously unknown viewport values. The previous values used roughly worked as the normals for frustum planes. Perhaps they were only used for culling and not actually rendering, as sometimes the values don't work correctly.
|
2018-01-08 18:35:42 +00:00 |
|
Ian Curtis
|
cc28d5f00e
|
Implement sub 8x8 tile encoding. Fixes incomplete mipmap chains which previously only went down to 8x8 pixels before. It wasn't known these textures existed before. (Harry Tuttle)
|
2017-12-17 22:25:50 +00:00 |
|
Ian Curtis
|
cede67468c
|
Fix some bad/missing textures in fighting vipers. The game is referencing totally illegal texture sizes. The real h/w was just handling it somehow, whilst we were returning null for the textures. This might produce junk textures for the lower mipmaps, but this can be clamped in a later update.
|
2017-12-13 01:21:25 +00:00 |
|
Ian Curtis
|
62d9584b0d
|
Shift fog maths to fragment shader to fix bug in virtua on.
|
2017-11-23 17:51:51 +00:00 |
|
Ian Curtis
|
bddc86aba9
|
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.
|
2017-11-20 22:21:15 +00:00 |
|
Ian Curtis
|
bc7f1e9fac
|
Fixed shading also works with untextured polys. Fixes some shading issues in La machineguns. (Harry Tuttle)
|
2017-11-07 00:15:57 +00:00 |
|
Ian Curtis
|
df44ad458b
|
Update step 1.5 luminous logic with Harry's findings. Fixes various shading issues.
|
2017-11-05 13:25:33 +00:00 |
|