示例#1
0
 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);
     }
 }
示例#2
0
 /// <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);
     }
 }
示例#3
0
 /// <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);
     }
 }
示例#4
0
 private void SetTexture(ShaderProperties.DefaultProperty property, Texture tex)
 {
     Shader.SetGlobalTexture(property.id, tex);
 }
示例#5
0
 /// <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);
 }
示例#6
0
 /// <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);
 }