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

Convert more floats to ints #242

Open
laurentlb opened this issue Mar 6, 2023 · 0 comments
Open

Convert more floats to ints #242

laurentlb opened this issue Mar 6, 2023 · 0 comments

Comments

@laurentlb
Copy link
Owner

There are more cases where we could replace a float with an int (1 instead of 1.).

See discussion in https://www.pouet.net/topic.php?which=12089&page=1

Quote from the spec:

The OpenGL Shading Language is type safe. There are no implicit conversions between types, with the exception that an integer value may appear where a floating-point type is expected, and be converted to a floating-point value. Exactly how and when this can occur is described in section 4.1.10 “Implicit Conversions” and as referenced by other sections in this specification.

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