set default particles render distance to 32
This commit is contained in:
@@ -92,14 +92,15 @@ void ParticlesRenderer::renderParticles(const Camera& camera, float delta) {
|
|||||||
chunks,
|
chunks,
|
||||||
backlight
|
backlight
|
||||||
);
|
);
|
||||||
|
auto size = glm::max(glm::vec3(0.5f), preset.size * scale);
|
||||||
for (int x = -1; x <= 1; x++) {
|
for (int x = -1; x <= 1; x++) {
|
||||||
for (int y = -1; y <= 1; y++) {
|
for (int y = -1; y <= 1; y++) {
|
||||||
for (int z = -1; z <= 1; z++) {
|
for (int z = -1; z <= 1; z++) {
|
||||||
light = glm::max(
|
light = glm::max(
|
||||||
light,
|
light,
|
||||||
MainBatch::sampleLight(
|
MainBatch::sampleLight(
|
||||||
particle.position - preset.size * scale *
|
particle.position -
|
||||||
glm::vec3(x, y, z),
|
size * glm::vec3(x, y, z),
|
||||||
chunks,
|
chunks,
|
||||||
backlight
|
backlight
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ struct ParticlesPreset : public Serializable {
|
|||||||
/// @brief Use global up vector instead of camera-dependent one
|
/// @brief Use global up vector instead of camera-dependent one
|
||||||
bool globalUpVector = false;
|
bool globalUpVector = false;
|
||||||
/// @brief Max distance of actually spawning particles.
|
/// @brief Max distance of actually spawning particles.
|
||||||
float maxDistance = 16.0f;
|
float maxDistance = 32.0f;
|
||||||
/// @brief Particles spawn interval
|
/// @brief Particles spawn interval
|
||||||
float spawnInterval = 0.1f;
|
float spawnInterval = 0.1f;
|
||||||
/// @brief Particle life time
|
/// @brief Particle life time
|
||||||
|
|||||||
Reference in New Issue
Block a user