🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@jahow
Copy link
Contributor

@jahow jahow commented May 6, 2025

Before this change, colors provided through variables (and read with e.g. ['var', 'myColor']) were not scaled to the 0-1 range before being sent to the GPU.

This means that:

  • these colors would not render correctly
  • interpolation between these colors would also be broken

Example of the issue without the change:

image

After the fix:

image

Fixes #16510

This PR also contains a slight refactoring of the ShaderBuilder to make handling of Uniforms and Attributes more similar.

@github-actions
Copy link

github-actions bot commented May 6, 2025

📦 Preview the website for this branch here: https://deploy-preview-16836--ol-site.netlify.app/.

@jahow jahow force-pushed the fix-webgl-interpolation-variables branch from ef0b6b6 to e000cad Compare May 6, 2025 07:47
This is mainly for consistency and readability
@jahow jahow force-pushed the fix-webgl-interpolation-variables branch from e000cad to e586b3f Compare May 6, 2025 08:28
@jahow jahow force-pushed the fix-webgl-interpolation-variables branch from e586b3f to 3650b7b Compare May 6, 2025 08:35
@jahow jahow merged commit 5646776 into openlayers:main May 6, 2025
8 checks passed
@jahow jahow deleted the fix-webgl-interpolation-variables branch May 6, 2025 10:23
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.

WebGL Style - interpolate expression works different when outputs are vars instead of literals

2 participants