While recompiling an older project, i started to notice a gradient to black when i draw using the regular Cinder-Warping functionality. I quickly ran the template / basic test that comes with the blog and experience the same effect.
Is there a simple explanation why this is happening?
I assume it has to do with some default shader settings?
I’m running cinder_master on macos sierra.
@paul.houx am i missing something obvious?
I looked a bit closer and found that the problem is the default “edge” values.
As i’m not using edges, so my very quick fix is to open the saved warps.xml file and change the default edge values from
<edges left="0" top="0" right="0" bottom="0"/> to
<edges left="0" top="0" right="1" bottom="1"/>
I’m still not completely clear on the details but i figured that the gradient is caused by the edge values.
There’s a difference how edge values are handled outside of the class and inside the class.
Getters/Setters of edge accept values between 0.0 - 1.0 where 0 means no edge and 1 means full edge.
But internally, left and top edge use values 0.0 - 1.0 but right and bottom edge use 1.0 - 0.0 where 1.0 means no edge use. The xml file seems to use the internal used numbers.
Thanks for notifying me. I’ll have a look later.
Edge values are used for edge blending and should actually all be zero if no edge blending is required, but it may very well be that the shader code expects 1 for the right and bottom edges, which is confusing. Your solution should work for now, but I’ll properly fix it.
You can set the edges to zero