feat: enable OrigTexture in glsl shaders, fix shader UI desync#679
Open
DrFlarp wants to merge 11 commits intoLoveRetro:mainfrom
Open
feat: enable OrigTexture in glsl shaders, fix shader UI desync#679DrFlarp wants to merge 11 commits intoLoveRetro:mainfrom
DrFlarp wants to merge 11 commits intoLoveRetro:mainfrom
Conversation
currently shaders residing in .system are sent to runShaderPass with incomplete initialization - in particular, all uniformLocations are passed in as 0's. As it stands, the only uniform in these shaders is the sampler2D (texture unit), so it's mostly a lot of wrong-type error no-op's, but it does prevent the proposed OrigTexture feature from working properly.
Author
|
huh, build-linux is failing on building settings.elf. nextui and minarch seem to build fine however Edit: github ci runners seem to be janking us out |
Author
|
Ok, it took a few tries but I think it's ready to go :) |
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.
Implement OrigTexture so all shaders in the chain can access the unaltered core output image.
Also addresses #678 with a proposed fix: split Shader into two objects, let's call them ShaderProgram and ShaderPass
ShaderProgram: contains only values directly pertaining to an individual .glsl compilation unit
(This allows us to reuse all of this information when we run overlay.glsl up to 3 times in our pipeline, each time with different configs)
ShaderPass: contains everything else previously held in Shader
Other related changes/fixes:
I'm not fully satisfied with what I've come up and would like one more iteration on this. (in particular, the way srcw/h, texw/h is also a part of ShaderPass but not used by the function)(edit: better now!)The only behavioral changes should be the availability of OrigTexture/OrigTextureSize and the fix for OrigInputSize which only affects a very specific setup of lcd1x (the included presets real-gameboy and real-gba still work the same). As far as my testing goes, all other shaders should work exactly as before.