Re: [Bf-committers] Matcaps and PBVH

2013-05-26 Thread Brecht Van Lommel
On Sat, May 25, 2013 at 8:42 PM, Erik Sejersen wrote: > Anywho I've removed gl_Color and started using the attribute system. Smooth > shading isn't working for multires because of the use of indexed buffers. > Multires should still have the option to flat shade so a option would be to > add anothe

Re: [Bf-committers] Matcaps and PBVH

2013-05-25 Thread Erik Sejersen
I've tried printing out the shader when it's compiled and there doesn't seem to be any difference. It does seem like a bug because the gl_Color in the fragment shader depends on what varnormal is assigned in the vertex shader. I've tried setting varnomal to different colors and doing result = gl_C

Re: [Bf-committers] Matcaps and PBVH

2013-05-24 Thread Brecht Van Lommel
The fact that it doesn't work with flat shading is not a bug, the vertex normals add another attribute and you're probably not getting the right attribute id anymore in that case. The way this should be implemented is not through gl_Color, but the same as as other data layers passed to GLSL shader

[Bf-committers] Matcaps and PBVH

2013-05-23 Thread Erik Sejersen
Hi, I've found a way to get the mask information into the shader without using any gl calls. By adding gl_FrontColor = gl_Color to the vertex shader I can use gl_Color in the fragment shader. The only problem I have atm is that when I use flat shading mode the value og gl_Color in the fragment sha