{"action":"opened","issue":{"url":"https://api.github.com/repos/unity3d-jp/UnityChanToonShaderVer2_Project/issues/9","repository_url":"https://api.github.com/repos/unity3d-jp/UnityChanToonShaderVer2_Project","labels_url":"https://api.github.com/repos/unity3d-jp/UnityChanToonShaderVer2_Project/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/unity3d-jp/UnityChanToonShaderVer2_Project/issues/9/comments","events_url":"https://api.github.com/repos/unity3d-jp/UnityChanToonShaderVer2_Project/issues/9/events","html_url":"https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/issues/9","id":369909197,"node_id":"MDU6SXNzdWUzNjk5MDkxOTc=","number":9,"title":"HRD color range support","user":{"login":"ACIIL","id":6478388,"node_id":"MDQ6VXNlcjY0NzgzODg=","avatar_url":"https://avatars3.githubusercontent.com/u/6478388?v=4","gravatar_id":"","url":"https://api.github.com/users/ACIIL","html_url":"https://github.com/ACIIL","followers_url":"https://api.github.com/users/ACIIL/followers","following_url":"https://api.github.com/users/ACIIL/following{/other_user}","gists_url":"https://api.github.com/users/ACIIL/gists{/gist_id}","starred_url":"https://api.github.com/users/ACIIL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ACIIL/subscriptions","organizations_url":"https://api.github.com/users/ACIIL/orgs","repos_url":"https://api.github.com/users/ACIIL/repos","events_url":"https://api.github.com/users/ACIIL/events{/privacy}","received_events_url":"https://api.github.com/users/ACIIL/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-14T14:47:43Z","updated_at":"2018-10-14T14:47:43Z","closed_at":null,"author_association":"NONE","body":"The saturate() functions are clamping true color ranges from inputting intense lights and finally allowing the shader to resolve full range colors, this is creating unexpected effects when UTC2 is used for scenes that correctly balance and manipulate full range light effects.\r\n\r\nTo allow full HRD color range in the shader means removing all saturate() and clamps with color. The reason for this is to allow complete support for unity's post processing stack camera effects and allow worlds to balance high intense light sources:  https://docs.unity3d.com/Manual/PostProcessing-Stack.html  the effects are mainly for allowing eye-adaptation and blooms to expect light ranges greater than color (1, 1, 1) and manipulating it more realistically.\r\n \r\nThe standard shader is HDR range and other toon shaders support HDR too. I have come to regularly see light sources in scene high above >2 and also as high as >100 intensity!  A scene with eye adaptation will counter balance such intense light source.  Unfortunately when light clamped UTC2 is paired against HDR shaders, UTC2 will become unexpectedly blacker because it could not accept the >1.0 color input or output >1.0 color before eye adaption darkens the whole screen.\r\n\r\nLikewise a problem with not using HDR range is balancing color used for the Bloom effect, the post process stack defaults bloom at >1.1 color intensity. Combined with eye-adaptation in a HDR shader the bloom will drop correctly, but will not work balance correctly if the shader clamps colors at input or output or attempts to clamp the emission output.\r\n \r\n\r\n\r\nI have found it possible to remove the saturate() functions around all the color manipulating functions and get ok results. Being careful to not touch the mask and shading functions that need saturate() for safe math ranges!\r\n\r\nUTC2 edited to handle full HDR color does function well with post processing bloom on the camera somewhat, i found the additive effects of:  color ramps + shine + rim light + anti-rim light + additive matcap can result in a amplified color output into emission range, so if a light math rework is needed after removing saturates()  it would be the additive combination of those features... I understand PBR shaders have a way to combine the effects and balance the output."}}
{"actor":{"display_login":"ACIIL"}}