fix: tune real weather particle rendering
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
This commit is contained in:
@@ -121,12 +121,17 @@ TEST(Layer, RasterParticleCountProperties) {
|
||||
layer.setParticleCount(65536);
|
||||
EXPECT_EQ(65536u, layer.getParticleCount());
|
||||
|
||||
// Non-square and out-of-range counts are rejected by the Core Layer so
|
||||
// RenderRasterParticleLayer always receives a valid State texture grid.
|
||||
// Production-like validation also supports the explicit non-square
|
||||
// presets used by the Android visual tuner. The Renderer rounds its State
|
||||
// texture grid up and only draws the requested particle count.
|
||||
layer.setParticleCount(2048);
|
||||
EXPECT_EQ(2048u, layer.getParticleCount());
|
||||
|
||||
// Other values remain rejected by the Core Layer.
|
||||
layer.setParticleCount(1000);
|
||||
EXPECT_EQ(65536u, layer.getParticleCount());
|
||||
EXPECT_EQ(2048u, layer.getParticleCount());
|
||||
layer.setParticleCount(1048577);
|
||||
EXPECT_EQ(65536u, layer.getParticleCount());
|
||||
EXPECT_EQ(2048u, layer.getParticleCount());
|
||||
}
|
||||
|
||||
TEST(Layer, RasterParticleVisualProperties) {
|
||||
@@ -159,7 +164,7 @@ TEST(Layer, RasterParticleVisualProperties) {
|
||||
layer.setParticleLength(-1.0f);
|
||||
layer.setTrailFade(2.0f);
|
||||
EXPECT_FLOAT_EQ(8.0f, layer.getLineWidth());
|
||||
EXPECT_FLOAT_EQ(0.002f, layer.getParticleLength());
|
||||
EXPECT_FLOAT_EQ(0.0005f, layer.getParticleLength());
|
||||
EXPECT_FLOAT_EQ(0.995f, layer.getTrailFade());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user