Notice: This plugin has been discontinued and is no longer receiving updates. Please direct all comments and questions to
the new jGfx thread.
Hi everyone, During development of a recent project I found the need for a faster alternative to Dark Shader's
Set Effect Constant Vector Element command. Although use of this plugin is a bit clunkier than the existing solutions it does come with a few advantages:
1) Does not require referencing constants by name each time they are manipulated
2) Set vector and matrix constants without needing to use DBPro's math resources
3) Can retrieve shader constant values
4) Matrix Array Support
The download comes with a few bare-bones examples to demonstrate basic usage, but because the plugin is merely a wrapper (and I'm not sure how many people will actually use this) I didn't bother to write any help files. You can find microsoft's documentation at
ID3DXBaseEffect interface and
ID3DXEffect interface.
Update 2/7/2017:
-Included two new examples showing usage of this plugin in conjunction with
MatBit's eXtendet Rotation plugin.
Update 2/18/2017:
-Updated Poke Vector4 to be slightly faster
-Added Poke Vector2/Poke Vector3 commands
-Added examples demonstrating batch rendering of up to 80 dynamic objects using vector arrays (with and without the eXtendet Rotation plugin)
Update 6/3/2017:
-Added 4 new commands: GetParameterBySemantic, GetParameterElement, GetValue, and SetValue
Update 7/28/2017:
-Added 5 new commands: ID3DXEffect_SetBoolVal, ID3DXEffect_SetFloatVal, ID3DXEffect_SetIntVal, ID3DXEffect_SetVectorVal, ID3DXEffect_SetMatrixVal for setting constants by value
Command List (44 total):
Poke Vector4==pMem, X#, Y#, Z#, W#
Poke Matrix4==pMem, _11#, _12#, _13#, _14#, _21#, _22#, _23#, _24#, _31#, _32#, _33#, _34#, _41#, _42#, _43#, _44#
SMesh_GetD3DXEffect==(pSMesh)
ID3DXEffect_GetParameterByName==(pD3DXEffect, hParam, NameStr)
ID3DXEffect_GetBool==(pD3DXEffect, hParam, ptr_Bool)
ID3DXEffect_SetBool==(pD3DXEffect, hParam, ptr_Bool)
ID3DXEffect_GetInt==(pD3DXEffect, hParam, ptr_Int)
ID3DXEffect_SetInt==(pD3DXEffect, hParam, ptr_Int)
ID3DXEffect_GetFloat==(pD3DXEffect, hParam, ptr_Float)
ID3DXEffect_SetFloat==(pD3DXEffect, hParam, ptr_Float)
ID3DXEffect_GetVector==(pD3DXEffect, hParam, ptr_Vector)
ID3DXEffect_SetVector==(pD3DXEffect, hParam, ptr_Vector)
ID3DXEffect_GetMatrix==(pD3DXEffect, hParam, ptr_Matrix)
ID3DXEffect_SetMatrix==(pD3DXEffect, hParam, ptr_Matrix)
ID3DXEffect_GetMatrixTranspose==(pD3DXEffect, hParam, ptr_Matrix)
ID3DXEffect_SetMatrixTranspose==(pD3DXEffect, hParam, ptr_Matrix)
ID3DXEffect_SetArrayRange==(pD3DXEffect, hParam, Start, Stop)
ID3DXEffect_GetBoolArray==(pD3DXEffect, hParam, ptr_BoolArr, Count)
ID3DXEffect_SetBoolArray==(pD3DXEffect, hParam, ptr_BoolArr, Count)
ID3DXEffect_GetIntArray==(pD3DXEffect, hParam, ptr_IntArr, Count)
ID3DXEffect_SetIntArray==(pD3DXEffect, hParam, ptr_IntArr, Count)
ID3DXEffect_GetFloatArray==(pD3DXEffect, hParam, ptr_FloatArr, Count)
ID3DXEffect_SetFloatArray==(pD3DXEffect, hParam, ptr_FloatArr, Count)
ID3DXEffect_GetVectorArray==(pD3DXEffect, hParam, ptr_VecArr, Count)
ID3DXEffect_SetVectorArray==(pD3DXEffect, hParam, ptr_VecArr, Count)
ID3DXEffect_GetMatrixArray==(pD3DXEffect, hParam, ptr_MatArr, Count)
ID3DXEffect_SetMatrixArray==(pD3DXEffect, hParam, ptr_MatArr, Count)
ID3DXEffect_GetMatrixTransposeArray==(pD3DXEffect, hParam, ptr_MatArr, Count)
ID3DXEffect_SetMatrixTransposeArray==(pD3DXEffect, hParam, ptr_MatArr, Count)
ID3DXEffect_GetMatrixPointerArray==(pD3DXEffect, hParam, ptr_pMatArr, Count)
ID3DXEffect_SetMatrixPointerArray==(pD3DXEffect, hParam, ptr_pMatArr, Count)
ID3DXEffect_GetMatrixTransposePointerArray==(pD3DXEffect, hParam, ptr_pMatArr, Count)
ID3DXEffect_SetMatrixTransposePointerArray==(pD3DXEffect, hParam, ptr_pMatArr, Count)
ID3DXEffect_GetParameterElement==(pD3DXEffect, hParam, ElementIndex)
ID3DXEffect_GetParameterBySemantic==(pD3DXEffect, hParam, SemanticNameStr)
ID3DXEffect_GetValue==(pD3DXEffect, hParam, pData, pBytes)
ID3DXEffect_SetValue==(pD3DXEffect, hParam, pData, pBytes)
ID3DXEffect_SetBoolVal==(pD3DXEffect, hParam, BoolVal)
ID3DXEffect_SetFloatVal==(pD3DXEffect, hParam, FloatVal#)
ID3DXEffect_SetIntVal==(pD3DXEffect, hParam, IntVal)
ID3DXEffect_SetVectorVal==(pD3DXEffect, hParam, X#, Y#, Z#, W#)
ID3DXEffect_SetMatrixVal==(pD3DXEffect, hParam, _11#, _12#, _13#, _14#, _21#, _22#, _23#, _24#, _31#, _32#, _33#, _34#, _41#, _42#, _43#, _44#)
This plugin only provides wrapper commands for members I thought people might find useful. If I've missed anything important let me know.