Vixen
02b45cc4
csharp
public sealed class RemoteEffectSource

A variant compiled on a development machine and sent to the device that wants it.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Stride's EffectCompilerServer pattern, and the thing that makes shader iteration on a phone or a console tolerable: the device has no compiler and no shader sources, so without this every change to a .rvn is a full content build and a redeploy. With it, the device asks, the laptop compiles, and — stacked under an EffectDiskCache — the device only ever asks once per variant.

It is an IEffectSource like every other tier, which is the whole reason the seam was drawn there. Nothing above it knows a socket is involved.

A development tool, and it does not pretend otherwise. No authentication, no transport security, and it hands whoever connects whatever it can compile. It belongs on a desk, behind a firewall, and never in anything shipped — which is why a host has to construct one deliberately for it to exist at all.

Failure of any kind is a miss. The laptop is asleep, the cable came out, the port moved: all of those mean this tier has no answer, and the tier below should get its turn rather than the frame dying. What a miss costs is a placeholder material for a few frames, which is the arrangement doc 06 asks for anyway.

Fields and properties (6)

  • public string Host

    Where the compiler is.

  • public int Port

    Which port it listens on.

  • public string Target

    Which backend to ask for, or empty for the server's own.

  • public TimeSpan Timeout

    How long to wait for an answer before calling it a miss.

  • public IReadOnlyList<string> Diagnostics

    What the last failed request reported, for a host that wants to show it.

  • public int Served

    How many requests have been answered with a variant.

Methods (3)

  • public RemoteEffectSource(string host, int port)

    Points at a compiler.

  • public EffectData? TryGet(EffectKey key)
  • public void Dispose()

    Drops the connection. The next request opens another.

Used by (1)

  • ShaderCompilerServiceTestsVixen.ShaderCompilerService.Tests