25
2019
Enable HDR Color picker for Shader or Script
I needed HDR color for some old Unlit/Color-shader, and for c# script also, found out that you can add this attribute for the shader:
1 2 3 4 | // BEFORE (no hdr color picker) _Color ("Main Color", Color) = (1,1,1,1) // AFTER (hdr color picker) [HDR]_Color ("Main Color", Color) = (1,1,1,1) |
And for the script:
1 2 3 4 5 | // BEFORE public Color shouldbeHDR = Color.white; // AFTER [ColorUsage(true, true)] public Color shouldbeHDR = Color.white; |
More info:
https://docs.unity3d.com/ScriptReference/ColorUsageAttribute.html
https://docs.unity3d.com/Manual/SL-Properties.html
Also make sure your Camera has [x] HDR enabled

Related Posts
5 Comments + Add Comment
Leave a comment to Renan
Recent posts
- MotionVector Effect: Object “disappears” when paused
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
Recent Comments
- Using RenderDoc with Unity (graphics debugger) on
- UI Scroll View automatic Content height on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
Hi there i have a shader that im trying to make HDR can you please explain more
im in the script i added the code no error i saved it and nothing change still the same color picker
[…] La Source Étiquetteswhatever […]
[…] Kaynak whatever whatever […]
Thanks