using HLSL shader code to simulate fixed function lighting with other effects
My question is, if you need the simulated fixed function lighting along with other effects, would you add these effects to the same fx file and code it so that it executes before or after the lighting or would you keep your other effects in a separate fx file and run both effects at the same time? Don't know if you can run two different effects on the same geometry.
You can only have one vertex/pixel/geometry shader bound to the device at any one time. If you need to combine the effects of two shaders, you need to either manually combine the code from the two shaders or somehow do it in multiple passes (the latter approach isn't always feasible, it depends on what you're doing).
If you want to be more specific about what you're trying to accomplish, I can give you some more advice.
If you want to be more specific about what you're trying to accomplish, I can give you some more advice.
Quote:Original post by MJPThat's the answer I was looking for. I'm new to the shader scene and I had a feeling that might be the case but needed conformation. Thanks!
You can only have one vertex/pixel/geometry shader bound to the device at any one time.
I assume geometry shader is a new thing. Don't see much chatter on the subject.
Quote:Original post by howie_007
I assume geometry shader is a new thing. Don't see much chatter on the subject.
Geometry shaders were new for D3D10, and a lot of people are still working on the D3D9 level for various reasons. D3D11 actually added 3 more shader types!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement