Is there any way to access the vertex color in the vertex shader (ugly workaround or not)? The docs (http://www.defold.com/doc/materials#_vertex_shader_attributes) seem to explicitly state this is not possible. Why is this? It also states that Defold only reads mesh data (http://www.defold.com/doc/models), which is perfectly reasonable, but it’s natural to assume that would include the vertex color.
No, the engine does not currently read vertex color but that is a future feature. There is an ugly workaround. If you don’t need the normal you can switch color and normal in the Collada file and read it that way.
DEF-1536
Thanks. For my situation (not using normals) that’s probably a doable solution.
Any update on this? This currently not possible still?
I tried but didn’t seem to do anything.
What I want is to be able to do what this Unity shader does:
Is this a planned feature? To support vertex color for diffuse color of models with no texture required.
UnityVC.zip (157.3 KB) Zip of the package to be easier to see.
Based on what you say by ugly workaround to access the vertex color data for use in a shader, you mean editing the dae to swap data of a model like here?
I still have much to learn about shaders, materials.
Tested modifying dae like so
Edited fp
Ended up with this
This is desired look
I’m sure I’m doing something terribly wrong in my ignorance but it’s actually a better result with this model than with just using textures as the UVs are not working right for some reason. I would prefer to use vertex colors for diffuse rather than textures.