Quantcast
Channel: Latest Questions by Wrymnn
Viewing all articles
Browse latest Browse all 131

How to use array in cg shader

$
0
0
I want to use array in my shader. I know how to pass value: shaderMat.SetFloat("_Sample0", 150); In my shader, I have declared: uniform float _Sample[2]; But when I try to access the values as **_Sample[0]** or **_Sample[1]** it doesnt work. It seems all indexes has value 0 in them no matter what I do. Please, any ideas? Thanks

Viewing all articles
Browse latest Browse all 131

Trending Articles