Custom MaterialData UV & Parameter Bugs [SOLVED]

On 11/11/2014 at 10:45, xxxxxxxx wrote:

this is a normal behavior!! :slightly_smiling_face: , I tested it with standard material and it does the same!!!!

edit: this is a CONFIRMED bug, when I render, it renders correctly "OpenGL got a problem here" , it renders correct because it uses UVs , not spherical projection "like OpenGL"

On 16/11/2014 at 10:44, xxxxxxxx wrote:

There seems to be a problem in your example.
When you choose to use a shader. And you load an image into the shader. The preview icon is white.
This only happens with the sphere preview option.

I just ran into this same problem when writing my own R13 material plugin.
And I discovered that if I Shift+LMB on the sphere in preview window and rotate it 180 degrees in X. The image shows up properly.
So I guess we need a way to either show both sides of the sphere. Or some way to see the other side of the sphere in the material's preview window?


On 21/11/2014 at 11:38, xxxxxxxx wrote:

Any progress in fixing the sphere preview yet?


On 24/11/2014 at 10:57, xxxxxxxx wrote:


I have not found a solution for this particular issue yet.

best wishes,

On 24/11/2014 at 11:43, xxxxxxxx wrote:

OK. Thanks for the update.
At least I know now that it's not something I'm doing wrong.


On 28/11/2014 at 02:18, xxxxxxxx wrote:


in the standards preview scene the Texture Tag tiles the U coordinate. This way coordinates bigger than 1 are created. So a material must handle such coordinates. To make sure a shader will handle this properly the texture flags in the ChannelData object have to be set. This can be done using CALC_TEXINFO:

             ChannelData channelData(vd);  
             channelData.texflag = CALC_TEXINFO(((TexData* )vd->tex)->texflag, CHANNEL_ANY);  
             resultColor = _renderParamShader->Sample(&channelData);  

For further questions on materials please open a new thread. Thanks.

Best wishes,

On 28/11/2014 at 07:43, xxxxxxxx wrote:

Excellent. That fixes it.
Thanks Sebastian. :thumbsup: