DirectX10 Highlighting

Started by
10 comments, last by MJP 15 years, 11 months ago
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.
Advertisement
Do you mean bloom?

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

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.
Just keep doing!
Quote:Original post by jollyjeffers
Do you mean bloom?



Yes,do you have any good ideas?By the way,I am using direct10.
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?

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

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

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.
This Nvidia sample may well demonstrate bloom. Chances are it'll be a very complex sample, but give it a try and see where you end up [smile]

Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

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.
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.



This topic is closed to new replies.

Advertisement