#Read value not the same as written value in texture

1 messages · Page 1 of 1 (latest)

blazing sequoia
#

Hello, Im rendering to a R16G16 not normalised float texture but the values that I write on the texture and the ones that get read are not the same for some reason, for instance 1 gets read as 0.207... Only 0 gets correctly read as 0. Im rendering using unlit and this is how im creating the texture (Rendergraph api): RenderTextureDescriptor textureProperties = new RenderTextureDescriptor(Screen.width, Screen.height, RenderTextureFormat.RGHalf, 0); textureProperties.msaaSamples = 1; textureProperties.sRGB = false;

Im reading the values by using shadergraph sample texture 2D as well as a comparison to a float to find out what the values are.

Im in Unity 6 URP

pine timber
blazing sequoia
#

Im using a custom pass for it which occurs right before default rendering and gets read during default rendering by a material, I thoguht in this case post processing wouldnt apply to it

blazing sequoia
#

Oh btw I fixed it, apparently using shader graph unlit causes some floating point errors so switching to hlsl fixed it