Jump to content
  • Advertisement
Sign in to follow this  
Silver Fox

DirectX10 Highlighting

This topic is 3718 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 am a beginner for directx 10 programming,and I have a problem how to highlight an object(make it reflect rays on the edge). Can anyone give me any suggestions? Thanks for help.

Share this post


Link to post
Share on other sites
Advertisement
Did you mean specular effect?

You can turn it on by setting the render state.

p9device->SetRenderState(D3DRS_SPECULARENABLE, true);

But you must setting up the light already.

Hope this will help.

Share this post


Link to post
Share on other sites
Quote:
Original post by jollyjeffers
Do you mean bloom?



Yes,do you have any good ideas?By the way,I am using direct10.

Share this post


Link to post
Share on other sites
Quote:
Original post by haxpor
Did you mean specular effect?

You can turn it on by setting the render state.

p9device->SetRenderState(D3DRS_SPECULARENABLE, true);

But you must setting up the light already.

Hope this will help.




Excuse me,it seems like some direct9 code,how can I do this using direct10?

Share this post


Link to post
Share on other sites
Specular is not what you want (that is a component of the BRDF lighting model) - yes, it makes things shiny, but it doesn't make things glow.

You cannot use that code in D3D10 - those functions are all "fixed function" which was completely dropped.

Look at the PostProcess sample in the SDK. It's not for D3D10, but the algorithm is the same and the implementation is going to be very close. Otherwise, try digging around in ATI and Nvidia's developer SDK's.

hth
Jack

Share this post


Link to post
Share on other sites
Thank you very mush for help,the edge glow effect is just what I want.

Otherwise,do you have any references on this topic about D3D10.

Share this post


Link to post
Share on other sites
Hi,Jack!At last I have made out what the glow effect is and how I can perform it.And just as you said,the source code of nvidia samples is a little complex.

Commonly,we have to do three steps of job.First,do a normal-based edge detection(seperate the edge and other part of the object with different colors).Then,perform a blur effect.Finally,combine the result with the original image.Is that right?

Otherwise,I find myself difficult in the HLSL language,can you introduce me some useful books.


Thanks for your help.

Share this post


Link to post
Share on other sites
Quote:
Original post by Silver Fox

Commonly,we have to do three steps of job.First,do a normal-based edge detection(seperate the edge and other part of the object with different colors).Then,perform a blur effect.Finally,combine the result with the original image.Is that right?



Yes, that's the basic gist of it. Typically the image is also downscaled for a process like this, then upscaled and combined with the original. This make the blurring cheaper, and also makes the glow have a greater effect.



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.

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!