Jump to content

  • Log In with Google      Sign In   
  • Create Account

Mona2000

Member Since 08 Sep 2011
Offline Last Active Today, 04:11 PM

Posts I've Made

In Topic: How does hardware instancing work on the pixel shader level?

Today, 09:07 AM

Maybe he put the ddx and ddy calls inside the loop?


In Topic: What is this artifact in my shadow map?

18 May 2016 - 01:10 PM

You know exactly what I meant (dedicated hardware vs generic programmable unit).
I did not call you out. I simply corrected some misleading information in your first post. You said

I don't think that is exactly how it works

which was incorrect, because that's exactly how it works. And then you said

Besides, anything you do in a shader program is on the hardware, and it sure isn't free.

implying that the term hardware was misused, which it was not, since even NVIDIA uses it in the link I posted earlier (all other card vendors have hardware PCF too, by the way. In D3D10 they even added comparison samplers to the core spec)
I'm not sure why you got so angry over a simple correction.

In Topic: What is this artifact in my shadow map?

18 May 2016 - 12:33 PM

What do you think a shader is? Shaders are executed on the hardware friend. And tex2DProj is a function that does some amount of work for you that you are just not doing manually, it is most certainly not a "free" operation. You can write your own PCF filter in a pixel shader, why would you ever write it on the software side?

 
You are wrong about performing PCF manually in the shader not being slower. See chapter 6.2 in this official NVIDIA document
 

“Hardware shadow mapping”
means that we have dedicated special transistors specifically for performing the shadow map depth comparison and percentage-closer filtering operations. We recommend that you take advantage of this feature, as it produces higher quality filtered shadow map edges very efficiently. Because dedicated transistors exist for hardware shadow mapping, you will lose performance and quality if you try to emulate our shadow mapping algorithm with ps_2_0 of higher.


In Topic: Pixel Shader 3 weirdness

18 May 2016 - 12:31 PM

Could it be because ps_3_0 requires a vs_3_0 vertex shader?


In Topic: What is this artifact in my shadow map?

16 May 2016 - 12:48 PM

" I'm using the tex2Dproj function to get a free hardware PCF filter"

 

I don't think that is exactly how it works. Besides, anything you do in a shader program is on the hardware, and it sure isn't free.

 

It does work like that (it's a D3D9 extension that every card supports nowadays), and the term is correct as the filtering is performed by the hardware and not by calculations in the shader (software).


PARTNERS