Quantcast
Channel: Latest Questions by guto-thomas
Viewing all articles
Browse latest Browse all 84

Why does a Texture2D is being initialized with all colors set to (1, 1, 1, 0.84)?

$
0
0
Hello everyone, I'm initializing a Texture2D of 512x512 a few times per frame. I noticed some areas were getting transparent and I assumed the texture was 100% opaque white. Then I tried to print the value for a pixel and I got (1,1,1,0.84) which is white with a bit of transparency but I don't want that. I wanted the constructor to set all pixels to (1,1,1,1). I really don't want to use SetPixels passing a 512x512 array of white colors nor loop through the whole texture setting each colour to (1,1,1,1). A solution would be to hold a 32x32 (example) array of white color and loop through the texture a few times using SetPixels, but if I could I would like to avoid this kind of computation as much as possible. My question is: Why is the texture being initialized with 0.84 as the alpha value? And is there a way to initialize it with all parameters being 1? PS: I'm using Alpha8 as my texture format. If I switch for, let's say, RGBA32, all the colours are initialized with 0.84 as their values. Thank you very much!

Viewing all articles
Browse latest Browse all 84

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>