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

Shader support multi shader pass #948

Merged
merged 33 commits into from
Sep 14, 2022

Conversation

GuoLei1990
Copy link
Member

@GuoLei1990 GuoLei1990 commented Aug 14, 2022

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)

Main modify:

  • Shader add multi shader pass ability
  • BaseMaterial add setIsTransparentsetBlendModesetRenderFace method
  • PBRMaterial can custom shader in constructor

Example:
can see PlanarShadowMaterial in galacean/engine-toolkit#71

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@GuoLei1990 GuoLei1990 added enhancement New feature or request shader Shader related functions labels Aug 14, 2022
@GuoLei1990 GuoLei1990 added this to the 0.9 milestone Aug 14, 2022
@GuoLei1990 GuoLei1990 marked this pull request as draft August 14, 2022 10:44
@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2022

Codecov Report

Base: 33.23% // Head: 33.27% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (ccb4654) compared to base (fbe5ecc).
Patch coverage: 39.33% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           dev/0.9     #948      +/-   ##
===========================================
+ Coverage    33.23%   33.27%   +0.03%     
===========================================
  Files          331      332       +1     
  Lines        14713    14777      +64     
  Branches      2257     2266       +9     
===========================================
+ Hits          4890     4917      +27     
- Misses        9282     9310      +28     
- Partials       541      550       +9     
Impacted Files Coverage Δ
packages/core/src/2d/sprite/SpriteRenderer.ts 21.18% <0.00%> (-0.94%) ⬇️
packages/core/src/2d/text/TextRenderer.ts 9.95% <0.00%> (-0.09%) ⬇️
...ges/core/src/RenderPipeline/BasicRenderPipeline.ts 11.48% <0.00%> (ø)
...kages/core/src/RenderPipeline/MeshRenderElement.ts 0.00% <0.00%> (ø)
packages/core/src/RenderPipeline/RenderElement.ts 100.00% <ø> (ø)
packages/core/src/RenderPipeline/RenderQueue.ts 2.08% <0.00%> (ø)
packages/core/src/RenderPipeline/SpriteBatcher.ts 6.66% <0.00%> (ø)
packages/core/src/RenderPipeline/SpriteElement.ts 10.00% <0.00%> (-2.50%) ⬇️
...kages/core/src/RenderPipeline/SpriteMaskBatcher.ts 7.84% <0.00%> (ø)
packages/core/src/material/BlinnPhongMaterial.ts 90.90% <ø> (ø)
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@GuoLei1990 GuoLei1990 marked this pull request as ready for review August 15, 2022 15:15
@GuoLei1990 GuoLei1990 linked an issue Aug 23, 2022 that may be closed by this pull request
packages/core/src/material/Material.ts Show resolved Hide resolved
packages/core/src/material/BaseMaterial.ts Outdated Show resolved Hide resolved
packages/core/src/shader/Shader.ts Outdated Show resolved Hide resolved
packages/core/src/shader/state/RenderState.ts Outdated Show resolved Hide resolved
packages/core/src/Engine.ts Outdated Show resolved Hide resolved
charRenderData.texture,
renderStates[0],
passes[0]
);
Copy link
Member

Choose a reason for hiding this comment

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

TextRenderer just run one pass if has multi-passes

packages/core/src/shader/Shader.ts Show resolved Hide resolved
Copy link
Member

@singlecoder singlecoder 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 a69f9e4 into galacean:dev/0.9 Sep 14, 2022
GuoLei1990 added a commit to GuoLei1990/galacean-engine that referenced this pull request Sep 14, 2022
…rData-improve

* commit 'f34d3ace905a74861fb2852afa0a2ce99fe3032d':
  Fix text renderer element not render state (galacean#1043)
  Shader support multi shader pass (galacean#948)
  v0.9.0-alpha.4
  fix: use rgba8 as downgrade shadow texture (galacean#1033)
  v0.9.0-alpha.3
  shadowMap using color texture when platform not support depthTexture (galacean#1029)
  Fix `SkinnedMeshRenderer` clone bug (galacean#1028)
@GuoLei1990 GuoLei1990 deleted the pr/shader-multi-pass branch September 22, 2022 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request shader Shader related functions
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Shader support multi pass
5 participants