Ian Curtis
|
da8b63b44b
|
The model3 shares vertices between polygons. But it also seems to do this for polygons with different textures. This means the texture coordinate for potentially different sizes textures is shared. Currently this was broken leading to some corrupted looking textures. The fix is to simply cache the old texture coordinates, and recalculate the normalised coordinates in the new texture coordinate space.
|
2016-12-06 14:39:46 +00:00 |
|
Ian Curtis
|
10a5d2c0e1
|
refactor
|
2016-12-06 12:25:34 +00:00 |
|
Ian Curtis
|
eece2d75b4
|
tweak scroll fog logic
|
2016-12-04 22:37:49 +00:00 |
|
Ian Curtis
|
a310e8e5cf
|
minor optimisations
|
2016-11-28 17:32:25 +00:00 |
|
Ian Curtis
|
abc8c24b69
|
Only check the geometry for culling with valid node distances. We will need this later.
|
2016-11-27 19:30:46 +00:00 |
|
Ian Curtis
|
fe60d115d2
|
Revert changes .. if we clip against the real3d clipping planes, our wide screen hack won't work anymore.
|
2016-11-26 01:19:51 +00:00 |
|
Ian Curtis
|
665fa90425
|
Get clipping planes directly from the viewport data. Also no need to clip against a far plane
|
2016-11-26 01:12:08 +00:00 |
|
Ian Curtis
|
84ae8f035c
|
Skip processing the mipmap section of memory. The real3d doesn't create mipmaps down to 1x1 that is needed to do mipmapping properly on modern hardware anyway.
|
2016-11-21 09:04:56 +00:00 |
|
Ian Curtis
|
483ba2f398
|
Fix the shading in scud. When lighting is disabled the fixed shading intensities appear to be offset values added to the colour value.
|
2016-11-11 17:50:27 +00:00 |
|
Ian Curtis
|
2f49012786
|
change scroll fog logic to parse the lower priority viewports first
|
2016-10-09 18:10:57 +00:00 |
|
Ian Curtis
|
f0a15febd1
|
implement scroll fog, fixes a tonne of missing fx
|
2016-10-09 16:34:12 +00:00 |
|
Ian Curtis
|
ef11990d19
|
Parse out scrollfog value used for blending over the 2d background.
|
2016-10-08 15:41:16 +00:00 |
|
Ian Curtis
|
33e795de9b
|
Fix scenes with missing fog in ocean hunter. The game was passing negative fog densities. The sign seems to be ignored by the model 3.
|
2016-10-08 15:15:25 +00:00 |
|
Ian Curtis
|
c3581c9fe8
|
Support multiple microTextures, fixes crazy texturing in sega ski champ. I'm assuming microtextures are always located on the other memory bank to the base texture. This logic seems to work for all our games anyway.
|
2016-10-06 01:37:29 +00:00 |
|
Ian Curtis
|
732bff2769
|
disable spot light if the extent is zero
|
2016-06-29 20:53:19 +00:00 |
|
Ian Curtis
|
efa7776871
|
parse some unimplemented spot light values from viewport
|
2016-06-27 17:35:27 +00:00 |
|
Ian Curtis
|
d058a29ac8
|
stencil translucent non textured polys
|
2016-06-19 23:33:06 +00:00 |
|
Ian Curtis
|
85c4d85562
|
refactor
|
2016-06-19 21:43:09 +00:00 |
|
Ian Curtis
|
c2b1db11f8
|
Cull geometry based on the culling distances in the nodes. Should give some sort of speedup on lower end pcs where the CPU is predominantly the bottle neck.
|
2016-06-16 20:05:29 +00:00 |
|
Ian Curtis
|
d799c63b1a
|
cache bound texture
|
2016-06-10 11:29:20 +00:00 |
|
Ian Curtis
|
48a79a8f14
|
cleaning
|
2016-06-10 10:18:47 +00:00 |
|
Ian Curtis
|
8440bc7f03
|
support negative exponent
|
2016-06-03 09:33:46 +00:00 |
|
Ian Curtis
|
5081ee99dc
|
Add code to convert the 16bit float format used by the hardware back into float 754 format. 16bit floats are used for the culling radiuses in the nodes.
|
2016-06-03 00:01:34 +00:00 |
|
Ian Curtis
|
36074d9fd5
|
Y texture offsets are just 5 bits. Texture coordinate wrap around happens in the same texture sheet, not into the next one. Fixes various texturing bugs in sega rally.
|
2016-05-30 13:25:00 +00:00 |
|
Bart Trzynadlowski
|
2ee0d9018e
|
New engine: modf -> std::modf (fixes compilation on gcc)
|
2016-05-28 20:54:25 +00:00 |
|
Bart Trzynadlowski
|
5c1a240565
|
New engine: expanded color indices to 12 bits from 11. Added PolygonHeader::ColorIndex and SensorColorIndex methods.
|
2016-05-28 20:49:10 +00:00 |
|
Ian Curtis
|
ce03c13847
|
Optimise non smooth texture repeat to only effect texture boundaries, rather than poly boundaries. Fixes a few ugly artefacts
|
2016-05-28 13:21:35 +00:00 |
|
Ian Curtis
|
661f19be19
|
fix transparency values, values are from 0-32, not 0-16 where the top bit disables
|
2016-05-27 22:20:57 +00:00 |
|
Ian Curtis
|
2086b1c9af
|
Stencil layered polys, fixes shadow z fighting in some of the games. Other games maybe using stipple alpha (yuck), not sure yet.
|
2016-05-27 19:30:40 +00:00 |
|
Ian Curtis
|
c5ce2b9679
|
fix alpha testing for texture format 7
|
2016-05-22 19:17:15 +00:00 |
|
Ian Curtis
|
fd3eb49369
|
support 4 bit textures
|
2016-05-21 15:50:54 +00:00 |
|
Ian Curtis
|
e108b56664
|
correctly mask pointers
|
2016-05-19 22:23:50 +00:00 |
|
Ian Curtis
|
a79fd2786a
|
optimise hash table access for better performance
|
2016-05-19 19:04:44 +00:00 |
|
Ian Curtis
|
ff8d311dcc
|
support colour table pointer
|
2016-05-18 23:06:41 +00:00 |
|
Ian Curtis
|
9e279a0c1f
|
Non luminous polygons seem to be effected by the lightModifier also. API seems to have no restriction in this regard, neither does the SDK. The ocean hunter requires this for some of the 2d stuff. Light modifier values only seem to exist between 0-16, which is strange for 5 bits of precision. Possibly top bit disables the effect and lower 4 bits are the value. This clearly differs from the SDK, but without this the values come out clearly wrong.
|
2016-05-16 10:49:00 +00:00 |
|
Ian Curtis
|
bc08276d60
|
preliminary specular
|
2016-05-15 16:24:49 +00:00 |
|
Ian Curtis
|
c4b5b185c6
|
Disable light modifier on fog, seems not to work .. values don't make sense. Maybe the model3 doesn't use these.
|
2016-05-13 19:26:10 +00:00 |
|
Ian Curtis
|
c8f8cd1655
|
remove dead code
|
2016-05-13 08:40:53 +00:00 |
|
Ian Curtis
|
e295ad6868
|
double up polys for two sided polys, fixes some diffuse lighting problems
|
2016-05-13 08:39:48 +00:00 |
|
Bart Trzynadlowski
|
ddf3d5213d
|
FLT_MAX -> std::numeric_limits<float>::max()
|
2016-05-10 03:08:36 +00:00 |
|
Ian Curtis
|
43add90d2f
|
Fix bad texture seems
|
2016-05-09 16:26:34 +00:00 |
|
Ian Curtis
|
242cddac2d
|
remove pointless loop
|
2016-05-07 15:45:02 +00:00 |
|
Ian Curtis
|
ded3168060
|
Split face colour from per vertex poly colour. Fixes colour bleeding between connected polys in harley.
|
2016-05-07 15:28:04 +00:00 |
|
Bart Trzynadlowski
|
fee1cfb126
|
Fixed compilation on gcc (gotos cannot cross variable declarations)
|
2016-05-05 22:01:59 +00:00 |
|
Ian Curtis
|
da4bab5f9b
|
Flat shaded polys can't share vertex normals with adjacent connected polys. Fixes some bad lighting in Harley on pavements
|
2016-05-05 08:06:06 +00:00 |
|
Ian Curtis
|
b2da849d90
|
support flat shading
|
2016-05-05 00:01:17 +00:00 |
|
Ian Curtis
|
b0569007ef
|
set correct microtexture wrap mode
|
2016-05-04 10:30:58 +00:00 |
|
Ian Curtis
|
c545b9fd85
|
preliminary microtexture
|
2016-05-04 00:35:07 +00:00 |
|
Ian Curtis
|
396fba7d24
|
skip viewports marked as disabled, might stop parsing some bad data
|
2016-05-03 21:17:37 +00:00 |
|
Ian Curtis
|
7ec7906c0f
|
Turn off lighting if fixed shading (or no normals) flag is present. Fixes some of the lighting weirdness in scud
|
2016-04-30 20:32:44 +00:00 |
|