Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading and using an HLSL shader?

Tags:

c++

c

direct3d

hlsl

I've been looking everywhere and all I can find are tutorials on writing the shaders. None of them showed me how to incorporate them into my scene.

So essentially:

Given an hlsl shader, if I were to have a function called drawTexturedQuad() and I wanted the shader to be applied to the result, how exactly could I do this?

Thanks

like image 519
jmasterx Avatar asked Jan 18 '26 09:01

jmasterx


1 Answers

ID3DXEffect provides Begin() and BeginPass() methods. Simply call drawQuad() during that time. Any basic tutorial on shaders should show such a sample.

Just an additional note- if in doubt, ask MSDN.

like image 179
Puppy Avatar answered Jan 20 '26 00:01

Puppy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!