[Unity 6] Texture2D(TextureFormat.R8) is sampled incorrectly in shaders
needs more information
TonyEric
After the VRChat client migrated to Unity 6, Texture2D(TextureFormat.R8) no longer behaves correctly when sampled in shaders.
I verified the following:
Texture2D(TextureFormat.R8) is created successfully.
The texture accepts exactly 1 byte per pixel.
Using SetPixels(), I compared writing the same red value both with and without different green and blue values. The shader output remained identical, confirming that the green and blue channels are ignored during storage, as expected for TextureFormat.R8.
Apply() succeeds without errors.
Load(), Sample(), and tex2D() all produce identical incorrect results.
This indicates that the texture data is stored correctly, but is decoded incorrectly when sampled in a shader.
In addition to the red channel becoming non-linear, the sampled green and blue channels are always returned as 1.0, even though TextureFormat.R8 stores only a single red channel.
The sampled red values remain monotonic (their order is preserved), but they are no longer linear. Low values are compressed into a much smaller range, making TextureFormat.R8 unusable as a byte-accurate data texture.
This behavior did not occur before the VRChat client migrated to Unity 6.
First image: old version
Second image: Unity 6 Beta
Photo Viewer
View photos in a modal
Log In
_
_tau_
updated the status to
needs more information
Can you provide a world (ideally minimal) that reproduces this issue? That way we can verify side-by-side against live.