Jump to content

  • Log In with Google      Sign In   
  • Create Account


Deferred Shading + Anisotropic Spec?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 lpcstr   Members   -  Reputation: 119

Like
0Likes
Like

Posted 29 April 2013 - 07:13 PM

I was thinking about the feasibility of using a flexible anisotropic specular as the primary BRDF in a deferred shading setup. You'd obviously have to store two roughness parameters in the gbuffer instead of one. My question is, wouldn't you also have to store the tangent and bitangent vectors, since those are needed by the BRDF? That would require a lot of space in the gbuffer.  wacko.png


Edited by lpcstr, 29 April 2013 - 07:17 PM.


Sponsor:

#2 Bacterius   Crossbones+   -  Reputation: 7005

Like
0Likes
Like

Posted 29 April 2013 - 07:19 PM

I was thinking about the feasibility of using a flexible anisotropic specular as the primary BRDF in a deferred shading setup. You'd obviously have to store two roughness parameters in the gbuffer instead of one. My question is, wouldn't you also have to store the tangent and bitangent vectors, since those are needed by the BRDF? That would require a lot of space in the gbuffer.  wacko.png

 

Note you can calculate any one of the bitangent, tangent and normal vectors with the other two via a cross product.


"The best comment is a deleted comment."


#3 Hodgman   Moderators   -  Reputation: 23970

Like
0Likes
Like

Posted 29 April 2013 - 09:53 PM

I'm experimenting with this at the moment, and my configuration is to store the normal and tangent in 16-bits each (using schemes from this page), two roughness parameters in 8 bits each, and the sign of the binormal (whether it's cross(N,T) or -cross(N,T)) in one bit.

This requires 49 bits of G-buffer space, rather than 24 bits for isotropic specular...

 

I also tried storing the T/B/N basis as a quaternion, but to get decent quality I needed to use 16-bits for each of the 4 components. I was able to drop one component and reconstruct it (due to quaternion rotations being normalized), bringing it down to 16-bits * 3, but this was still way more space and conversion math than the above configuration.

 

Crytek mention in one of their presentations (forget which one, sorry) that they faked anisotropic specular by simply adjusting the normal when writing to the g-buffer.


Edited by Hodgman, 29 April 2013 - 09:59 PM.


#4 MJP   Moderators   -  Reputation: 8750

Like
0Likes
Like

Posted 29 April 2013 - 09:53 PM

I was thinking about the feasibility of using a flexible anisotropic specular as the primary BRDF in a deferred shading setup. You'd obviously have to store two roughness parameters in the gbuffer instead of one. My question is, wouldn't you also have to store the tangent and bitangent vectors, since those are needed by the BRDF? That would require a lot of space in the gbuffer.  wacko.png

 

Yes, you need the full tangent frame. One possible option is to to store the entire tangent frame as a quaternion, however you can run into trouble with this if you need to blend into your G-Buffer normals (like you would with decals, for instance).



#5 zeGouky   Members   -  Reputation: 215

Like
0Likes
Like

Posted 30 April 2013 - 07:07 AM

The presentation link where Crytek talk about their fake aniso : http://advances.realtimerendering.com/s2010/Kaplanyan-CryEngine3(SIGGRAPH%202010%20Advanced%20RealTime%20Rendering%20Course).pdf

 

One solution could be using forward rendering rather than deferred (that's one direction im currently looking for my work), check Forward+ demo from AMD






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS