Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualHodgman

Posted 24 February 2013 - 07:36 PM

What's the computation for the X and Y parameters that BRDF Explorer uses for aniso distributions? Are they tangent/bitangent vectors?

Yeah, you can peek into their "shaderTemplates" files:

   vec3 normal = normalize( gl_TexCoord[0].xyz );
    vec3 tangent = normalize( cross( vec3(0,1,0), normal ) );
    vec3 bitangent = normalize( cross( normal, tangent ) );

These are then passed into your BRDF function as N, X and Y.

 

[edit]Oh man this new IPB text box is screwing up hardcore lately... It just deleted half my post that proceeded a code block, again...

 

Shaders do need NdotL

He was talking about dividing by NdotL.

BRDF explorer will multiply by NdotL outside of the BRDF, so if you've included NdotL inside your BRDF (as we usually do in games), then you need to divide by NdotL at the end to cancel it out.


#3Hodgman

Posted 24 February 2013 - 07:35 PM

What's the computation for the X and Y parameters that BRDF Explorer uses for aniso distributions? Are they tangent/bitangent vectors?

Yeah, you can peek into their "shaderTemplates" files:

   vec3 normal = normalize( gl_TexCoord[0].xyz );
    vec3 tangent = normalize( cross( vec3(0,1,0), normal ) );
    vec3 bitangent = normalize( cross( normal, tangent ) );

[edit]Oh man this new IPB text box is screwing up hardcore lately... It just deleted half my post that proceeded a code block, again...

 

Shaders do need NdotL

He was talking about dividing by NdotL.

BRDF explorer will multiply by NdotL outside of the BRDF, so if you've included NdotL inside your BRDF (as we usually do in games), then you need to divide by NdotL at the end to cancel it out.


#2Hodgman

Posted 24 February 2013 - 07:34 PM

What's the computation for the X and Y parameters that BRDF Explorer uses for aniso distributions? Are they tangent/bitangent vectors?

Yeah, you can peek into their "shaderTemplates" files:

   vec3 normal = normalize( gl_TexCoord[0].xyz );
    vec3 tangent = normalize( cross( vec3(0,1,0), normal ) );
    vec3 bitangent = normalize( cross( normal, tangent ) );

[edit]Oh man this new IPB text box is screwing up hardcore lately...

Shaders do need NdotL

He was talking about dividing by NdotL.

BRDF explorer will multiply by NdotL outside of the BRDF, so if you've included NdotL inside your BRDF, then you need to divide by NdotL at the end to cancel it out.


#1Hodgman

Posted 24 February 2013 - 07:32 PM

What's the computation for the X and Y parameters that BRDF Explorer uses for aniso distributions? Are they tangent/bitangent vectors?

Yeah, you can peek into their "shaderTemplates" files:

   vec3 normal = normalize( gl_TexCoord[0].xyz );
    vec3 tangent = normalize( cross( vec3(0,1,0), normal ) );
    vec3 bitangent = normalize( cross( normal, tangent ) );

PARTNERS