feat: enable OrigTexture in glsl shaders, fix shader UI desync#679
feat: enable OrigTexture in glsl shaders, fix shader UI desync#679DrFlarp wants to merge 12 commits intoLoveRetro:mainfrom
Conversation
|
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 |
|
Ok, it took a few tries but I think it's ready to go :) |
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.
… by minarch.c:initShaders()
106519b to
095315a
Compare
|
@frysee I've resolved the merge with main on my machine and pushed it here 8020fca but for some reason the conflicts message isn't going away. I get the option to work on the old conflicting commit in the web editor but no way to tell github that I've already resolved it in a child commit... is there anything on your end you can do to fix this? |
How about rebase the branch and fix one more time, that should be go to go |
|
I think I'd just squash and rebase. |
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.