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

Fix textureXXXBias() macro definitions for glsl >= 130 #2954

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

goodartistscopy
Copy link
Contributor

texture2DBias() was defined in term of texture2D() which was then redefined with the bias parameter stripped (leads to a shader compilation error)

# define textureCubeBias(_sampler, _coord, _bias) textureCube(_sampler, _coord, _bias)

# if BGFX_SHADER_LANGUAGE_GLSL >= 130
# if BGFX_SHADER_LANGUAGE_GLSL < 130
Copy link
Owner

Choose a reason for hiding this comment

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

This is wrong, because BGFX_SHADER_LANGUAGE_GLSL is 0 when it's not GLSL. Keep old #if logic, and move this part into #else block.

@bkaradzic bkaradzic merged commit 3868c76 into bkaradzic:master Oct 13, 2022
mipek pushed a commit to mipek/bgfx that referenced this pull request Mar 2, 2024
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