Repository navigation
Conversation
- Fixes hrydgard#15668 Post shaders can ask for several previous frames with PreviousFrames=N in their ini section (plain UsePreviousFrame=True still means 1). They are bound as sampler2 (1 frame ago), sampler3 (2 frames ago) and so on, and the fragment shader gets "#define PPSSPP_PREVIOUS_FRAMES <n>" with the count it actually got, so it can adapt with #if on devices with fewer slots. The count is limited by what the backend can bind, keeping 2 texture slots free for future post-shader inputs (depth, multipass), and capped at 16: - thin3d gets DeviceCaps::maxTextureSlots, MAX_TEXTURE_SLOTS goes 3 -> 20. - GL: GL_MAX_TEXTURE_IMAGE_UNITS (GLES 2.0 minimum of 8 gives 4 frames). - D3D11: 16 slots on FL10+, 8 on FL9.x. - Vulkan: the thin3d descriptor set layout is sized from the device's sampler limits, and each draw pushes only the descriptors it uses. Previous frames live in a ring of N+1 framebuffers. Until enough frames have been rendered, missing ones repeat the oldest available one, and on the very first frame the current input is bound instead. Adds a "Motion Blur (multi-frame)" example shader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
It's kind of a cool thing to have but the use cases over 1 frame of history seem really, really limited. Not sure I want to increase the complexity here. |
Collaborator
Author
|
Well, the motion blur can be really smooth with just few extra frames and will allow to simulate awfulness of early LCD screens ghosting, but personally I care only about having better post process effect support than RA, mostly already is, but RA has this and we don't ^_^; |
Closed
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.
Post shaders can ask for several previous frames with PreviousFrames=N in their ini section (plain UsePreviousFrame=True still means 1). They are bound as sampler2 (1 frame ago), sampler3 (2 frames ago) and so on, and the fragment shader gets "#define PPSSPP_PREVIOUS_FRAMES " with the count it actually got, so it can adapt with #if on devices with fewer slots.
The count is limited by what the backend can bind, keeping 2 texture slots free for future post-shader inputs (depth, multipass), and capped at 16:
Previous frames live in a ring of N+1 framebuffers. Until enough frames have been rendered, missing ones repeat the oldest available one, and on the very first frame the current input is bound instead.
Adds a "Motion Blur (multi-frame)" example shader.