Generative seamless textures across multiple planes?

How would you go about generating random textures that can be seamlessly mapped across multiple planes in a grid?

Currently I have a single prefab plane that is instantiated by a for loop to form a grid of identical planes. Certain events cause planes to fade out (thanks to iTween) and then Destroy.

I want the seamless grid to look dirty, without looking repetitive.

I was looking at these questions:

But neither of them suit my purposes.

Any ideas?

So that was great advice, and I’ve gotten this working really well for my purposes now. I added a couple lines of code to an answer posted by user “Owen Reynolds” on this question so that I could manually tweak the scale of the world-aligned repeating texture from the GUI side.

Here’s the full code of the working shader, hope it helps somebody else:

Shader "custom_shaders/Transparent_Diffuse_World_Aligned" {

Properties {
_Color (“Main Color”, Color) = (1,1,1,1)
_MainTex (“Base (RGB) Trans (A)”, 2D) = “white” {}
_Scale (“Texture Scale Multiplier”, Float) = 0.1

SubShader {
Tags {“Queue”=“Transparent-101” “IgnoreProjector”=“True” “RenderType”=“Transparent”}
LOD 200
Cull Off
Fog {Mode Off}

#pragma surface surf Lambert alpha

sampler2D _MainTex;
float4 _Color;
float _Scale;

struct Input {
	float2 uv_MainTex; // unused
	float3 worldNormal;
	float3 worldPos;

void surf (Input IN, inout SurfaceOutput o) {
  // Guess correct planar map from normal. 0.5 is an arbitrary cutoff
  float2 UV;
  // NOTE: assuming no bottom-facing, otherwise use abs()
  if(IN.worldNormal.y>0.5) UV = IN.worldPos.xz; // top
  else if(abs(IN.worldNormal.x)>0.5) UV = IN.worldPos.yz; // side
  else UV = IN.worldPos.xy; // front

  // 0.1 is an arbitrary x10 texture size scale 
  half4 c = tex2D (_MainTex, UV* _Scale)* _Color;
  o.Albedo = c.rgb;
  o.Alpha = c.a;



Fallback “Transparent/VertexLit”