Jump to content
  • Advertisement
Sign in to follow this  
lomateron

ID3D10EffectMatrixVariable

This topic is 2482 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there any way of changing that (title) inside the hlsl and maintaining it changed or doing something similar, taking a buffer and putting there matrix, vector, etc variables then changing them in the hlsl mantaining the changed info.

Share this post


Link to post
Share on other sites
Advertisement
ID3D10EffectMatrixVariable is a reference to matrix variable in the shader. So if you change your matrix variable in your shader and don't update it from your program it should be maintaining it's last value.

Edit: I tried it now and I wasn't able to change it in the shader after binded with ID3DEffectVariable. Sorry for the misinformation.

Share this post


Link to post
Share on other sites
No, you can't modify a constant shader input, except by setting it normally (which sets a single constant value for the shader to read).

However, you can use shaders to modify/create a buffer of data by using stream-out ("render" to vertex buffer) or render-targets (render to texture).
e.g. you can use a texture as input to a shader, and have it generate a new texture (render-target) as output.

Share this post


Link to post
Share on other sites
Hidden
wait i think i need to describe more, after changing a variable in the hlsl file metods i want that changed variable to be there the next time i use the hlsl(for example the next frame)

Share this post


Link to post
ok then i will use the buffer, if i have only three 3D vectors(that i will put in the buffer) what will be faster, using a vertex buffer or a texture buffer

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!