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

Reversed multiplication order in grass shader #4

Open
clarxor opened this issue Jun 13, 2020 · 0 comments
Open

Reversed multiplication order in grass shader #4

clarxor opened this issue Jun 13, 2020 · 0 comments

Comments

@clarxor
Copy link

clarxor commented Jun 13, 2020

float4 worldPos = mul(input.vertex, unity_ObjectToWorld);

The multiplication order here does not match what Unity does with its built in shaders.
This reversed order has unintended consequences for the shader's effect.

float4 wpos = mul(unity_ObjectToWorld, v.vertex);

https://github.com/TwoTailsGames/Unity-Built-in-Shaders/blob/632e3e7cf8acd262dd7d81aebed144a74fd9d0f4/CGIncludes/UnityCG.cginc#L1135

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