Skip to content

Kila Material ​

Since 2.2.8

Kila Material is Photon's built-in all-in-one particle material. Instead of building a graph, you switch modules on: flipbooks, extra texture layers, masks, dissolve, UV and screen distortion, colour ramps, soft edges, fresnel, lighting, fog balls and ground decals. Each set of enabled modules compiles to its own shader variant, so a module you leave off costs nothing.

Kila Material presets glowing at night in front of a dark wall
Kila presets at night: toon fire, a shockwave ring, lightning, an energy shield, a portal vortex, a charge orb and fire, with a magic circle, a ground circle and caustics on the floor. Each is one material.

When to Use It ​

UseWhen
Texture or Sprite MaterialOne texture on ordinary particles, nothing animated in the shader.
Kila MaterialA common VFX look: scrolling noise, flipbooks, dissolve, distortion, soft edges, rims, decals, heat haze. Per-particle values without a graph.
Shader Graph MaterialLogic Kila has no module for. Start from a Kila look with Export as Shader Graph and continue in the graph.

Create One ​

  1. In Resources → Material, right-click and choose Add a New Resource → Kila Material.
  2. Assign it to a renderer's material slot. A new Kila Material has Main Texture on, Alpha blend, and its own render state; the slot's Render State is From Material by default, so it follows the material.
  3. Click Browse Presets... to start from a ready-made effect, or add modules yourself.

The built-in material library has no Kila materials. Presets are reached from the inspector.

Convert a Texture Material ​

Right-click a Texture Material tile and choose Convert to Kila Material. After you confirm, the file is replaced in place: every effect that uses it switches to the Kila Material. The entry appears only for plain Texture Materials (not Block Atlas) in a folder you can edit.

Texture MaterialBecomes
TextureMain Texture, sampled as Minecraft samples it: Pixelated unless the .mcmeta sets blur, Clamp wrap if it sets clamp (otherwise Repeat)
Discard ThresholdAlpha Clip
HDR ColorColor; with HDR Mode ADDITIVE it becomes Emission instead
Pixel ArtPixelate module
Soft ParticlesDepth & Contact module (Soft Fade distance and power)
Lit by Dynamic LightsLit by Dynamic Lights module

The converted material has Use Slot State on, so each slot keeps the blend, cull and depth it had.

The Inspector ​

The Kila Material inspector
The Kila Material inspector: the preview, the Render and Surface groups, the enabled modules and the sampler status line at the bottom.

From top to bottom:

  1. Preview. A live thumbnail. Backdrop switches between checkerboard, black and light. Debug View shows one step on its own (Result, Main, Alpha, Masks, Dissolve, Distortion, Normal, UV); it is not saved. When you scroll the preview out of sight, a small copy floats beside the inspector.
  2. Browse Presets... opens the preset gallery.
  3. Render: blend, culling and depth.
  4. Surface: colour, alpha and how the particle's own colour, light and fog apply.
  5. One group per enabled module. The toggle in a group's header turns the module off; its settings are kept, also across a save.
  6. + Add Module... opens the module dialog.
  7. The status line Samplers n/12. See Limits.

Render ​

OptionDefaultDescription
Use Slot StateoffLeave blend, culling and depth to each material slot, as a Texture Material does. On, the rows below except Camera Offset are hidden.
BlendAlphaAlpha, Additive, Soft Additive, Multiply or Opaque.
Additive0Soft Additive only: 0 blends like Alpha, 1 adds like Additive, values between are both.
Double SidedoffDraw back faces as well.
Back FirstoffShown with Double Sided. Draws the back faces, then the front ones, so a closed transparent shield or orb sorts itself.
Depth TestonHide the particle behind world geometry.
Depth WriteoffLet the particle hide what is drawn after it.
Camera Offset0−8 to 8 blocks. Depth-tests the particle this many blocks closer to the camera without moving it on screen: ground quads stop flickering into block tops, sprites stop cutting into walls.

A slot whose Render State is From Material uses these settings; see Render State. While Use Slot State is off, Kila also shapes its colour for its own Blend (Soft Additive premultiplies, Multiply fades towards white, Opaque forces alpha 1). To let the slot decide the blend, turn Use Slot State on rather than setting the slot to Custom.

Surface ​

OptionDefaultDescription
ColorwhiteHDR colour. An intensity above 1 glows and feeds bloom.
Intensity1Multiplies the colour. Can be driven by particle data.
Alpha1Multiplies the alpha. Can be driven by particle data.
EmissionblackAdded to the colour everywhere the particle is visible.

Under More:

OptionDefaultDescription
Vertex ColorMultiply RGBAHow the particle colour (Color over Lifetime and so on) applies: Multiply RGBA, Alpha only, Ignore, RGB only. Use RGB only when the vertex alpha drives something else, such as a dissolve.
World LightonDarken with the block and sky light at the particle. Turn it off for glowing effects.
FogonApply Minecraft fog.
Alpha Clip0.01Discard fragments less opaque than this.
Alpha Power1Power on the final alpha, masks included. Above 1 tightens soft edges, below 1 widens them.
Back ColorwhiteMultiplies the colour of back faces. Needs Double Sided.
Frame Rate0Steps every animation at this many frames per second, like a hand-drawn effect. 0 is smooth.
Boil0Shown when Frame Rate is above 0. How far the UV jumps every step.

Modules ​

The Add Module dialog grouped by category
The Add Module dialog: modules grouped by category, each with a short description and an Add button.

+ Add Module... lists the 21 modules by category, with a description under each. Add turns a module on and opens its group; modules already on show Added. Only Main Texture is on in a new material.

CategoryModuleWhat it does
TextureMain TextureThe base colour and shape: a texture with scroll and a flipbook (Columns, Rows, Frames From Time (FPS) or a Frame driver, Start Frame, Blend Frames, Motion Blend with a motion-vector texture, Random Row, Random Start), plus Dispersion for a chromatic fringe. Leave the emitter's UV Animation off when the flipbook is on.
TextureSecond LayerA second texture mixed over the first by Multiply, Add, Lerp or Screen.
TextureThird LayerOne more layer over the others. Its UV offset cannot be driven.
TextureUV DistortionWobbles the textures with a flowing noise (Offset), or carries them along a flow map (Flow Map). Choose which slots it distorts.
TextureUV Twirl & WaveTwirls, shears, waves or ripples the UV before anything reads it: portals, flags.
TextureGround ProjectionPaints the particle onto the ground behind it as a decal, following steps and slopes. Orientation Ground or Quad, Size, Reach, Fade, Facing Only.
TexturePixelateSnaps the UV to a grid for a pixel-art look.
ColorColor RampRecolours through a gradient. Input Luma, Red, Alpha, U or V; Mode Replace, Multiply or Replace + Alpha; Offset (bind it to lifetime to cool a flame down).
ColorScreen DistortionShows the scene behind the particle, pushed by a noise texture or by the surface normal: heat haze, refraction. Strength, Keep Front, Color Fringe, Stack.
ColorColor AdjustHue Shift, Saturation, Contrast, Brightness, Posterize.
AlphaMask 1, Mask 2Cut the shape with another texture. Mask 2 multiplies with Mask 1.
AlphaDissolveBurns the particle away along a noise: Progress, Softness, Edge Width, Edge Color and Edge Gradient, Edge Add (glow) or Replace, and a direction (U, V, Radial or a Texture) with Weight and Reverse.
AlphaDepth & ContactSoft Fade where the particle meets the scene behind it, and Contact Glow where it touches it (width, blend, falloff, hardness, By Shape, Measure, gradient, pulses, breakup).
AlphaVolumeTurns the quad into a ball of fog that thins towards its edge from any side. Scene Clip thins it where the scene cuts it.
AlphaCamera FadeFades out as the camera comes close (Start 0.5, Fade Length 2), so it never covers the screen.
VertexVertex OffsetPushes the vertices by a noise along the Normal or an Axis. Both Ways, Edge Fade.
LightingFresnelRim Glow, Fade Edges or Fade Centre at grazing angles. Needs a mesh: a billboard always faces the camera.
LightingShadingLights the particle from a direction: Mesh or Sphere normal, bump by Height or Normal Map, Lambert or Six-Way, Key Light, Ambient, Wrap. Dynamic lights follow it.
LightingMatcapA lit sphere looked up by the way the surface faces: glass, ice, metal. On billboards, pair it with Shading.
LightingLit by Dynamic LightsLit by Photon's dynamic lights.

Texture Slots ​

Every texture in a module is a slot with the same controls. Click the thumbnail to open Pick a Texture, with Procedural noise, Recent, Built-in and Particle textures sections and a Browse File... button. You can also drop a .png on the slot. Right-click the slot for Pick a texture..., Browse File... and Reset to default.

RowDescription
ChannelsColour slots: RGBA, Red as Alpha, Alpha Only, Luma as Alpha.
ChannelMask and noise slots: R, G, B, A or Luminance.
Density, MotionProcedural noise (Simple, Gradient, Voronoi) only. Motion is how fast Voronoi cells drift. A procedural slot uses no sampler.
Tiling, Offset, ScrollScroll is in UV per second.
Details → UV FromMesh, Screen, World XZ (ground), World XY, World ZY. World planes tile once per block and line up across particles.
Details → Rotation, Spin SpeedDegrees about the UV centre; degrees per second.
Details → Wrap U, Wrap VRepeat, Clamp, Mirror, Clip. Clip is Clamp and transparent outside the texture, so a slash slides off instead of smearing.
Details → PixelatedNearest sampling for file textures.
Details → PolarU becomes the distance from Center and V the angle around it; Radius and Repeats scale them. Rings, vortexes, radial streaks.

Drive Values with Particle Data ​

Many number rows have a link button, Drive with particle data. A bound row shows Driven By and Scale, and the final value is value + Scale × source.

SourceReads
ConstantNothing: choosing it unbinds the row.
Vertex Color R, G, B, AThe particle colour, such as Color over Lifetime.
Particle LifetimeNormalized age, 0 to 1.
Particle RandomThe particle's random number.
Trail Point LifeThe life of a trail point.
Trail Point PositionThe position along the trail.
Custom DataStream 0–3 and Channel 0–3 (x, y, z, w) of the emitter's Custom Data.

For example, bind Dissolve Progress to Vertex Color A with Scale −1 and value 1: the particle dissolves as its Color over Lifetime alpha drops.

A source the draw cannot provide reads 0, so the row falls back to its value. When that happens, the emitter inspector shows a Material needs data row at the top with a Fix button:

  • A Custom Data driver reads a stream the emitter does not define. Fix enables Additional GPU Data and adds the stream or its missing channels.
  • Trails, beams and Ara trails carry particle data only with GPU instancing. Fix turns instancing on.

A Particle Emitter carries particle data with and without GPU instancing. See Additional GPU Data.

Presets ​

The Kila Material preset gallery
The Browse Presets gallery, one section per category. Hovering a preset tells what it is built for and which features it shows.

Browse Presets... opens a gallery of 27 presets. Clicking one replaces every setting of the material. Between them, the presets use every module, so they double as examples.

CategoryPresets
BasicsGlow (additive), Sparks, Dissolve by lifetime alpha, Slash, Shockwave ring
Fire & SmokeFire, Smoke (alpha, soft), Explosion smoke, Lit smoke (six-way), Fog ball
MagicMagic circle, Portal vortex, Lightning, Charge orb, Energy trail
On the GroundGround circle, Scorch mark, Caustics, Scan pulse
Surfaces & MeshesEnergy shield, Crystal, Hologram, Debris
ScreenHeat haze (screen distortion), Jet exhaust
StylizedToon fire, Pixel spell
  • Energy trail is for trails and needs GPU instancing on the trail (one click on Fix).
  • Scan pulse, Energy shield, Crystal, Hologram and Debris are for meshes, drawn with the Model render mode.
  • Charge orb is invisible until its Custom Data stream 0 (x) gets a 0-to-1 curve.

Export as Shader Graph ​

Since 2.2.8

Right-click any Kila Material tile and choose Export as Shader Graph. The dialog asks for Save the shader graph to, Save the material to and a Name. It needs an open project or a writable library folder.

The export writes:

  • a shader graph <name>, with every parameter as an exposed variable;
  • a Shader Graph Material <name>_graph that draws with it and copies Kila's blend, culling and depth as its Own Render State (unless Use Slot State is on).

Clashing names get _1, _2 and so on. The Kila Material is left as it was.

A graph cannot do some things the way Kila does. The closing report lists what was left out:

  • Ground Projection and Volume;
  • Six-Way lighting (Shading);
  • Contact Glow (Depth & Contact);
  • Camera Offset;
  • Stack on Screen Distortion (exported as a plain screen distortion);
  • gradient keys past the eighth;
  • modules already left out by the sampler budget.

Continue with Shader Graph: Getting Started.

Geometry ​

Kila Material draws on every Photon geometry: tile particles with and without GPU instancing, the Model render mode (with tangents and animated glTF models too), particle trails, Trail and Beam emitters, and Ara trails (ribbon and tube).

  • Fresnel needs a mesh: a billboard always faces the camera, so it has no grazing angles.
  • On the Model render mode, a Normal Map bump needs the renderer's tangent toggle (with GPU instancing). A Height bump needs no tangents.
  • Particle-data drivers on trails, beams and Ara trails need GPU instancing; see the Fix row.

Limits ​

  • Not in the thumbnail. Depth & Contact, Screen Distortion, Volume's Scene Clip and Ground Projection read the scene's depth or colour copy, which the thumbnail does not have. The thumbnail also drops the HDR intensity, ignores Camera Offset, and sweeps particle data from 0 to 1 and back every 3 seconds. Check these effects in the scene.
  • 12 samplers. The light map, every texture and the scene copies share 12 texture units (at most 9 textures). Slots that sample the same texture the same way share one unit; procedural noise uses none. Above the budget, modules are left out in a fixed order and the status line shows [X left out: too many textures].
  • Stack. With Stack on, Screen Distortion adds its push to the other stacked hazes and bends the finished frame once by the sum, so hazes see each other and every effect drawn before them. Color Fringe does not apply while stacked. Without a shader pack it always works.
  • Since 2.2.9 Under a shader pack, Stack works when FX are composited after the pack's passes: Shader pack composite mode set to After the pack's passes, or Auto choosing that path for the pack. Otherwise it falls back to an ordinary, unstacked distortion. In 2.2.8 it always fell back under a shader pack.
  • Ground Projection. The material draws without a depth test while the module is on, even with Use Slot State. The quad must cover the decal on screen; at Size 0.5 a billboard covers it from any side. The decal also paints onto entities, does not land on water (water is not in the depth copy), and can leave holes on grass and other plants.

Released under the MIT License.