- Home /
Custon shaders on Flash
Hello.
I'm having some weird issues on a Flash build. Everything works fine in the editor, but once I build, things either don't work at all or look very different from how they looked in the editor. Here's the shader code for a mirror reflection shader:
Shader "FX/Mirror Reflection" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_LightMapTex("LightMap (RGB)", 2D) = "white" {}
_ReflectionControl ("Reflection Control", Color) = (0.7,0.7,0.7,0.9)
_ReflectionTex ("Reflection", 2D) = "black" { TexGen ObjectLinear }
}
// two texture cards: full thing
Subshader {
Lighting On
Pass {
SetTexture[_ReflectionTex]
{
matrix [_ProjMatrix]
constantcolor [_ReflectionControl]
combine constant lerp (constant) texture
}
SetTexture[_MainTex] { combine previous +- texture }
SetTexture[_LightMapTex] {combine texture +- previous }
}
}
// fallback: just main texture
Subshader {
Pass {
SetTexture [_MainTex] { combine texture }
SetTexture[_LightMapTex] {combine texture lerp (texture) previous }
}
}
}
There's also code that sets up another camera that writes into the render texture.
This is how it looks in the editor:
And this is how it looks in the build:
In other words, all it draws is the lightmap...
Your answer
Follow this Question
Related Questions
Lightmap textures appearing where they shouldn't in build. 0 Answers
Blend Cubemaps in reflection probe 1 Answer
Unity5, standard shaders and cubemaps 2 Answers
Sun that is not part of the scene or the skybox relfects from Water4 1 Answer
Self-Illum Fresnel Reflective Bumped Specular issue 0 Answers