how to make a chrome shader (material) in unity 3d, real reflections ?

i need to make a chrome reflective shader in unity, i must say im learning the soft, but im working a proyect on it, not just chrome shader, i need a lot of reflective objects, im able to buy the shader if necesary, the proyect really need it, but i would like to know how to build it.

make any material reflective, excuse me for my ambigous question. thanks in advance

3 Answers

3

http://unity3d.com/support/documentation/Components/shader-ReflectiveFamily.html

http://answers.unity3d.com/questions/1422/how-to-do-a-reflective-shader-of-the-marble

http://www.unifycommunity.com/wiki/index.php?title=WindowShader

Those might help.

following shader script is useful to get chrome or reflection…

Shader “FX/Mirror Reflection” {
Properties {
_MainTex (“Base (RGB)”, 2D) = “white” {}
_ReflectionTex (“Reflection”, 2D) = “white” { TexGen ObjectLinear }
}

// two texture cards: full thing
Subshader {
Pass {
SetTexture[_MainTex] { combine texture }
SetTexture[_ReflectionTex] { matrix [_ProjMatrix] combine texture * previous }
}
}

// fallback: just main texture
Subshader {
Pass {
SetTexture [_MainTex] { combine texture }
}
}

}

I know this is the old post, but it appears in google search of “unity chrome shader” - so here we are, my chrome shader. It does not uses real reflection, as author asked, because it’s a quite expensive and requires Reflection Probe usage. Instead, it generates “pseudo-reflections”, based on view angle.