- Home /
Kindle Fire , shader not working properly
Hi,
There seems to be a problem with a shader I'm using for vertex paint unlit. The shader works fine on other android devices except for kindle.
The blue part in the center is using the vertex paint shader. The image should look like this :
In the first image you can't see the shadows , those are vertex painted in.
Is there any way I can fix this issue?
Here's the shader code:
Shader "VertexPaintUnlit" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Pass {
ColorMaterial AmbientAndDiffuse
SetTexture [_MainTex] {Combine texture * primary, texture * primary}
}
}
}
Here are my build settings :
minimum api level 2.2;
armv 7 only;
opengl es 2.0;
Does any one know of a unlit vertex paint shader that works on Kindle fire?
Answer by swashi · May 31, 2013 at 03:18 AM
Not sure if you still have this issue, but I had it for months as well. I don't know much about shaders, but I eventually messed with one enough so that it fixed the problem. I believe it had to do with setting the texture multiple times because that's where the color stopped being blue. Hope this helps.
Shader "nVertexShader" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
Category {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
ZWrite On
Blend SrcAlpha OneMinusSrcAlpha
SubShader {
Material {
Diffuse [_Color]
Ambient [_Color]
}
Pass {
ColorMaterial AmbientAndDiffuse
Fog { Mode Off }
Lighting Off
SetTexture [_MainTex] {
Combine texture * primary, texture * primary
}
SetTexture [_MainTex] {
constantColor [_Color]
Combine previous , previous * constant
}
}
}
}
}
Your answer
![](https://koobas.hobune.stream/wayback/20220613080700im_/https://answers.unity.com/themes/thub/images/avi.jpg)