Skip to content

Conversation

CedricGuillemet
Copy link
Contributor

@CedricGuillemet CedricGuillemet commented Jul 23, 2025

better fix to replace this workaround : BabylonJS/Babylon.js#16910
Opengl error : error C7011: implicit cast from "int" to "float"

When converting a uniform int value to a vec4 for bgfx, also replace its use with a cast to int.

So

for (int i = 0; i < 3; i++)
{
     if (i >= morphTargetCount.x)

becomes

for (int i = 0; i < 3; i++)
{
     if (i >= int(morphTargetCount.x))

Current state conversion is if (i >= floatBitsToInt(morphTargetCount.x)) but didn't find a way for a simple int constructor instead.

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