Merge branch 'master' into vulkan

This commit is contained in:
Triang3l
2021-09-12 14:10:36 +03:00
161 changed files with 3359 additions and 1562 deletions

View File

@@ -36,7 +36,7 @@ XeHSConstantDataOutput XePatchConstant(
// 2) r0.zyx -> r0.zyx by the guest (because r1.y is set to 0 by Xenia, which
// apparently means identity swizzle to games).
// 3) r0.z * v0 + r0.y * v1 + r0.x * v2 by the guest.
// With this order, there are no cracks in Halo 3 water.
// With this order, there are no cracks in 4D5307E6 water.
[unroll] for (i = 0u; i < 3u; ++i) {
output.edges[i] = xe_input_patch[(i + 1u) % 3u].edge_factor;
}

View File

@@ -986,11 +986,11 @@ uint4 XeDXT3AAs1111TwoBlocksRowToBGRA4(uint2 halfblocks) {
// DXT1/DXT3/DXT5 color components and CTX1 X/Y are ordered in:
// http://fileadmin.cs.lth.se/cs/Personal/Michael_Doggett/talks/unc-xenos-doggett.pdf
// (LSB on the right, MSB on the left.)
// TODO(Triang3l): Investigate this better, Halo: Reach is the only known game
// TODO(Triang3l): Investigate this better, 4D53085B is the only known game
// that uses it (for lighting in certain places - one of easy to notice usages
// is the T-shaped (or somewhat H-shaped) metal beams in the beginning of
// Winter Contingency), however the contents don't say anything about the
// channel order.
// is the T-shaped (or somewhat H-shaped) metal beams in the beginning of the
// first mission), however the contents don't say anything about the channel
// order.
uint4 row = (((halfblocks.xxyy >> uint2(3u, 11u).xyxy) & 1u) << 8u) |
(((halfblocks.xxyy >> uint2(7u, 15u).xyxy) & 1u) << 24u) |
(((halfblocks.xxyy >> uint2(2u, 10u).xyxy) & 1u) << 4u) |

View File

@@ -5,8 +5,8 @@ XeHSControlPointInputAdaptive main(uint xe_edge_factor : SV_VertexID) {
XeHSControlPointInputAdaptive output;
// The Xbox 360's GPU accepts the float32 tessellation factors for edges
// through a special kind of an index buffer.
// While Viva Pinata sets the factors to 0 for frustum-culled (quad) patches,
// in Halo 3 only allowing patches with factors above 0 makes distant
// While 4D5307F2 sets the factors to 0 for frustum-culled (quad) patches, in
// 4D5307E6 only allowing patches with factors above 0 makes distant
// (triangle) patches disappear - it appears that there are no special values
// for culled patches on the Xbox 360 (unlike zero, negative and NaN on
// Direct3D 11).

View File

@@ -11,7 +11,7 @@ RWBuffer<uint4> xe_texture_load_dest : register(u0);
// Dword 1:
// rrrrrrrrgggggggg
// RRRRRRRRGGGGGGGG
// (R is in the higher bits, according to how this format is used in Halo 3).
// (R is in the higher bits, according to how this format is used in 4D5307E6).
// Dword 2:
// AA BB CC DD
// EE FF GG HH