[D3D12] Fix point size calculation + point code cleanup

6fcf9d21fe made per-vertex diameter vs. constant radius consistent, and with that commit the shader works with direct pixel to NDC conversion, however, the NDC conversion factor was outdated in that commit (still included the 0.5 factor for diameter to radius conversion, resulting in all points being 50% narrower along each axis than needed). Now, the diameter to radius conversion factor is used there properly, and also the multiplication of the per-vertex diameter by 0.5 has been removed from the shader since the constant already includes it now (the constant diameter is passed via the system constants instead of the radius also).
This commit is contained in:
Triang3l
2022-05-04 13:20:45 +03:00
parent 7ab5ccbbd9
commit 0e0f04dc1d
13 changed files with 2230 additions and 2215 deletions

View File

@@ -2040,9 +2040,9 @@ const DxbcShaderTranslator::SystemConstantRdef
{"xe_point_vertex_diameter_max", ShaderRdefTypeIndex::kFloat,
sizeof(float)},
{"xe_point_constant_radius", ShaderRdefTypeIndex::kFloat2,
{"xe_point_constant_diameter", ShaderRdefTypeIndex::kFloat2,
sizeof(float) * 2},
{"xe_point_screen_to_ndc", ShaderRdefTypeIndex::kFloat2,
{"xe_point_screen_diameter_to_ndc_radius", ShaderRdefTypeIndex::kFloat2,
sizeof(float) * 2},
{"xe_interpolator_sampling_pattern", ShaderRdefTypeIndex::kUint,