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

Properly cast argument types in GLSL #785

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

dpw13
Copy link
Collaborator

@dpw13 dpw13 commented Feb 21, 2024

I was occasionally getting type errors around the pow function after #779. This appears to be because the type casting used in OutputExpressionList was being omitted. For the other functions with an added abs call, I use OutputExpressionList to recapture the previous casting behavior and for pow I use the function's return type, ensuring that all arguments are expanded into vectors where possible. pow in particular is often used in presets where the base or exponent is a scalar and the other argument is a vector.

@dpw13 dpw13 changed the title Dev/dwagner abs casting Properly cast argument types in GLSL Feb 21, 2024
Copy link
Member

@kblaschke kblaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reconsider the line width changes, as I've specifically kept it this way because of the stated reasons - it will make things worse (e.g. not rendering any lines) on some platforms, which are now working fine.
Plus, debug output should either be done via a proper API (in release 4.2), or wrapped in #ifdefs to only make them available in debug builds.

src/libprojectM/MilkdropPreset/CustomShape.cpp Outdated Show resolved Hide resolved
src/libprojectM/MilkdropPreset/MilkdropShader.cpp Outdated Show resolved Hide resolved
@dpw13 dpw13 force-pushed the dev/dwagner-abs-casting branch from ad27ae8 to 8500248 Compare February 23, 2024 13:49
@kblaschke kblaschke merged commit 03b4c07 into projectM-visualizer:master Feb 28, 2024
9 checks passed
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

Successfully merging this pull request may close these issues.

2 participants