Skip to content
Permalink
Browse files

Merge pull request #18 from PeterCsubak/master

ShaderPostprocessor string format bug fix
  • Loading branch information...
lmontoute committed Apr 14, 2019
2 parents c08ddd4 + 4251e7a commit 99cca250b4e55486e22785c8eb0e522bf0151734
Showing with 2 additions and 2 deletions.
  1. +2 −2 Editor/ShaderPostprocessor/ShaderPostprocessor.cs
@@ -62,7 +62,7 @@ public static StringBuilder ModifyShader(VFXContext context, StringBuilder sourc
if (shouldModify)
{
var data = context.GetData() as VFXDataParticle;
var defines = $@"
var defines = FormattableString.Invariant($@"
// FluvioFX simulation constants
#define FLUVIO_EPSILON {FluvioFXSettings.kEpsilon}
#define FLUVIO_MAX_SQR_VELOCITY_CHANGE {FluvioFXSettings.kMaxSqrVelocityChange}
@@ -71,7 +71,7 @@ public static StringBuilder ModifyShader(VFXContext context, StringBuilder sourc
#define FLUVIO_AUTO_PARTICLE_SIZE_FACTOR {FluvioFXSettings.kAutoParticleSizeFactor}
#define FLUVIO_MAX_GRID_SIZE {(uint)Mathf.Pow(data?.capacity ?? 262144, 1.0f / 3.0f)}
";
");

var result = defines + source.ToString().Replace("\r\n", "\n");

0 comments on commit 99cca25

Please sign in to comment.
You can’t perform that action at this time.