Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Jul 2011
Offline Last Active Today, 09:20 AM

Posts I've Made

In Topic: HDR post-processing order

Yesterday, 09:05 PM

- Old days bright pass runs in LDR with a threshold value. However is there a better way to handle this in HDR?
  Maybe scale threshold by max white or lower exposure?
float4 main( in PS_INPUT Input ) : SV_TARGET
  // Sample the diffuse map and clamp to avoid artifacts because of fp16.
  float4 DiffuseData = DiffuseMap.Sample( LinearSampler, Input.TexCoord );
  DiffuseData.rgb = min( DiffuseData.rgb, float3( 65536.0f, 65536.0f, 65536.0f ) );

  // Return the bloom factor.
  return max( float4( 0.0f, 0.0f, 0.0f, 0.0f ), DiffuseData - BloomThreshold ) * 0.1f;

In Topic: Phong versus Screen-Space Ambient Occlusion

Yesterday, 08:55 AM

You can have a look at a visual representation of the SSAO algorithm (normal oriented) here :


It's an hemispherical test, you send multiple ray in a radius and then you normalize the result.

In Topic: Gradual Rotation

23 November 2015 - 11:08 PM

You can use NLERP to achieve the transition from one quaternion to another one :

q = Normalize(LERP(q1, q2, t));

It's cheaper than SLERP, the only difference is it doesn't rotate at a constant speed.

But if the player is moving around, maybe it's better to LERP the target position and look-at this target point.

In Topic: Phong versus Screen-Space Ambient Occlusion

23 November 2015 - 08:21 PM

Do you have any URLs that demonstrate hemispherical occlusion?

This is exactly what SSAO (screen-space ambient occlusion) does, I suggest you read or read again the chapter about it.

In Topic: Software skinning for a precise AABB

22 November 2015 - 08:41 PM

Always better to accept it's wrong when it is than stick on the idea it's correct.