MShaderInstance from MPxHardwareShader

MShaderInstance from MPxHardwareShader

Anonymous
適用対象外
428件の閲覧回数
2件の返信
メッセージ1/3

MShaderInstance from MPxHardwareShader

Anonymous
適用対象外

How do I create an MShaderInstance from a class derived from MPxHardwareShader? The documentation for MShaderManager has a method MShaderInstance* geShaderFromNode(), but it requires surfaceShader as an MObject type.

0 件のいいね
429件の閲覧回数
2件の返信
返信 (2)
メッセージ2/3

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

I don't think you can, MPxHardwareShader is a VP1 interface.

 

You can find more porting details here.

http://images.autodesk.com/adsk/files/VP2_API_Porting_Guide_Details0.pdf

 

Yours,

Li

メッセージ3/3

Anonymous
適用対象外

Yup. It seems I can't.

 

I have heavily modified dx11Shader plugin and was wondering how to use this as a scene level shader for a class derived from MSceneRender. I have come up with a way to do this without using shaderOverride method of MSceneRender. I have created a named set in my scene. Inside my plugin I am enumerating all the objects and using a sequence of MGlobal::execute() methods to put them in my shading group. 

 

BTW, thanks for the link. It describes the philosophy behind API design. We need such docs for APIs in addition to docs containing references describing methods and classes 😉

0 件のいいね