mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 13:55:38 +00:00
GPU/HW: Tweak vertex shader offsets
Fixes Doom/Dark Forces/etc in hardware renderer, but only at 1x resolution. Fixes missing lines in Castlevania SOTM, Ridge Racer Type 4, etc.
This commit is contained in:
parent
834f3768a1
commit
ec5b52b3fb
|
@ -199,7 +199,7 @@ void GPU_HW::LoadVertices()
|
|||
vertices[i].Set(m_drawing_offset.x + vp.x, m_drawing_offset.y + vp.y, color, texpage, packed_texcoord);
|
||||
}
|
||||
|
||||
if (rc.quad_polygon)
|
||||
if (rc.quad_polygon && m_resolution_scale > 1)
|
||||
HandleFlippedQuadTextureCoordinates(vertices.data());
|
||||
|
||||
// Cull polygons which are too large.
|
||||
|
|
|
@ -400,8 +400,10 @@ std::string GPU_HW_ShaderGen::GenerateBatchVertexShader(bool textured)
|
|||
ss << R"(
|
||||
{
|
||||
// 0..+1023 -> -1..1
|
||||
float pos_x = (float(a_pos.x) / 512.0) - 1.0;
|
||||
float pos_y = (float(a_pos.y) / -256.0) + 1.0;
|
||||
float pos_x = ((float(a_pos.x) + 0.5) / 1024.0);
|
||||
float pos_y = ((float(a_pos.y) + 0.5) / 512.0);
|
||||
pos_x = (pos_x * 2.0) - 1.0;
|
||||
pos_y = ((1.0 - pos_y) * 2.0) - 1.0;
|
||||
v_pos = float4(pos_x, pos_y, 0.0, 1.0);
|
||||
|
||||
v_col0 = a_col0;
|
||||
|
|
Loading…
Reference in a new issue