Skip to content

Avoid shader type error of integer kernal2DSize#424

Open
xiasun wants to merge 1 commit into
mkkellogg:mainfrom
xiasun:fix_integer_kernel2DSize
Open

Avoid shader type error of integer kernal2DSize#424
xiasun wants to merge 1 commit into
mkkellogg:mainfrom
xiasun:fix_integer_kernel2DSize

Conversation

@xiasun
Copy link
Copy Markdown

@xiasun xiasun commented Feb 20, 2025

When setting kernel2DSize to an integer in the viewer options, it will be assigned to the GLSL shader as an integer. For example, when setting:

// ...
viewerOptions.kernel2DSize = 1.0;
// ...

The generated shader will look like:

// ...
cov2Dm[0][0] += 1;
cov2Dm[1][1] += 1;
// ...

This raises a type mismatch error during shader compilation.

This fix ensure that at least one decimal is preserved for integer kernel2DSize.

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.

1 participant