Skip to content

Commit

Permalink
Fix a shader error (#7828)
Browse files Browse the repository at this point in the history
gl_ViewID_OVR is of uint type. Explicitly convert it to int to fix the
error.
  • Loading branch information
z3moon committed May 6, 2024
1 parent a1752b3 commit 6ac36d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shaders/src/getters.vs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ int getEyeIndex() {
#if defined(VARIANT_HAS_STEREO) && defined(FILAMENT_STEREO_INSTANCED)
return instance_index % CONFIG_STEREO_EYE_COUNT;
#elif defined(VARIANT_HAS_STEREO) && defined(FILAMENT_STEREO_MULTIVIEW)
return gl_ViewID_OVR;
// gl_ViewID_OVR is of uint type, which needs an explicit conversion.
return int(gl_ViewID_OVR);
#endif
return 0;
}

0 comments on commit 6ac36d1

Please sign in to comment.