areay wrote: ↑Wed Dec 20, 2017 10:31 pm
Out of interest what isn't working? Shader compilation or just doesn't take effect?
Hi Areay,
thank you for replying.
I also noticed the difference with other shaders (COlOR vs COLOR0), however I found out in help section that this semantic should be the same.
It was simply not working (but with no errors).
My problem was a bit more complicated, because I was creating manual object (with the colour information), converting it to mesh and expecting something out of the COLOR vector, but it was always zero in shader (even in VS shader). I suspect that there is somewhing wrong with the ConvertToMesh function. I also found similar problem here
https://forums.ogre3d.org/viewtopic.php?t=75536.
I was able to managed it in different way.
My problem was that I was not able to use anymore TEXCOORDs between my vertex and fragment shader (all UVs were already float4), but I was able to pass more information via TEXCOORDs to the vertex shader. Basically I precalculate some stuff in VS and pass it via TEXCOORDs to the FS to increase performance. That is why my number of TEXCOORDs to VS is lower than to FS and I still had some "free" VS TEXCOORDs. So I used some of the free slots to pass data to VS and I pass the data from VS to FS via COLOR semantic and this works fine.