- 【3Dゲームエンジン】Unity質問スレッド24 [無断転載禁止]©2ch.net
111 :名前は開発中のものです。[]:2016/05/06(金) 15:49:52.12 ID:QdSPGBZj - すみません、また詰まってしまったので質問です……。
透過テクスチャを作成しようとしたのですが、アルファ値が0.002未満になると不透明になる現象が起きてしまいました。 原因ご存じの方おられますでしょうか。 こっちだと完全に不透明になる int textureSize = 32; Color[] cols = new Color[textureSize*textureSize]; for( int i = 0 ; i < textureSize*textureSize ; ++i ){ cols[i] = Color.clear; } Texture2D texture = new Texture2D(textureSize,textureSize); texture.SetPixels(cols); texture.Apply(); こっちは透明になる(背景次第で微妙に見える?) Color col = new Color(0,0,0,0.002); int textureSize = 32; Color[] cols = new Color[textureSize*textureSize]; for( int i = 0 ; i < textureSize*textureSize ; ++i ){ cols[i] = col; } Texture2D texture = new Texture2D(textureSize,textureSize); texture.SetPixels(cols); texture.Apply(); よろしくお願いいたします。
|