#like so:
1 messages ยท Page 1 of 1 (latest)
I would look into trying to use https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Texture2D.SetPixelData.html before Apply().
I use that for my HDR textures in HDRP, I recall before I switched to using that method, they would come out in LDR.
Well, can't make it to work. But what is strange is that, I changed my shader graph to output the value 1 to the render texture and I'm unable to read the Red value as 1 but 0.625f. Did the same change to my URP shader and it outputs 1 as expected. So, I guess this has to do with some HDRP setting...
@granite yarrow Make sure your texture2d and the render texture are in the same color space (linear/gamma)
It turns out that the problem with getting values like 0.625f instead of 1 from a solid white image was due to the** rendering pass** being set to default; I changed to After post-effects and it started to output 1f as expected:
Unfortunately, I still have lack of color precision when reading the render texture. @novel pelican I'm afraid this won't work, I was hoping I could somehow capture the screen but from a specific camera; this method captures everything on the screen. ๐ฆ
you can use it on a camera like the following: 1) enable camera to capture, 2) start coroutine with yield return new WaitForEndOfFrame(), then do capturing, and 3) disable screenshot camera and switch back to other camera