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

vertex attribute cosumer/ providers #2660

Open
2 tasks
paroj opened this issue Nov 7, 2022 · 0 comments
Open
2 tasks

vertex attribute cosumer/ providers #2660

paroj opened this issue Nov 7, 2022 · 0 comments

Comments

@paroj
Copy link
Member

paroj commented Nov 7, 2022

Some SRS stages might want to access the same vertex attribute, e.g. TEXCOORD0.

Other SRS stages do provide it by different means, e.g. by computing it.

Currently the consumers check whether somebody already provides it via probing for it with get:

getOutputParameter(Parameter::SPC_TEXTURE_COORDINATE0, GCT_FLOAT2)

If this fails, they fall back to a minimal pass-through in the vertex shader.

However, this only works if the provider was executed before e.g. if FFP_LIGHTING cannot query for FFP_TEXTURING as the latter is only executed afterwards.

Also, TEXCOORD0 may mean different things between SRS. E.g. TEXTURING may apply a texture matrix to TEXCOORD0 for the albedo layer. However, the LIGHTING would use TEXCOORD0 to read a specular map. Should we enforce that both are the same?
Should we add more SPC to make them unique?

  • swap LIGHTING and TEXTURING order?
  • add a matching phase, where SRS may advertise what they provide/ want to consume?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant