mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 20:07:29 +08:00
Merge pull request #22491 from EVAST9919/triangles-old-texel
Specify `texelSize` value in the `Triangles` background
This commit is contained in:
commit
2b2d5d460b
@ -294,8 +294,14 @@ namespace osu.Game.Graphics.Backgrounds
|
|||||||
vertexBatch = renderer.CreateQuadBatch<TexturedVertex2D>(Source.AimCount, 1);
|
vertexBatch = renderer.CreateQuadBatch<TexturedVertex2D>(Source.AimCount, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Due to triangles having various sizes we would need to set a different "texelSize" value for each of them, which is insanely expensive, thus we should use one single value.
|
||||||
|
// texelSize computed for an average triangle (size 100) will result in big triangles becoming blurry, so we may just use 0 for all of them.
|
||||||
|
// But we still need to specify at least something, because otherwise other shader usages will override this value.
|
||||||
|
float texelSize = 0f;
|
||||||
|
|
||||||
shader.Bind();
|
shader.Bind();
|
||||||
shader.GetUniform<float>("thickness").UpdateValue(ref fill);
|
shader.GetUniform<float>("thickness").UpdateValue(ref fill);
|
||||||
|
shader.GetUniform<float>("texelSize").UpdateValue(ref texelSize);
|
||||||
|
|
||||||
foreach (TriangleParticle particle in parts)
|
foreach (TriangleParticle particle in parts)
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Realm" Version="10.18.0" />
|
<PackageReference Include="Realm" Version="10.18.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2023.131.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2023.131.0" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.1221.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2023.202.0" />
|
||||||
<PackageReference Include="Sentry" Version="3.23.1" />
|
<PackageReference Include="Sentry" Version="3.23.1" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
||||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||||
|
Loading…
Reference in New Issue
Block a user