private void SetTexture(ShaderProperties.DefaultProperty property, Texture tex, bool forcePixelShader = false) { if (_renderPipeline == RenderPipeline.SRP) { _commandBuffer.SetGlobalTexture(property.id, tex); } else { Shader.SetGlobalTexture(property.id, tex); } }
/// <summary> /// Auto set a texture on the renderpipeline, /// </summary> /// <param name="property"></param> /// <param name="rt"></param> /// <param name="forcePixelShader"></param> private void SetTexture(ShaderProperties.DefaultProperty property, RenderTarget rt, bool forcePixelShader = false) { if (_renderPipeline == RenderPipeline.SRP) { _commandBuffer.SetGlobalTexture(property.id, rt.renderTargetIdentifier); } else { Shader.SetGlobalTexture(property.id, rt.renderTexture); } }
/// <summary> /// Auto set a vector value on the renderpipeline /// </summary> /// <param name="property"></param> /// <param name="value"></param> private void SetVector(ShaderProperties.DefaultProperty property, Vector2 value, bool forcePixelShader = false) { if (_renderPipeline == RenderPipeline.SRP) { _commandBuffer.SetGlobalVector(property.id, value); } else { Shader.SetGlobalVector(property.id, value); } }
private void SetTexture(ShaderProperties.DefaultProperty property, Texture tex) { Shader.SetGlobalTexture(property.id, tex); }
/// <summary> /// Auto set a texture on the renderpipeline, /// always update the computeKernelIndexBuffer before using this to get the correct variant while using compute shaders /// </summary> /// <param name="property"></param> /// <param name="rt"></param> /// <param name="forcePixelShader"></param> private void SetTexture(ShaderProperties.DefaultProperty property, RenderTexture rt) { Shader.SetGlobalTexture(property.id, rt); }
/// <summary> /// Auto set a texture on the renderpipeline, /// always update the computeKernelIndexBuffer before using this to get the correct variant while using compute shaders /// </summary> /// <param name="property"></param> /// <param name="rti"></param> /// <param name="forcePixelShader"></param> private void SetTexture(ShaderProperties.DefaultProperty property, RenderTargetIdentifier rti) { _commandBuffer.SetGlobalTexture(property.id, rti); }