- Home /
Question by
FlyingOstriche · Sep 23, 2012 at 05:57 PM ·
shaderinteger
Shader setting integer
I want to be able to tell a shader what order the object I'm drawing is in. I get parser error on line 4.
Shader "testShader" {
Properties {
_Color ("Main Color", Color) = (.5,.5,.5,.5)
layer("Layer",int)= 1000 <<< line 4
}
SubShader {
Ztest Always
Tags(Queue=layer)
Pass {
Material {
Diffuse [_Color]
}
}
}
}
Comment
Answer by xlk · Sep 14, 2016 at 12:56 AM
layer("Layer", Int)= 1000 <<< line 4
It needs an uppercase "I" ;D , just had this problem myself... Check this link for shader properties: https://docs.unity3d.com/Manual/SL-Properties.html
Your answer
Follow this Question
Related Questions
Bitwise & Operator in Shaders? 1 Answer
Can't use "Integer" type in Shader property? 0 Answers
How to force the compilation of a shader in Unity? 5 Answers
Apply a bumped shader on top of a custom vertex shader 1 Answer
What are normals? 1 Answer