RenderTexture Create failed: Please help.

Hi all,

I’ve applied the MirrorReflection2 script to my object and then changed the shader script to the additive reflection one i found on the forum so i could get transparent reflective glass. It was working beautifully last night. Shut down my machine, came in the next morning and i’ve got this error: RenderTexture Create failed: width or height is not a power of two. It directs me to line 80 of the MirrorReflection.cs script which is:

reflectionCamera.Render();

Can someone please tell me how i can fix this?

Thanks,
Rob

Ok, when i saw the reflections weren’t working i for some reason one of the texture size sliders and that’s why i got the error. But i can’t figure out why my reflections weren’t working before i changed the texture size. This is the script i am using from Aras for my shader:

Shader “FX/Mirror Reflection Additive” {
Properties {
_Color(“Color”, Color) = (1,1,1,1)
_ReflectionTex (“Reflection”, 2D) = “white” { TexGen ObjectLinear }
}
Subshader {
Blend One One
ZWrite Off
Pass {
SetTexture[_ReflectionTex] {
matrix [_ProjMatrix]
constantColor [_Color]
combine texture * constant
}
}
}
}

I’m brand new to unity so I’m sure I’m missing something very obvious!

Thanks,
Rob