【3Dゲームエンジン】Unity質問スレッド24 [無断転載禁止]©5ch.net
■ このスレッドは過去ログ倉庫に格納されています
0111名前は開発中のものです。
2016/05/06(金) 15:49:52.12ID: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();
よろしくお願いいたします。
■ このスレッドは過去ログ倉庫に格納されています