#pragma kernel CSMain
RWTexture2D<float4> Result;
Texture2D<float4> Gradient; SamplerState samplerGradient;
Texture2D<float4> Noise; SamplerState samplerNoise;
float Intensity;
float2 GradientOffset;
float2 NoiseOffset;
[numthreads(8,8,1)]
void CSMain (uint3 dtid : SV_DispatchThreadID)
{
Result[dtid.xy] = tex2D(samplerGradient, dtid.xy + GradientOffset.xy) + tex2D(samplerNoise, dtid.xy + NoiseOffset.xy)*Intensity;
}
Very unhelpfully I get this message…
cannot map expression to cs_5_0 instruction set
Now I have no idea?!?