Jump to content
  • Advertisement
Sign in to follow this  
Sagito

Pixel Shader Profile Question

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

Hi... I'm trying to use pixel shading for the first time in my graphical engine (learning as I go...) To compile a shader, I use the D3DXGetPixelShaderProfile function to get the highest HLSL profile that my device can use (a HAL Device). In my old laptop, that function returns NULL, what means that my device does not support HLSL (correct?). But, if I force the compiler to use "ps_1_1" for example (did not try further versions), it will render correctly, although very slowly. So, what is happening here? Is the device falling back to REF or something? Maybe this is just an idiot question, but it left me very curious about this... Thanks in advance...

Share this post


Link to post
Share on other sites
Advertisement
The documentation says exactly that - "If the device does not support pixel shaders then the function returns NULL."

I don't see how it can render anything that's pixel shaded unless it's using REF, but non shaded things will obviously still render (and vertex shaders can always be done in software on any device).

Share this post


Link to post
Share on other sites

I did a very simple test code for the pixel shading which draws a sphere created with D3DXCreateSphere, with a texture and nothing else is rendered... The device is specified as HAL in CreateDevice (I think I've never used REF, to be quite honest). Also, no vertex shaders were specified (they are present in the engine, but are never applied in this sample). Can the device be turning himself to REF to try to "survive" and not crash or something? =X

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!