Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


jerrycao_1985

Member Since 18 Sep 2012
Offline Last Active Aug 05 2014 06:32 AM

Topics I've Started

What is a uber shader?

25 July 2014 - 08:53 AM

I'm wondering what a uber shader is. My first impression about a uber shader is putting everything in one shader and choosing the path dynamically. Does the shaders in Unreal Engine count as uber shader? They have plenty of branches in their shader code, however most of them are based on static conditions which are defined by macros during shader compiling, not run time. Do these kind of shader fall into the cateogry of uber shader? Thanks

What does D3DCREATE_SOFTWARE_VERTEXPROCESSING mean?

28 January 2014 - 03:07 AM

Hi all

 

what does the flag "D3DCREATE_SOFTWARE_VERTEXPROCESSING" mean?

What it tells in the official document is quite limited, just the following line.

     Specifies software vertex processing.

 

So what does it mean by software vertex processing?

Does it mean that all of the vertex shader will be processed by CPU? I've totally no idea of it, however i guess it shouldn't be the case.

Or it will be very slow.

 

Please give me some pointers on it.

 

Thanks

Jerry


Perspective division in Vertex Shader? Is it allowed?

31 December 2013 - 02:25 AM

Hi:

 

I've tried to append a very simple line of code onto my vertex shader which works well for everything.

The code is something like this:

 

output.pos /= output.pos.w;

 

Yes, I'm doing perspective division by myself. I knew that the hardware will do it for me right after vertex shader.

However, I want to see if anything goes wrong if it's done in vertex shader.

 

It turned out that everything related to this shader is wrong, not just about the vertex attribute, also the position.

 

So, what's wrong with that code?

 

Thanks in advance for your attention.


How does depth bias work in DX10 ?

25 August 2013 - 09:36 PM

Hi all

 

I'm kind of confused by this article.

http://msdn.microsoft.com/en-us/library/windows/desktop/cc308048(v=vs.85).aspx

 

There is a formula in it :

Bias = (float)DepthBias * 2**(exponent(max z in primitive) - r) + SlopeScaledDepthBias * MaxDepthSlope;

 

First , what's ** after the number "2" ? Is it a typo ?

Second , about this part , exponent(max z in primitive) - r , could someone give me a more clear explanation ? It doesn't make any sense to me.

 

Thanks in advance.


How to define magfilter and minfilter exactly?

08 July 2013 - 03:24 AM

All

 

I've been wondering how exactly are magfilter and minfilter defined in DX.

I didn't find anything mention it in the official doc , did I miss anything?

 

Here is my understanding of these two terms. Pixels are not dots , they are actually grids. When sampling from a texture , we are sampling an area of the texture , not a single point . So some kind of filter is used to alleviate the artifacts. If the area is much larger than a texel , it's minfilter. And If the area is much smaller than a texel , it's magfilter.

But what if the area is less than a texel along one axis but much larger than a texel's grid along the other axis , which filter do we use ?

( I knew that it's a perfect situation for anisotropic filter , however , let's just forget about it. Assume we set point filter for magfilter and linear for min , what's the filter we will use in the above situation? )

 

Thanks for ur attention.


PARTNERS