Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

StateAttribute: ClonedAttribute may overwrite original uniform #381

Open
Kuranes opened this issue Jul 16, 2015 · 1 comment
Open

StateAttribute: ClonedAttribute may overwrite original uniform #381

Kuranes opened this issue Jul 16, 2015 · 1 comment

Comments

@Kuranes
Copy link
Collaborator

Kuranes commented Jul 16, 2015

StateAttribute::apply may contain per attribute uniform,
and as TypeMember is the same between cloned and original, uniform cache will return the same uniform for both, and will then be overwritten if not handled with an early out return code

if (!this._enable)return ; 

(need to update example shader generator sample to advertize the possible behaviour)

@cedricpinson
Copy link
Owner

Should not be a problem, I added extra check in State.js with this PR #382 that would help to find the real problem.
We should not update code with

 if ( !this._enable) return;

instead find the real source of the problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants