Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-Uniform Scale Transofrmation Support #3

Open
WeakKnight opened this issue Nov 30, 2021 · 1 comment
Open

Non-Uniform Scale Transofrmation Support #3

WeakKnight opened this issue Nov 30, 2021 · 1 comment

Comments

@WeakKnight
Copy link

WeakKnight commented Nov 30, 2021

in gbuffer_vs.hlsl:
o_vtx.normal = mul(instanceMatrix, float4(i_vtx.normal, 0)).xyz;
o_vtx.tangent.xyz = mul(instanceMatrix, float4(i_vtx.tangent.xyz, 0)).xyz;
o_vtx.tangent.w = i_vtx.tangent.w;

need to use transpose(inverse(instanceMatrix)).

@WeakKnight WeakKnight changed the title Negative Scale Transofrmation Support Non-Uniform Scale Transofrmation Support Nov 30, 2021
@WeakKnight
Copy link
Author

Also Odd Negative Scale need to be taken into consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant