Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


vulkanEnableSetSRGBWrite

Enables the ability to toggle sRGB write mode on Vulkan framebuffers.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Property
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static bool vulkanEnableSetSRGBWrite { get; set; }

Remarks

In a Linear Color Space workflow, enabling sRGB write mode allows the GPU to automatically perform linear-to-sRGB conversion and ensures that blending operations are mathematically correct. This setting is always enabled in Editor mode.
This is particularly useful for projects that require parity with OpenGL's
GL_FRAMEBUFFER_SRGB
behavior or for custom rendering pipelines that need to precisely control when gamma correction is applied (e.g., bypassing it for UI overlays or specific post-processing passes).
Note: Enabling this setting requires an extra blit operation when presenting the back buffer, which can lead to performance degradation, particularly on mobile/tile-based GPUs. It should remain disabled unless your shaders or workflow explicitly require the ability to toggle the sRGB write state.
Additional resources: Linear Color Space in Unity