Issues with MHWRender::MPxShaderOverride::drawGeometry()

Issues with MHWRender::MPxShaderOverride::drawGeometry()

jesus.gumbau
Observer Observer
324 Views
0 Replies
Message 1 of 1

Issues with MHWRender::MPxShaderOverride::drawGeometry()

jesus.gumbau
Observer
Observer

Hi,

 

I am calling MPxShaderOverride::drawGeometry() to render my objects from my shader override on Maya 2022 (Mac). I am internally generating GLSL shaders which I use for rendering.

 

The problem is that Maya seems to properly bind the Vertex and Normal vertex buffers to my GLSL 1.5 core shader, but I am not able to get the texture coordinates bound properly. The geometry requirements are properly set up during initialization.

 

I was able to get them properly bound to my shader if I write the binding / drawing OpenGL code (instead of using MPxShaderOverride::drawGeometry()). However, this increases the complexity of my code and I'd prefer not to do this manually.

 

So the questions are:

- Why is Maya properly binding the Vertex / Normal streams (and not the texture coordinates) ?

- Is there any limitation of MPxShaderOverride::drawGeometry() which makes you write your own code to handle this?

- How does Maya decide how to bind the vertex streams to my custom GLSL 1.5 core shader without me explicitly setting the stream locations?

 

Cheers.

0 Likes
325 Views
0 Replies
Replies (0)