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

How do you normalize? #86

Open
equinox2k opened this issue Dec 5, 2018 · 3 comments
Open

How do you normalize? #86

equinox2k opened this issue Dec 5, 2018 · 3 comments

Comments

@equinox2k
Copy link

equinox2k commented Dec 5, 2018

Trying to work out how to normalize a vector?

Is there any documentation as also trying to understand the register attribute and why numbers can be repeated?

@mellinoe
Copy link
Owner

mellinoe commented Dec 5, 2018

You can normalize a vector using Vector2/3/4.Normalize.

Not sure what you mean about the register attribute, could you clarify?

@equinox2k
Copy link
Author

@mellinoe sorry I meant ResourceSet as per example

https://github.com/mellinoe/veldrid-samples/blob/master/src/TexturedCube/Application/Shaders/Cube.cs

Teaches me not to try and guess things from memory :)

@mellinoe
Copy link
Owner

mellinoe commented Dec 5, 2018

That attribute is used to configure which Veldrid ResourceSet a field will go into. These correspond to descriptor sets in Vulkan terminology. The best way to understand the attributes purpose would be to read Veldrid’s documentation about ResourceLayouts and ResourceSets.

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

2 participants