-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Modify the shader so that the line can be colored per vertex #5915
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
8c0b790
Prepare a color variable to send to the frag.
inaridarkfox4231 f9d48bf
Prepare a flag to branch the output.
inaridarkfox4231 6522a55
Removed unnecessary lines at the end of file.
inaridarkfox4231 c200fba
Prepare a buffer to use for coloring lines
inaridarkfox4231 f07bf49
Added process to register color in vertex function
inaridarkfox4231 b51b70a
Added a process to calculate the flag
inaridarkfox4231 e369748
Added a process for per-vertex coloring
inaridarkfox4231 c54b7a9
Shorten lines that are too long
inaridarkfox4231 e951bcb
delete Irregular whitespace
inaridarkfox4231 86a99f8
Changed the variable name
inaridarkfox4231 2c851c3
Some lines have been shortened slightly.
inaridarkfox4231 4d6178d
add indent
inaridarkfox4231 a04d12e
Fixed because I forgot to change the name
inaridarkfox4231 a570ddf
Changed to receive only vColor
inaridarkfox4231 42f6608
Separate vColor values by flags
inaridarkfox4231 7d977e3
Fix it so that you don't have to make a copy.
inaridarkfox4231 38db825
Merge branch 'main' into main
inaridarkfox4231 aea54f2
I fixed the missing semicolon.
inaridarkfox4231 a460068
Added unit test for line color interpolation
inaridarkfox4231 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
There are no files selected for viewing
This file contains 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 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 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 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 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
precision mediump float; | ||
precision mediump int; | ||
|
||
uniform vec4 uMaterialColor; | ||
varying vec4 vColor; | ||
|
||
void main() { | ||
gl_FragColor = vec4(uMaterialColor.rgb, 1.) * uMaterialColor.a; | ||
gl_FragColor = vec4(vColor.rgb, 1.) * vColor.a; | ||
} |
This file contains 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 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.
nice!
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.
thanks!('ω')