public void Visit(TexLoad ins) { if (ins.Sampler.Kind != RegKind.SamplerState) throw new Exception ("bad sampler reg: " + ins.Sampler.Kind); Sampler s = ctx.GetSampler (ins.Sampler.Number); Vector4f c = ctx.ReadValue (ins.Texture); Vector4f sample = s.Sample (c); if (Tracing.Enabled) Console.WriteLine ("tex-load {0}[{1}] => {2}", ins.Sampler, ins.Texture, sample); ctx.StoreValue (ins.Dest, sample); }
public void Visit(TexLoad ins) { }
public void Visit(TexLoad ins) { VisitSrcReg (ins.Sampler); VisitSrcReg (ins.Texture); VisitDestReg (ins.Dest); }
public void Visit(TexLoad ins) { if (ins.Sampler.Kind != RegKind.SamplerState) throw new Exception ("bad sampler input reg " + ins.Sampler.Kind); ctx.SampleTexture (ins.Sampler.Number, ins.Texture); ctx.StoreValue (ins.Dest); }