Sign in to follow this  

short hlsl doubt

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

Good evening, I'm doing my final project programming Grpahic CArd for an image processing application. I have just a doubt, and I think you will can answer me really easily without take you many time. I know that you can write into oC registers with the mov instruction for after ps_2_0 versions. But using HLSL how can I choose the destinations registers? I need to write 17 floats. I made a transformation for a original image. So i will need 8 floats for weights for each neightborhood, 8 of them are the current values of the pixels in my texture (image) transformed, and the last one, is the pixel vale in my original image. I'm trying to made a joint histogram. And I have 20 floats possible, as I have 4 registers oC# (with four floats each one) and 4 more thans to oDepth. Can you tell me how to write this in HLSL? Or just indicated me where can i founded it ?? Thank you very much and hope to get a useful answer!!

Share this post


Link to post
Share on other sites
Great!! Thanks...
Just two short questions more!!
Where have you learn that??
...it's not wasy to found the documentation ...!
And the second one ...!
How can I tested if my graphic card doesn't support ps_2_0 ...
would be possible using ps_2_sw???

And..could it work using ps_2_sw if it doen-t support neither 4 semultaneously render target ??

Thanks xyzzy!!! Very Useful!

Jesus!

Share this post


Link to post
Share on other sites
Best place to learn about HLSL is looking at examples, because there really is a serious lack of documentation about it. Download the ATI Rendermonkey package, and the nVidia FX Composer. The nVidia one is better, but check them both out and try and go through the simple ones, like basic lighting for instance.

As for testing for Shader Model 2 compatibility, if you just want to know what your card supports then get the programs I mentioned above and try and load a VS/PS2.0 shader -- it wont work :( If you mean that you need to detect it on the users system, the information can be found in the Directx object class that you create on initialization.

Share this post


Link to post
Share on other sites
Hi!
The packages are great, and the examples too! But ... I have a doubt about them.

How can I program my effects ??
I have Just to wtire my Pixel Shader, Vertex Shader and define the inputs and constants ???

When I execute some projects...in the RenderMonkey they work (even they should use ps_2_0 ... but on the nvidia it doesn't. Wich is the reason ???
Thanks!
JEsus

Share this post


Link to post
Share on other sites
> Where have you learn that??
> ...it's not wasy to found the documentation ...!

I don't know.. it just seemed like how I would do it if I was writing it :)


> How can I tested if my graphic card doesn't support ps_2_0 ...

You can use D3DXGetPixelShaderProfile to determine which HLSL pixel shader profile your device supports.


> would be possible using ps_2_sw??? And..could it work using ps_2_sw if
> it doen-t support neither 4 semultaneously render target ??

I wouldn't consider using ps_2_sw unless you are using the Reference Rasterizer to render your scene. This can be VERY slow.

xyzzy

[Edited by - xyzzy00 on September 7, 2005 11:08:12 AM]

Share this post


Link to post
Share on other sites

This topic is 4481 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this