You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
I have come to the following problem while trying to cross-compile from glsl to hlsl bytecode (D3D11).
One of my shaders contains the following code
int index = int(fsIn.tTexture); //casting from float to int
switch(index)
{
case 0:
return u_Textures[0].Sample(...);
case 1:
return u_Textures[1].Sample(...);
...
This is all fine if it is ported the same way in hlsl, however, it gets shortened to
int _21 = int(Texture);
FragColor = u_Textures[_21]
Which is not valid D3D11 hlsl code.
Any possible workarounds without having to rewrite the shaders completely?
May thanks.
The text was updated successfully, but these errors were encountered:
I have come to the following problem while trying to cross-compile from glsl to hlsl bytecode (D3D11).
One of my shaders contains the following code
This is all fine if it is ported the same way in hlsl, however, it gets shortened to
Which is not valid D3D11 hlsl code.
Any possible workarounds without having to rewrite the shaders completely?
May thanks.
The text was updated successfully, but these errors were encountered: