Skip to content
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

Add Frametime Uniforms #17155

Merged
merged 37 commits into from
Nov 13, 2024
Merged

Conversation

kokoko3k
Copy link
Contributor

@kokoko3k kokoko3k commented Nov 3, 2024

Description

This add 2 new Uniforms:

CoreFPS: the FPS reported by the core
FrameTimeDelta: The time passed between thte current and previous frame.
The define _HAS_FRAMETIME_UNIFORMS can be used by the shader to query for them

Support for glsl and Slang (tested and working on: GLCore, Vulkan, Metal, d3d10,11,12)

Reviewers

@hizzlekizzle
@HyperspaceMadness

by defining _RARCH_HAS_COREASPECT_UNIFORM early in the shader source, just after "#extension GL_GOOGLE_cpp_style_line_directive : require"
It reports CoreAspect value or 1/CoreAspect when the content is rotated by 90 or 270 deg.
…lAspect, OriginlAspectRot, _HAS_ORIGINALASPECT_UNIFORMS
...how on earth did it worked for UBO !?
_HAS_ORIGINALASPECT_UNIFORMS is (#)defined and can be used to query for them.
@LibretroAdmin
Copy link
Contributor

@HyperspaceMadness Let me know what you think

@LibretroAdmin
Copy link
Contributor

@HyperspaceMadness Any commentary on this yet?

@HyperspaceMadness
Copy link
Contributor

Looks good!

One note that in the changed files the internal variables are named core_fps while the uniform is Original_FPS, it might be good to keep these consistent for code searches

Great work!

@kokoko3k
Copy link
Contributor Author

kokoko3k commented Nov 8, 2024

Looks good!

One note that in the changed files the internal variables are named core_fps while the uniform is Original_FPS, it might be good to keep these consistent for code searches

Great work!

Just done.

@HyperspaceMadness
Copy link
Contributor

Looks like it's good to go @LibretroAdmin !

@LibretroAdmin LibretroAdmin merged commit 2a56a82 into libretro:master Nov 13, 2024
27 checks passed
@kokoko3k kokoko3k deleted the FrameTime_Uniforms branch November 14, 2024 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants