This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] compute UVs in vertex stage. #52106
Merged
auto-submit
merged 12 commits into
flutter:main
from
jonahwilliams:compute_uv_vertex_stage
Apr 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
65cf0af
[Impeller] compute UVs in vertex stage.
699fe6a
++
a255449
Merge branch 'main' of github.com:flutter/engine into compute_uv_vert…
0adc252
++
82786b2
++
d97e84b
++
6ef532c
delete more uv computation.
a3ba350
remove position uv pipelines
63c48bf
add maybe unused
9ac3c5d
update licenses
ae7f592
malioc diff.
38879f2
Merge branch 'main' into compute_uv_vertex_stage
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
++
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,8 @@ precision mediump float; | |
| #include <impeller/texture.glsl> | ||
| #include <impeller/types.glsl> | ||
|
|
||
| layout(constant_id = 0) const float supports_decal = 1.0; | ||
|
|
||
| uniform f16sampler2D texture_sampler; | ||
|
|
||
| uniform FragInfo { | ||
|
|
@@ -21,11 +23,18 @@ in highp vec2 v_texture_coords; | |
| out f16vec4 frag_color; | ||
|
|
||
| void main() { | ||
| frag_color = | ||
| IPHalfSampleWithTileMode(texture_sampler, // sampler | ||
| v_texture_coords, // texture coordinates | ||
| float16_t(frag_info.x_tile_mode), // x tile mode | ||
| float16_t(frag_info.y_tile_mode) // y tile mode | ||
| ) * | ||
| float16_t(frag_info.alpha); | ||
| if (supports_decal == 1.0) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Allows metal, vulkan, and most gles devices to use this shader at no additional cost over the texture_fill shader. |
||
| frag_color = texture(texture_sampler, // sampler | ||
| v_texture_coords, // texture coordinates | ||
| float16_t(kDefaultMipBias)) * | ||
| float16_t(frag_info.alpha); | ||
| } else { | ||
| frag_color = IPHalfSampleWithTileMode( | ||
| texture_sampler, // sampler | ||
| v_texture_coords, // texture coordinates | ||
| float16_t(frag_info.x_tile_mode), // x tile mode | ||
| float16_t(frag_info.y_tile_mode) // y tile mode | ||
| ) * | ||
| float16_t(frag_info.alpha); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused