Comments (5)
Use a Box
that fills all available space for chroma-keying? Or if you really don't want to, write a custom DrawNode
for the root-level container that calls Renderer.Clear
?
I don't see any reason to make any changes to framework to support this.
I'm not even sure how "clearing with transparent colour" works or does anything useful at all. It's not like the WM will know that the game has cleared its surface to transparent?
from osu-framework.
A transparent clear color allows using the "Allow Transparency" option in OBS' Game Capture to capture a transparent image directly for compositing a stream. An example of an app that already does this is Vtuber avatar tool VSeeFace.
In this case, I'm making a telemetry HUD overlay for F1 games (hence the screenshot above) as playing them in VR removes any and all HUD - in fact, the screenshot comes from OBS:
The main reason why I'm looking specifically for a transparent clear is to make sure I'm not limited in the colors I can use - the wheel lights (the row of 15 rectangles) has all three primary colors (green, red, and blue in that order), and I'm not entirely sure a chroma key would work all that well, though I haven't tried either.
That being said, I didn't consider the option of a custom DrawNode
, so technically I suppose it's already possible to clear to a custom color? I'd generally like an easier way to change just the color, but a framework change might indeed not be needed for that. I'll need to play around with this, but then alpha blending might remain an issue, which would probably need a separate issue/discussion.
from osu-framework.
We won't have any official use for this, so I'd recommend implementing yourself. If it's simple enough, we can consider merging the feature.
Keep in mind that implementing will have serious cross-platform concerns (ie. it likely won't be usable on mobile) and that may increase implementation complexity.
from osu-framework.
The first thing I'd check is to see if this works in theory by changing this line:
Then, I think the best way is for a custom DrawNode
as previously proposed:
protected override DrawNode CreateDrawNode() => new GameDrawNode(this);
private class GameDrawNode : CompositeDrawableDrawNode
{
public GameDrawNode(CompositeDrawable source)
: base(source)
{
}
protected override void Draw(IRenderer renderer)
{
renderer.Clear(new ClearInfo(Color4.Pink));
base.Draw(renderer);
}
}
from osu-framework.
Related Issues (20)
- DirectorySelector fails to enumerate `~/Library/Application Support` directories
- iOS window losing focus (popup or suspend) doesn't update game active state
- Only allow one drag event at a time
- `SpriteIcon`s are unnecessary expensive HOT 7
- Frame statistics GC boxes are broken
- Unable to open more than one osu!framework based project at the same time HOT 1
- Frame statistics graph causes the visuals to become unresponsive if window isn't focused for a long time
- `LastDisplayDevice` being overridden on game startup in Borderless and Fullscreen modes, based on the window position and size from Windowed mode
- Investigate receiving input without using window event flow HOT 2
- Tablet input should have a property to allow adjusting the mapping target area
- `CancellationToken` should probably always be present in BDL calls
- Input thread blocking causes mouse handling stutters on windows HOT 5
- Game window sometimes does not respond to window size changes
- Periodic AccessViolation somewhere in BASS HOT 1
- Crash on startup with Wayland fractional scaling
- Implement `CADisplayLink` on macOS for potentially better frame timing HOT 1
- Masking sub-tree creation can be avoided with relative ease HOT 3
- Consider using `WS_EX_NOREDIRECTIONBITMAP` HOT 1
- Flickering on fullscreen Vulkan (AMD gpu, Windows)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osu-framework.