-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Disable unused vertexAttribute to avoid environment-dependent vanishing bugs #5970
Disable unused vertexAttribute to avoid environment-dependent vanishing bugs #5970
Commits on Jan 23, 2023
-
add Array for recording availability of registers
Prepare an array to record the availability of registers to prevent the same register from being disabled more than once.
Configuration menu - View commit details
-
Copy full SHA for 15c0313 - Browse repository at this point
Copy the full SHA 15c0313View commit details -
Record register availability in enableAttrib()
In the enableAttrib function, when enabling a register, tell the renderer that it is available by using the location number as an argument.
Configuration menu - View commit details
-
Copy full SHA for b1690b3 - Browse repository at this point
Copy the full SHA b1690b3View commit details -
Disable registers not used for drawing
If the registers corresponding to the attributes that are not used for drawing are left open, the data still stored there will cause problems. So it asks the renderer if the register corresponding to it is open, and if it is, it closes it and notifies the renderer and shader of that state.
Configuration menu - View commit details
-
Copy full SHA for cbc1677 - Browse repository at this point
Copy the full SHA cbc1677View commit details -
Configuration menu - View commit details
-
Copy full SHA for e8fea3f - Browse repository at this point
Copy the full SHA e8fea3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f567917 - Browse repository at this point
Copy the full SHA f567917View commit details
Commits on Jan 25, 2023
-
Enable register even if it is disabled
If the shader doesn't know that the register has been disabled by another shader, it can't enable it. Therefore, even if the corresponding shader does not know about it, if the register used by it is disabled, enable processing should be performed.
Configuration menu - View commit details
-
Copy full SHA for 1c7cbbd - Browse repository at this point
Copy the full SHA 1c7cbbdView commit details -
Since only the global array (named "registerEnabled") needs to know the enabled/disabled state of a register, we eliminate the "enabled" property of attribute.
Configuration menu - View commit details
-
Copy full SHA for 8eb1065 - Browse repository at this point
Copy the full SHA 8eb1065View commit details -
Remove the enabled property of attribute.
It is impossible for the shader itself to know when a register is available or not. I decided to leave that to the global array. So I'm going to remove that property.
Configuration menu - View commit details
-
Copy full SHA for 783e765 - Browse repository at this point
Copy the full SHA 783e765View commit details -
Register enable/disable flag test
I decided to use a global flag to manage the enabled/disabled state of the registers used to store shader attributes. This value will be true if the geometry supplies a value, false if it does not. Therefore, I prepared a geometry with aTexCoord and a geometry without it, and tested whether the value was properly switched.
Configuration menu - View commit details
-
Copy full SHA for c1a9c69 - Browse repository at this point
Copy the full SHA c1a9c69View commit details -
not "createVector" but "myp5.createVector".
I accidentally wrote "myp5.createVector" as "createVector". Just a typo. Excuse me.
Configuration menu - View commit details
-
Copy full SHA for dfccc74 - Browse repository at this point
Copy the full SHA dfccc74View commit details