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

[shader-ast] texture2D call in vertexShader causes error. #278

Merged
merged 3 commits into from
Feb 23, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
texture bias fix
  • Loading branch information
jamieowen committed Feb 21, 2021
commit a1703bc284bc16d634ef22f40332cbf6d332cb47
10 changes: 3 additions & 7 deletions packages/shader-ast/src/builtin/texture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,9 @@ const $call = (
uv: Term<Vec>,
bias?: FloatTerm
) => {
const f = builtinCall(
name,
texRetType(sampler),
sampler,
uv,
bias || FLOAT0
);
const f = bias
? builtinCall(name, texRetType(sampler), sampler, uv, bias)
: builtinCall(name, texRetType(sampler), sampler, uv);
!isVec(f) && (f.info = "n");
return f;
};
Expand Down