Using two color values per vertex in shader

Started by
2 comments, last by Gagga 17 years, 6 months ago
Hello, I just moved my terrain engine to shaders after a small introduction tutorial. I am using the primary vertex color to blend between 3 different textures. Still I would like to use another color to slightly vary the blended textures on a per vertex base. So the question arises: Can I also get another color than gl_Color into my vertex shader program?
Advertisement
by passing it as a per-vertex attribute...
you'll probably want to go read up on them...
Assuming you're using GLSL (since you didn't specify), whats wrong with just using a spare vertex attribute?
Hello,

"vertex attribute" was all I needed to hear :-) I just didn't come over these in my tutorials yesterday.

Thank you!

This topic is closed to new replies.

Advertisement