Open hajimehoshi opened 4 months ago
Hmm, this might not match well with the current pixel mode, where an integer position is specified.
Other notes:
OpenGL: there is no way to choose a sampler in GLSL programatically. This is bound to a texture by glTexParameteri
. As of OpenGL 3.3, a sampler object is available.
DirectX: A sampler can be chosen in HLSL?
Metal: A sampler can be chosen in MSL.
So, "why not both"? We can have funcitons to get a texel data without interpolations (like texelFetch
) and with interpolations (like texture2D
)?
Just my opinion, but I don't think it's necessary, and I couldn't imagine a clean way to integrate the notion of samplers in ebitengine/kage. Also, linear sampler is one example, but there are many different filtering techniques, so when should we stop? (linear, bilinear, trilinear, etc...) I would rather write an example implementation in Kage, or (what this issue aims for) wait for other user inputs 😅
Thanks,
Also, linear sampler is one example, but there are many different filtering techniques, so when should we stop? (linear, bilinear, trilinear, etc...)
IIUC nearest and linear are the two common preset filter in various libraries/GPU. There are no other such filters
Operating System
What feature would you like to be added?
Now Kage doesn't provide a linear sampler and a user has to do their own linear interpolation. This is troublesome. We want an option to specify a sampler.
Why is this needed?
A linear fileter is useful (e.g. implementing a SDF font).