Unity-Technologies / barracuda-release

Other
564 stars 76 forks source link

Tensor value seems change after call ToRenderTexture(Inconsistent with RenderTexture) #287

Open xmyhhh opened 2 years ago

xmyhhh commented 2 years ago

Hi, everyone~

Here is how I call ToRenderTexture, image

and the function RenderTextureToTexture2DRFloat implements as below, image

The Result I get like this, image

You can see that colors[0].r (0.02085956) is not equal to workerOutput[0,0,0,0] (4.453816) My question is, shouldn't the two be equal? or am I missing something? Thank you for your reply

kyuhyoung commented 1 year ago

Seems like it is normalized. Literally RenderTexure is for displaying an image (color or gray matrix of values between 0 and 1) on your monitor. It is not for some arbitrary matrix or tensor of any values like 4.453816. Check the function ToRenderTexture().