# How to share matrix in HLSL?

matrix worldMatrix : register(vs_4_0, b0);

1. If I set this from one effect file, will it effect every effect file which has the same type of variable assigned to that specific register?
2. What is the difference between this and the cbuffer struct?

• They are and its being set from a different Effect but not working. Does the set need to be different? i.e. do I need to specify what register from c++ code? All I am doing is ID3D10EffectMatrixVariable#SetMatrix from one HLSL. – bluejamesbond Jan 21 '14 at 17:23