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

Blending Mode Configuration #7646

Open
wddl opened this issue Mar 11, 2024 · 2 comments
Open

Blending Mode Configuration #7646

wddl opened this issue Mar 11, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request low priority Low priority issue

Comments

@wddl
Copy link

wddl commented Mar 11, 2024

Is your feature request related to a problem? Please describe.
The blending mode of custom material I need is specified as follows:
mRasterState.blendFunctionSrcRGB = BlendFunction::ONE_MINUS_DST_ALPHA; mRasterState.blendFunctionSrcAlpha = BlendFunction::ONE_MINUS_DST_ALPHA; mRasterState.blendFunctionDstRGB = BlendFunction::ONE; mRasterState.blendFunctionDstAlpha = BlendFunction::ONE;
However, the engine's default blending mode does not have this option. The default settings are:
mRasterState.blendFunctionSrcRGB = BlendFunction::ONE; mRasterState.blendFunctionSrcAlpha = BlendFunction::ONE; mRasterState.blendFunctionDstRGB = BlendFunction::ONE_MINUS_SRC_ALPHA; mRasterState.blendFunctionDstAlpha = BlendFunction::ONE_MINUS_SRC_ALPHA; mRasterState.depthWrite = false;
When I modify the source code to use the required mode, the image displays as a black screen and does not render correctly. Could you please advise on how to proceed?

Describe the solution you'd like
can support the blend mode set to mRasterState.blendFunctionSrcRGB = BlendFunction::ONE_MINUS_DST_ALPHA; mRasterState.blendFunctionSrcAlpha = BlendFunction::ONE_MINUS_DST_ALPHA; mRasterState.blendFunctionDstRGB = BlendFunction::ONE; mRasterState.blendFunctionDstAlpha = BlendFunction::ONE;

Describe alternatives you've considered
How to modify the source code to support the above blending mode?

OS and backend

@romainguy
Copy link
Collaborator

What are you trying to achieve?

@wddl
Copy link
Author

wddl commented Mar 11, 2024

@romainguy
I am trying rendering point cloud with 'Gaussian splatting' method. The blending mode for this algorithm is gl.blendFuncSeparate( gl.ONE_MINUS_DST_ALPHA, gl.ONE, gl.ONE_MINUS_DST_ALPHA, gl.ONE, );, but the engine does not have this option."

@pixelflinger pixelflinger self-assigned this Mar 12, 2024
@pixelflinger pixelflinger added enhancement New feature or request low priority Low priority issue labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Low priority issue
Projects
None yet
Development

No branches or pull requests

3 participants