- Home /
Question by
atozpp · May 09, 2018 at 02:01 PM ·
shadersshader programmingopenglshader writingglsl
Can one write glsl shaders in Unity 2017? I cant make this shader work. The expected color should be red but I get black.
,Shader "TEST" { Properties {
} SubShader {
Pass{
Tags {"LightMode" = "ForwardBase"}
GLSLPROGRAM
#include "UnityCG.glslinc"
#ifdef VERTEX
void main()
{
gl_Position = gl_Vertex * glModelViewProjectionMatrix;
}
#endif
// Fragent shader
#ifdef FRAGMENT
void main()
{
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}
#endif
ENDGLSL
}
}
Fallback "Diffuse"
}
Comment
Your answer
Follow this Question
Related Questions
Compile Shader Graph to GLSL 0 Answers
How to pass vertex color information into GLSL shaders program 1 Answer
Is a water shader with these features possible or easy to make? 1 Answer
Shader Help 0 Answers
A Cg shader semantic problem 2 Answers