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

Render pass tracing now logs values used to clear color/depth/stencil buffer #7239

Merged
merged 3 commits into from
Dec 27, 2024

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Dec 24, 2024

  • updated Color.toString to handle HDR colors as well by printing those as an array instead of #xxxxxx
  • use it for render pass clear values logging

* @returns {string} The color in string form.
* @example
* const c = new pc.Color(1, 1, 1);
* // Outputs #ffffffff
* console.log(c.toString());
*/
toString(alpha) {
let s = `#${((1 << 24) + (Math.round(this.r * 255) << 16) + (Math.round(this.g * 255) << 8) + Math.round(this.b * 255)).toString(16).slice(1)}`;
toString(alpha, asArray) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Co-authored-by: Will Eastcott <[email protected]>
@mvaligursky mvaligursky merged commit 764ca71 into main Dec 27, 2024
7 checks passed
@mvaligursky mvaligursky deleted the mv-clear-values-render-pass branch December 27, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants