Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBrother Bob

Posted 22 July 2013 - 12:10 PM

How so? If that were true you could just simulate a normal map where everything is (0, 0, 1) and be done with it :-)

 

I suppose you could do this, instead of loading 1 out of those 2 normal maps that are used in that example, personally I think this idea of yours has merit, this way you can save on texture bandwidth.  But this is besides the point, whether you use a straight blue texture or just define all the unprocessed normals in the fragment processor as all (0,0,1).  is irrelevant to what the shader is ultimately doing.  

The nVidia sample is using a normalization cube map, it's this map that will be helping to adjust the light for the contours of the model.  This cube map is a world space normal map, it's not (0, 0, 1) like the tangent map.  But again, you are absolutely right, the tangent map is useless if there is no intention to add extra detail between the vertices of a low-poly model.  It's just that this code example is set up this way.  Your idea will optimize that shader for cases like this where the bump detail is not needed.  


#10marcClintDion

Posted 22 July 2013 - 03:06 AM

There is far too much arrogance and out right abuse by site moderators, they are teaching other people to behave this way.  The posts I've made will all be shorty removed and replaced with this notice.  Game development is not the only thing being taught here, bad behavior is being taught as well.


#9marcClintDion

Posted 30 June 2013 - 12:53 PM


How so? If that were true you could just simulate a normal map where everything is (0, 0, 1) and be done with it :-)

 

I suppose you could do this, instead of loading 1 out of those 2 normal maps that are used in that example, personally I think this idea of yours has merit, this way you can save on texture bandwidth.  But this is besides the point, whether you use a straight blue texture or just define all the unprocessed normals in the fragment processor as all (0,0,1).  is irrelevant to what the shader is ultimately doing.  

The nVidia sample is using a normalization cube map, it's this map that will be helping to adjust the light for the contours of the model.  This cube map is a world space normal map, it's not (0, 0, 1) like the tangent map.  But again, you are absolutely right, the tangent map is useless if there is no intention to add extra detail between the vertices of a low-poly model.  It's just that this code example is set up this way.  Your idea will optimize that shader for cases like this where the bump detail is not needed.  


#8marcClintDion

Posted 30 June 2013 - 12:53 PM


How so? If that were true you could just simulate a normal map where everything is (0, 0, 1) and be done with it :-)

 

I suppose you could do this, instead of loading 1 out of those 2 normal maps that are used in that example, personally I think this idea of yours has merit, this way you can save on texture bandwidth.  But this is besides the point, whether you use a straight blue texture or just define all the unprocessed normals in the fragment processor as all (0,0,1).  is irrelevant to what the shader is ultimately doing.  

The nVidia sample is using a normalization cube map, it's this map that will be helping to adjust the light for the contours of the model.  This cube map is a world space normal map, it's not (0, 0, 1) like the tangent map.  But again, you are absolutely right, the tangent map is useless if there is no intention to add extra detail between the vertices of a low-poly model.  It's just that this code example is set up this way.  Your idea will optimize that shader for cases like this where the bump detail is not needed.  

 


You could probably also get something that looks better if you instead sampled the terrain normals in the pixel shader instead of the vertex shader, since then you'd get values interpolated between 4 normals instead of 3.

 

This idea of a more accurate sampling due to an increase of information is enhanced further by math that is automatically done by the GPU.  Smoothing math is being implemented automatically on a per-fragment basis.   Information used in the fragment processor is being curved to approximate a perfectly rounded surface. 

This idea is similar to adding more control points to a bezier curve, the GPU does this to vectors automatically when they are sent to the fragment processor.

This is why I said that I'm surprised that you see no difference when you perform the normalization in the fragment processor.  You should see a noticeable difference when you do this..


#7marcClintDion

Posted 30 June 2013 - 12:33 PM


How so? If that were true you could just simulate a normal map where everything is (0, 0, 1) and be done with it :-)

 

I suppose you could do this, instead of loading 1 out of those 2 normal maps that are used in that example, personally I think this idea of yours has merit, this way you can save on texture bandwidth.  But this is besides the point, whether you use a straight blue texture or just define all the unprocessed normals in the fragment processor as all (0,0,1).  is irrelevant to what the shader is ultimately doing.  

The nVidia sample is using a normalization cube map, it's this map that will be helping to adjust the light for the contours of the model.  This cube map is a world space normal map, it's not (0, 0, 1) like the tangent map.  But again, you are absolutely right, the tangent map is useless if there is no intention to add extra detail between the vertices of a low-poly model.  It's just that this code example is set up this way.  Your idea will optimize that shader for cases like this where the bump detail is not needed.  


#6marcClintDion

Posted 30 June 2013 - 12:32 PM


How so? If that were true you could just simulate a normal map where everything is (0, 0, 1) and be done with it :-)

 

I suppose you could do this, instead of loading 1 out of those 2 normal maps that are used in that example, personally I think this idea of yours has merit, this way you can save on texture bandwidth.  But this is besides the point, whether you use a straight blue texture or just define all the unprocessed normals in the fragment processor as all (0,0,1).  is irrelevant to what the shader is ultimately doing.  

The nVidia sample is using a normalization cube map, it's this map that will be helping to adjust the light for the contours of the model.  This cube map is a world space normal map, it's not (0, 0, 1) like the tangent map.  But again, you are absolutely right, the tangent map is useless if there is no intention to add extra detail between the vertices of a low-poly model.  It's just that this code example is set up this way.  Your idea will optimize it for cases like this where the bump detail is not needed.  


PARTNERS