146 questions
0
votes
1
answer
73
views
How to fix the "Binding multisampled flag (1) doesn't match the layout's multisampled flag (0)" error in WebGPU?
I`m trying to add MSAA to a model with multiple textures (normal, metallicRoughness, baseColor, emission), but get the following error:
Binding multisampled flag (1) doesn't match the layout's ...
1
vote
1
answer
470
views
Only use MSAA on edge pixels?
In OpenGL, is it possible to use multisample anti-aliasing only on edge pixels and sample each other pixel only once in order to improve performance?
In other words, I want to treat edge pixels and ...
3
votes
1
answer
379
views
Resolving multisample array textures
I'm currently trying to implement cascaded multisampled variance shadow maps. While my non-multisampled maps appear to be working fine, I'm having issues with resolving the multisampled array textures....
2
votes
1
answer
808
views
Premultiplied alpha and multisampling in OpenGL
I'm rendering some triangles into multisampled texture. Then blit this texture into normal texture and draw a textured quad onto screen.
I need the final texture to have premultiplied alpha. Is there ...
3
votes
1
answer
538
views
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT trying to create multisample framebuffer
I'm trying to figure out how to create a framebuffer object that handles multisampling. Below is my attempt to get it working, but I keep getting GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT erros whenever I ...
2
votes
1
answer
292
views
How multi sampling works for Integer textures
I didn't find any documentation on how Integer texture should behave for Multisampling.
For example, for 4 sub-samples, if the values in sub-samples are 0, 0, 500, 500.
Does it resolve to 250,250,250,...
0
votes
0
answers
209
views
WebGL mass framebuffer multisampling dont work
I tried to use edge detection in webgl. I got the edge effect I wanted, but the edge jagged is serious. I searched the following information, and the framebuffer multisampling related to mass can ...
0
votes
0
answers
354
views
texture with alpha component rendered offscreen: dots pattern in a multisample renderPass
I create an offscreen texture with alpha component, samples in the offscreen renderPass is VK_SAMPLE_COUNT_1_BIT.
When I use this texture in a VK_SAMPLE_COUNT_4_BIT renderPass, I get black dots ...
1
vote
0
answers
832
views
Multisampled input and output (vulkan)
I want to blend multisampled image on other multisampled image. Images have the same number of samples and the same sizes. I tried 2 approaches:
multisampled texture. Fragment shader:
#version 450
...
1
vote
1
answer
1k
views
OpenTk - How to Enable Multisampling
I'm trying to implement multisampling in OpenTK but when i enable it there's no diffrence between
no antyaliasing and multisampling.
No Antyaliasing
Multisampling Enabled
Here's a code in ...
1
vote
1
answer
2k
views
Multiple random samples without replacement in R [duplicate]
I have a vector of size M = 2630, How can I draw 4 samples of size M/4.
The following code is not working
M <- c(1:2630)
mysample <- split(sample(M), 1:(length(M)/4))
Since (length(M)/4) is ...
1
vote
0
answers
80
views
spark efficient distribution pairing to compare cohorts
How can I efficiently compare matched cohorts in spark?
In python for each observation of the minority class in a highly imbalanced dataset sampling k observations from the majority class can be ...
5
votes
1
answer
1k
views
Resolution of multi-sampled frame-buffer with multiple color attachments
Trying to implement Anti-aliasing on top of deferred shading, I'm attempting to use multi-sampled render buffers and then resolve the samples with a buffer-blit pass.
As is traditional in deferred ...
0
votes
1
answer
311
views
multiple sampling in R [duplicate]
I'd like to know how to make multiple sampling in R. For example, when I try dividing some data into 60(train data):40(validate data), I can write the code like this:
original.data = read.csv("~.csv"...
1
vote
1
answer
2k
views
python 1:1 stratified sampling per each group
How can a 1:1 stratified sampling be performed in python?
Assume the Pandas Dataframe df to be heavily imbalanced. It contains a binary group and multiple columns of categorical sub groups.
df = pd....
1
vote
1
answer
284
views
How to use multisampling with "return" in a fragment shader?
I draw transparent figures by depth peeling, the result is ugly when I render to multisample (a grid appears)
vec4 fragColor = texelFetch(frontTexture, ivec2(gl_FragCoord.xy), 0);
if (gl_FragCoord.z ...
1
vote
1
answer
244
views
Metal multisampling results in darkened textures
So I'm trying to implement full-screen MSAA in my Metal app. I have it working and when drawing solid-filled polygons the edges appear smooth as expected. However, my textured polygons appear dark, ...
11
votes
1
answer
1k
views
How to use multisampling with an MTKView?
I'm trying to get multisampling working with MTKView. I have an MTKView with a delegate. I set the view's sampleCount property to 4. I create a pipeline state descriptor with the rasterSampleCount set ...
3
votes
2
answers
271
views
OpenGL multiple render target FBO with multisampling - requirements
When creating a multisample FBO, do all attached target textures need to be multisample-textures?
0
votes
0
answers
489
views
OpenGL ES antialiasing with rendering using GL_LINES
I am struggling to render smooth lines using GL_LINES.
I have borrowed the MultisampleConfigChooser from the following link: MultisampleConfigChooser.java
It seemed to find the multisample ...
1
vote
1
answer
782
views
How to render anti-aliased image to a texture (and then write to PNG)?
I'd like to use the "render to texture" paradigm to write a .png screenshot of my OpenGL 3D rendering. I have it working without multi-sampling, but I'm struggling to get an anti-aliased image.
...
1
vote
1
answer
756
views
Multistage sampling with R with only final sample size given
I am trying to implement an algorithm for sampling in several stages where only the final size of the sample is known.
Here is an example of the structure of my sampling frame. Where:
cluster is a ...
0
votes
0
answers
168
views
Spritekit SK3DNode antialiasing / jittering
I'd like to use antialiasing for 3D objects displayed through an SK3DNode.
I've skimmed through the documentation but apparently there is no easy flag to set multisampling for the SceneKit renderer ...
0
votes
1
answer
827
views
Multisampling with glBlitFramebuffer not working opengl es 3.0
Overview: Coming from this, i changed to ES 3.0, and after reading and trying for a day, i'm stuck once again in achieving Antialiasing. I'm testing this on iOS simulator.
Issue: My drawings are ...
0
votes
1
answer
73
views
convert numpy.ndarry to DataFrame maintaining indices after upsampling
X_train_1, X_test_1, y_train_1, y_test = train_test_split(x, y,
test_size = .3)
X_train_sam, y_train_sam = ADASYN(random_state=42).fit_sample(X_train_1, ...
0
votes
1
answer
831
views
Multisampled texture is blank when saved to image (DirectX)
UPDATE: this issue turned out to be a silly typo (see answer), which was clearly identified by the DirectX debug layer after I was able to enable it. However, I'm leaving the question up as I think ...
14
votes
2
answers
9k
views
WebGL Framebuffer Multisampling
I know webgl can antialias or multisample stuff you render to the screen to avoid hard edges, but when I used a framebuffer it didnt do it anymore and there were a bunch of jagged edges on the screen.
...
1
vote
0
answers
363
views
How to blend samples from multisample software rendering
please forgive any incorrect terminology, I'll do my best to explain.
I'd like to know how a rendering technology - gpu/cpu etc blends/merges the samples generated from multisample rendering? (...
2
votes
2
answers
3k
views
Multisampled FBO's in OpenGL ES 3.0
How is it possible to have a multisampled texture as part of an FBO in OpenGL ES 3.0 (Android)?
The method glTexImage2DMultisample does not seem to exist.
I also want to call glReadPixels on this ...
0
votes
1
answer
4k
views
How to find out if glEnable(GL_MULTISAMPLE) is working for my texture?
I am trying to display an image in full window using two simple GLSL shaders:
Vertex Shader:
#version 330
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec2 aTexCoord;
out vec3 ...
1
vote
1
answer
284
views
Using multi-sampling creates artifacts along mesh edges (DirectX, C#)
I'm rendering a mesh in a visual c#, using directx. When turning on anti-aliasing, I got following artifacts along the edges on mesh (see image). Artifacts shows only on edges turned toward the camera ...
0
votes
2
answers
1k
views
Using OpenGL frame buffer objects with Qt (QOpenGLWidget), how to disable multisampling when drawing to frame buffer
As the title suggests, I'm using Qt for OpenGL drawing, and with QOpenGLWidget I can turn on multisampling for the main screen buffer with QSurfaceFormat's setSamples() function. This works fine and ...
0
votes
1
answer
88
views
Anti-aliasing issue in iPhones with OpenGL ES
I am Trying to draw curves/lines using OpenGL ES on iPhones. I have used glRenderbufferStorageMultisampleAPPLE(GL_RENDERBUFFER_OES, 4, GL_DEPTH_COMPONENT16_OES, backingWidth, backingHeight) and ...
1
vote
1
answer
287
views
Multisampled FBO is ignoring depth testing
I have modified my rendering engine to use multisampled textures, except now depth testing is being ignored.
Here's how I'm creating the multisampled FBO,
public MSAA_FBO(int WindowWidth, int ...
0
votes
0
answers
88
views
OpenGL - Multi Sampled FBO methodology
I am implementing Multisampled Antialiasing into my deferred rendering engine and I'm curious, can I simply use a multisampled texture for the albedo output? Or will the depth texture, normals texture ...
2
votes
2
answers
4k
views
Using 'discard' in GLSL 4.1 fragment shader with multisampling
I'm attempting depth peeling with multisampling enabled, and having some issues with incorrect data ending up in my transparent layers. I use the following to check if a sample (originally a fragment)...
9
votes
1
answer
12k
views
OpenGL - How to draw to a multisample framebuffer and then use the result as a normal texture?
I'm developing a little gamedev library. One of the elements of this library is a Canvas (offscreen drawing area), which is implemented through an OpenGL framebuffer. So far, everything's been good, I ...
13
votes
1
answer
14k
views
What does my choice of GLFW_SAMPLES actually do?
What does setting this variable do? For instance, if I set it to 4, what does that mean?
I read a description on glfw.org (see here: GLFW Window Guide) under the "Framebuffer related hints" section. ...
3
votes
3
answers
12k
views
Multiple Random Sampling in R
I currently have a data frame called liquidation where I want to run 30 random samples of 1000 observations each from it, designate which account came from which sample and then combine it into a new ...
0
votes
0
answers
137
views
Is there 'random sampling with replacement' in MKL?
I am coding using C/C++, and try to do sampling with replacement based on the sampling probability.
Considering the running performance, I try to use Intel MKL. However, I only find random sampling ...
2
votes
0
answers
541
views
Retrieve color of current texel in fragment shader
I want to retrieve the color of the current texel in my fragment shader so I can adapt the output color depending on it.
For example: if the current texel's color is red then set the color to green.
...
-1
votes
2
answers
3k
views
OpenGL How to render to texture with multi-sampling
Implementing some effect, I end up with 1 frame buffer associated to 1 texture, which holds my final scene. This texture is then applied on a fullscreen quad.
The result is what I expect as far as ...
0
votes
1
answer
387
views
Multisampling, how to read back "unique" texels
I am looking at how i am going to implement antialiasing in a deferred lighting renderer. So three passes, a geometry pass, a lighting accumulation pass, and then a 2nd geometry pass for shading.
...
0
votes
1
answer
899
views
Blit from multisample textures to non multisample
I've one MS FBO with 3 attached MS textures and nonMS FBO also with 3 attacheed nonMS textures. Is there a way how to blit that? If i blit FBO's entirely, MS FBO combines it in a one texture, and that'...
2
votes
2
answers
2k
views
GLSL: is it an error to use a non-multisampled texture with a sampler2DMS
I have an app that may run either with or without multisampling. I am fetching samples from previously rendered multisample textures in a shader. Is it necessary to compile different versions of the ...
2
votes
1
answer
763
views
GLSL access coverage mask of sampler2D texel
If I access a multisample texture in GLSL through a sampler2DMS, how do I know which of the samples in a texel of this multisample texture have actually been covered?
From the multisample extension ...
0
votes
2
answers
3k
views
Direct X 11 jagged edges
I am creating a small game engine in Direct X 11 which is going great but i noticed that 3D objects as well as 2D Objects seem very rough around the edges when rendering. I previously came from Direct ...
2
votes
1
answer
1k
views
Pure SSAA vs per-sample multisampling
What's the difference between a pure Super Sampling Anti Aliasing (SSAA) and multisampling with a per-sample shading via
gl4.glMinSampleShading(1.0f);
using GL_ARB_sample_shading?
I like much more ...
2
votes
0
answers
933
views
GLSL, how are interpolateAtSample/Offset supposed to work?
I have this question now since a long time, I can't get a simple multisample example running..
This is the original code, this is the vs and this the fs, that I report here for convenience:
layout(...
0
votes
1
answer
821
views
glResolveMultisampleFramebufferAPPLE() generate GL_INVALID_OPERATION on iOS (OpenGL ES 2.0)
I want to use function glReadPixels() to do screenshot of my scene. And it works great if I don't use multisampling. But if I do I get GL_INVALID_OPERATION in glResolveMultisampleFramebufferAPPLE(). ...