HLSLMaterialHandle.SetTextureParameter() dont work ?

HLSLMaterialHandle.SetTextureParameter() dont work ?

kevin.kelley
Explorer Explorer
448 Views
1 Reply
Message 1 of 2

HLSLMaterialHandle.SetTextureParameter() dont work ?

kevin.kelley
Explorer
Explorer

Why don't this code work, all i get is black material on a simple plane, i have spent 2 days trying to solve this.

 

Project I am using is "howto\Graphics\HLSLShaderMaterials"

Just trying to simply set a texture in the shader.

 

HLSLMaterialHandle handle = GetHLSLMaterialHandle(featureLevel);

TextureHandleUtility::CreateTextureHandle(Texmap*, TimeValue);
handle.SetTextureParameter (_M("texture_name_in_fx_file"), hTexture);

 

"Texmap*" is valid, the material handle is valid and i can set 'float' values.

No errors when the shader compiles.

Ive tested the shader.fx in a 'DirectX Shader' material, it works and renders textures correctly.

 

0 Likes
449 Views
1 Reply
Reply (1)
Message 2 of 2

kevin.kelley
Explorer
Explorer

I can not get HLSLMaterialHandle.SetTextureParameter() to update a texture, is this method not implemented by the interface ?

 

I have found a work around, I have tested IDX9DataBridge and can set/update textures through IHardwareMaterial.

0 Likes