标签:style blog http color io os ar 2014 sp
pc编写GLSL:
Shader "Custom/GLSL" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
pass{
GLSLPROGRAM
#ifdef VERTEX
void main()
{
gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex;
}
#endif
#ifdef FRAGMENT
void main()
{
gl_FragColor = vec4(1,0,0,0);
}
#endif
ENDGLSL
}
}
}
出现:shader has error or is not supported by your graphics card
需要通过这样的设置:(设置完后需要重启unity)
重启后的效果:
标签:style blog http color io os ar 2014 sp
原文地址:http://www.cnblogs.com/U-tansuo/p/unity_GLSL.html