Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Cypher19

Is it possible to call an ASM shader technique under HLSL?

This topic is 5273 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

I'm using a HLSL vertex shader in my program, but still need to use vertex lighting, and of course I can't use the FF lighting in D3D9. I want to use the Lighting VS from the *surprise surprise* LightingVS example to integrate into my HLSL shader. However, it is not a HLSL, but an ASM shader. Is it possible in any way to incorporate the ASM code into the HLSL shader, or even better, call the ASM technique like a HLSL function in the HLSL shader? [edited by - Cypher19 on April 15, 2004 12:28:10 AM]

Share this post


Link to post
Share on other sites
Advertisement
Not really. Look up the shader fragment linker in the D3DX docs and see what they say, but in general you can''t simply call an asm function from HLSL code. The compiler doesn''t support mixing of asm and HLSL.

Your best bet by far is to understand what the asm shader is doing, rewrite it yoruself in HLSL and have it work on any target. You''ll get the benefit of target-agnostic shader code, and you might gain some good shader experience.

I like pie.

Share this post


Link to post
Share on other sites
Okay, thanks for the response. I was studying the MSDN library a bit to see an answer, and was starting to come to the conclusion that I''d have to translate.

It shouldn''t be that hard to disassemble the ASM shader though, right? A lot of the HLSL functions are like many ASM instructions. Plus, since the LightingVS has a #define for EVERY constant, that''s made wayy easier, huh?

Share this post


Link to post
Share on other sites
Shouldn''t be too hard. Some of the tricks you can do with the ASM aren''t obvious at first, but it just takes some digging. It''s actually pretty fascinating, if you''re me.

I like pie.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!