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

Texture support R32G32B32A32_UInt format #1993

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

GuoLei1990
Copy link
Member

@GuoLei1990 GuoLei1990 commented Feb 2, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Example:

Create texture:

  const magentaPixel32 = new Uint32Array([255, 0, 255, 255]);
  const uintMagentaTexture2D = new Texture2D(this, 1, 1, TextureFormat.R32G32B32A32_UInt, false);
  uintMagentaTexture2D.setPixelBuffer(magentaPixel32);

Shader:

  uniform highp usampler2D u_uintTetxure;
  
  void main() {
    uvec4 texel = texture2D(u_uintTetxure, v_uv);

    gl_FragColor = vec4(texel);
  }

@GuoLei1990 GuoLei1990 added enhancement New feature or request texture labels Feb 2, 2024
@GuoLei1990 GuoLei1990 requested review from gz65555 and zhuxudong and removed request for gz65555 February 2, 2024 08:51
Copy link
Member

@zhuxudong zhuxudong left a comment

Choose a reason for hiding this comment

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

+1

@GuoLei1990 GuoLei1990 merged commit ecf45f7 into galacean:dev/1.2 Feb 2, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request texture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants