Skip to content

Commit

Permalink
glsl-in: Texture builtins fixes
Browse files Browse the repository at this point in the history
This one grew out of hand quick. Initially it was just replacing the bit
loops with a function driving the declarations to make the code sharing
better and support different scalar kinds.

Now it includes a lot of fixes:
- `textureSize` now also returns the array layers as the last component
  on the return (only for arrayed textures)
- `textureSize` now supports multisampled textures
- the `texture` family of functions now consumes a `vec3` coordinate
  vector for all 1D shadow textures
- Shadow textures can use the bias version of `texture` functions
  (temporarily disabled since naga doesn't support it)
- 3D textures can be used in `textureProj`
- `sampler2DArrayShadow` can't be used in `textureLod` or in `texture` with bias
- Cube textures cannot be used with offsets

Updates the tests to cover all functions
  • Loading branch information
JCapucho authored and kvark committed Feb 10, 2022
1 parent 8e2e39e commit 1f14f7e
Show file tree
Hide file tree
Showing 3 changed files with 866 additions and 733 deletions.
Loading

0 comments on commit 1f14f7e

Please sign in to comment.