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] Fix vertex shader attribute validation to support builtins #4695

Merged
merged 6 commits into from
Oct 5, 2022

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Oct 5, 2022

Fix the error report and following null access when built in attributes, such as gl_VertexID or gl_InstanceID, are used in the vertex shader:

reported error:
ASSERT FAILED: Vertex shader attribute "gl_VertexID" is not mapped to a semantic in shader definition.

@mvaligursky mvaligursky self-assigned this Oct 5, 2022
@mvaligursky mvaligursky changed the title [Fix] Improve shader attribute validation to support gl_VertexID [Fix] Improve shader attribute validation to support gl_VertexID and gl_InstanceID Oct 5, 2022
@mvaligursky mvaligursky changed the title [Fix] Improve shader attribute validation to support gl_VertexID and gl_InstanceID [Fix] Fix vertex shader attribute validation to support buildins Oct 5, 2022
Copy link
Member

@slimbuck slimbuck left a comment

Choose a reason for hiding this comment

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

approved with suggestion

Co-authored-by: Donovan Hutchence <slimbuck7@gmail.com>
@willeastcott willeastcott changed the title [Fix] Fix vertex shader attribute validation to support buildins [Fix] Fix vertex shader attribute validation to support builtins Oct 5, 2022
Copy link
Contributor

@willeastcott willeastcott left a comment

Choose a reason for hiding this comment

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

Approved with 1 comment.

@mvaligursky mvaligursky merged commit 3e1da8e into main Oct 5, 2022
@mvaligursky mvaligursky deleted the mv-vertexid-validation branch October 5, 2022 10:56
mvaligursky added a commit that referenced this pull request Oct 6, 2022
* [Fix] Improve shader attribute validation to support gl_VertexID

* comment

* additional builtins

* Update src/graphics/webgl/webgl-shader.js

Co-authored-by: Donovan Hutchence <slimbuck7@gmail.com>

* moved

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
Co-authored-by: Donovan Hutchence <slimbuck7@gmail.com>
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.

3 participants