Skip to content

Instantly share code, notes, and snippets.

@fkaa
Last active August 29, 2015 14:06
Show Gist options
  • Save fkaa/0a7474b3dffd58fa9f89 to your computer and use it in GitHub Desktop.
Save fkaa/0a7474b3dffd58fa9f89 to your computer and use it in GitHub Desktop.
// original
output.normalDir = normalize(float3(mul(float4(input.normal, 0.0), modelMatrixInverse)));
// v1
float4 a = float4(input.normal, 0.0);
float3 b = float3(mul(a, modelMatrixInverse));
float3 n = normalize(a);
output.normalDir = n;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment