x


Mipmap bias not Set on device with Unity 3.4 IOS project

Hello,

In Unity 3.3 I used the following code to set the mipmap bias at runtime.

public Texture[] textures;
public float bias = -2.0f;


void Start ()
{
    foreach (Texture t in textures) {
       t.wrapMode = TextureWrapMode.Repeat;
       t.filterMode = FilterMode.Bilinear;
       t.mipMapBias = bias;


    }   
}

In Unity 3.4 everything looks ok inside the editor but the bias is not set on my IOS devices. Is there something changed in version 3.4 that I overlooked inside the Unity scripting reference manual?

Peter.

more ▼

asked Sep 04 '11 at 08:16 PM

TriplePAF gravatar image

TriplePAF
98 6 7 16

I havent tried it with 3.3, but now I have the same problem with Unity 3.4. Any progress / ideas?

Sep 28 '11 at 05:07 PM DerWoDaSo

Does applying the texture at runtime work for you? I am having a similar issue where my terrain looks entirely black after applying a texture at runtime.

Sep 28 '11 at 06:15 PM thenelson

Do you mean using the material.SetTexture() method? I think it works fine, but I will check that on the device again tomorrow.

Sep 28 '11 at 10:17 PM DerWoDaSo

My issue was with the terrain but I think I fixed it. I had changed the texture compression in the build settings, maybe something similar would work for you?

Sep 28 '11 at 11:00 PM thenelson
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I found the problem. It is the new mobile diffuse shader. After switching it back to something else like vertex colored the mipmap bias behaves correct.

Peter.

more ▼

answered Oct 11 '11 at 07:40 PM

TriplePAF gravatar image

TriplePAF
98 6 7 16

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2196
x1957
x37
x22
x11

asked: Sep 04 '11 at 08:16 PM

Seen: 1586 times

Last Updated: Oct 11 '11 at 07:40 PM