Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Quat

Member Since 15 Sep 2003
Offline Last Active Jul 01 2015 08:35 PM

Topics I've Started

Animated Texture Design

01 July 2015 - 12:30 PM

I'm rethinking where to animate my texture coordinates for materials like water where I scroll normal maps.  Basically, I'm debating whether the texture transform should be a material property or an object property.

 

Suppose I have a "pondwater" material.  If I make the tex transform a property of the material, I will end up with different "pondwater" materials that only differ on how they scroll textures (velocity).  

 

If I make the tex transform a property of the object, then different pond objects can use the same "pondwater" material, but specify a different scrolling velocity.  However this means the object has to have knowledge that it has a material that needs scrolling texture coordinates.  

 

Both seem workable.  I'm just wondering if there is a standard place to implement animated texture coordinates.


Modeling Light Sources

27 January 2015 - 07:12 PM

I'm reworking my shaders to be "physically based".  In the old fixed function days, we had lights that emitted separate diffuse light, and specular light to give artistic control.  Should this still be done with physically based shading?  To me, a light source just gives off light.  Based on fresnel, a fraction will be reflected and based on roughness give the specular highlight.  Assuming opaque material, the "refracted" light will subsurface scatter and then re-emit from the surface to give diffuse reflectance. 

 

However, is it still useful to have separate "diffuse light" and "specular light"?  Or should there just be one light color vector?

 

 

 

 


Radiance Question

13 December 2014 - 09:42 PM

I'm reading about the radiometry terms and have come to radiance.  The books mention that radiance does not change with distance.  I think I get why.  But what I don't get is if we are working with radiance, which supposedly does not change with distance, then why do we do distance attentuation in our lighting shaders?   

 

 

 


cbuffer per object or share one cbuffer

08 August 2014 - 12:34 PM

Say you have N static objects with different world transforms.  What method is better:

 

1. N constant buffers.  Update once, then just change binding per object.  Pro: No Map/Discard overhead for static objects.  Con: Binding overhead.

 

2. 1 constant buffer.  Map/Discard per object.  Pro: Lower memory presumably (probably not a big deal), only one bind call.  Con: Lots of Map/Discard. 

 

Googling around people seem to say both methods work out about the same performance wise.  Is there any recommendations from AMD/NVIDIA? 

 

I looked at http://gamedevs.org/uploads/efficient-buffer-management.pdf

 

and it says "One for per - object constants (World matrix, dynamic material properties, etc )", but it is not clear is it means exactly one cbuffer, or one cbuffer for every object. 


Supporting Various "Position" formats

08 July 2014 - 09:20 AM

So far my engine always used 32-bit float3 to store position in a vertex.  To integrate with a middleware package, my engine needs to support half position 16-bit float4.  Some parts of my engine need to read the vertex data on the CPU side (say to compute a bounding box).  Does someone have a clean solution for this besides if/else states like:

 

if(half format)

{

    cast to half*

}

else

{

    cast to float*

}

 

 


PARTNERS