public void CustomShader(ICustomShaderStage stage, ITexture tex0, ITexture tex1, ITexture tex2, ITexture tex3, IRenderTarget target) { if (stage == null) { throw new Yak2DException("Unable to queue CustomShaderStage. Stage is null", new ArgumentNullException()); } if (target == null) { throw new Yak2DException("Unable to queue CustomShaderStage. Target is null", new ArgumentNullException()); } CheckForDuplicatedSurfaces("CustomShaderStage", tex0, tex1, tex2, tex3, target); _commandQueue.Add(RenderCommandType.CustomShader, stage.Id, target.Id, tex0 == null ? 0UL : tex0.Id, tex1 == null ? 0UL : tex1.Id, tex2 == null ? 0UL : tex2.Id, tex3 == null ? 0UL : tex3.Id, 0UL, RgbaFloat.Clear ); }
public void SetCustomShaderUniformValues <T>(ICustomShaderStage stage, string uniformName, T[] dataArray) where T : unmanaged { if (stage == null) { throw new Yak2DException("Unable to set custom shader effect as stage passed is null"); } SetCustomShaderUniformValues(stage.Id, uniformName, dataArray); }