[Merged by Bors] - Shader Processor: process imported shader#3290
Closed
mockersf wants to merge 4 commits intobevyengine:mainfrom
Closed
[Merged by Bors] - Shader Processor: process imported shader#3290mockersf wants to merge 4 commits intobevyengine:mainfrom
mockersf wants to merge 4 commits intobevyengine:mainfrom
Conversation
b40aee7 to
4a6999b
Compare
cart
reviewed
Dec 21, 2021
Member
cart
left a comment
There was a problem hiding this comment.
I don't think we actually need to loop here / reprocess the same lines over and over. Once a line has been processed, it should never needs to be re-processed. I think we could make this more efficient by just recursively running the shader processor on import text prior to appending it to the final output.
Member
Author
It's to have the possibility of nested imports. It's probably not necessary to loop over everything until nothing changed, but It was funnier to write that way and I don't think it should take too long to process text... |
d98872c to
71447f9
Compare
Member
Author
|
no more |
Member
|
Awesome. Thats exactly what I was thinking of :) |
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Dec 22, 2021
# Objective - I want to be able to use `#ifdef` and other processor directives in an imported shader ## Solution - Process imported shader strings Co-authored-by: François <[email protected]>
Contributor
bors bot
pushed a commit
that referenced
this pull request
Dec 22, 2021
# Objective - 3d examples fail to run in webgl2 because of unsupported texture formats or texture too large ## Solution - switch to supported formats if a feature is enabled. I choose a feature instead of a build target to not conflict with a potential webgpu support Very inspired by superdump@6813b2e, and need #3290 to work. I named the feature `webgl2`, but it's only needed if one want to use PBR in webgl2. Examples using only 2D already work. Co-authored-by: François <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Objective
#ifdefand other processor directives in an imported shaderSolution