Hi guys,
I’m getting this error that says that subshader not supported by graphic card when i do UsePass but when i apply the original shader to the material it does work.m i doing something wrong?
Here are the shaders
SHADER1
Shader “TestShader”{
Properties{
_Color (“Main Color”, Color) = (1,1,1,0)
_SpecColor(“Specular Color”, Color) = (1,1,1,1)
_Emission(“Emmisive Color”,Color) = (1,1,1,1)
_Shininess(“Shininess”,Range(0.01,1)) = 0.7
_MainTex(“Base (RGB)”,2D) = “white” {}
}
SubShader{
Pass{
Name “ts1”
Material{
Diffuse[_Color]
Ambient[_Color]
Shininess [_Shininess]
Specular [_SpecColor]
Emission [_Emission]
}
Lighting On
SeperateSpecular On
SetTexture [_MainTex]{
constantColor[_Color]
Combine texture * primary
}
}
}
}
SHADER2
Shader “TestShader2”{
Properties{
_Color (“Main Color”, Color) = (1,1,1,0)
_MainTex(“Base (RGB)”,2D) = “white” {}
}
SubShader{
UsePass “TestShader/ts1”
Pass{
Blend SrcColor DstColor
Material{
Diffuse[_Color]
Ambient[_Color]
}
Lighting On
SetTexture [_MainTex]{
constantColor[_Color]
Combine texture * primary
}
}
}
}
Thx