multisampling

XNA 4.0 in a window having jagged edges issues…Know of a method for high quality output?

空扰寡人 提交于 2019-12-13 08:08:24
问题 I'm using this example project's XNA 4.0 form control in an application I'm writing: http://creators.xna.com/en-US/sample/winforms_series1 It's working great and I've done quite a bit with visuals and animation. The main issue I'm scratching my head at is the 3d model and primitive 3D shapes (cylinders with a tessellation of 30) I render have very jagged edges to them as if they are low resolution. I tried to figure out how to enable multisampling, but all of the examples I can find online

Multisampling and Direct3D10 / D3DImage interop

依然范特西╮ 提交于 2019-12-11 13:24:28
问题 I'm trying to implement a renderengine using Direct3D 10 (SlimDX) and WPF. I create my device and rendertargetview with the right MultiSample parameters ( 1,0 / 2,0 and 4,0 are working) this.multiSamplingDescription = new SampleDescription(sampleCount, qualityLevel - 1); // 4,1 Texture2DDescription colordesc = new Texture2DDescription(); colordesc.BindFlags = BindFlags.RenderTarget | BindFlags.ShaderResource; colordesc.Format = this.renderTargetViewFormat; // Format.B8G8R8A8_UNorm colordesc

Blitting multisampled FBO with multiple color attachments in OpenGL

◇◆丶佛笑我妖孽 提交于 2019-12-11 08:53:49
问题 I have a frame buffer object in an OpenGL program with multiple colour attachments, and am trying to upgrade it to a multisampled FBO. As I understand it, a multisampled FBO is only able to use render buffers, specifically ones created using glRenderbufferStorageMultisampleEXT . If I want something rendered to this FBO in a texture, I need to create a second FBO with textures for its attachments, then blit the multisampled FBO to the regular FBO using glBlitFramebufferEXT . The very, very

OpenGL - How to draw to a multisample framebuffer and then use the result as a normal texture?

北城以北 提交于 2019-12-11 08:05:50
问题 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 generate a texture, attach it to a framebuffer, render to it, then use the framebuffer's texture as Texture2D. Now, I'd like to add antialiasing to my library, so I'd like to be able to set multisampling on a Canvas. Now I'm confused because I've found that you need to alter shaders to use

python 1:1 stratified sampling per each group

旧时模样 提交于 2019-12-11 06:48:47
问题 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.DataFrame({'id':[1,2,3,4,5], 'group':[0,1,0,1,0], 'sub_category_1':[1,2,2,1,1], 'sub_category_2':[1,2,2,1,1], 'value':[1,2,3,1,2]}) display(df) display(df[df.group == 1]) display(df[df.group == 0]) df.group.value_counts() For each member of the main group==1 I need to find a single match of group=

How are depth values resolved in OpenGL textures when multisampling?

放肆的年华 提交于 2019-12-10 20:19:24
问题 I'm using an FBO to render my scene to a depth texture ( GL_DEPTH_COMPONENT ). When I enable multisampling in my application, those samples are resolved to a single texel, but how are they combined? Is the depth of the nearest sample stored to the texture, or the average of the samples? Is this behavior vendor-dependent? 回答1: See the multisample specification document: "If the depth test passes, all multisample buffer depth sample values are set to the depth of the fragment's centermost

How is explicit multisampling different from regular multisampling in OpenGL

廉价感情. 提交于 2019-12-10 16:47:15
问题 I was reading this tutorial on MSAA in deferred shading, from 28byteslater.com. It says that in explicit multisampling we can access a particular sample. Could not we do the same from a regular texture that was bound to GL_TEXTURE_2D_MULTISAMPLE for instance? This was the shader code that I used to use earlier for accessing individual samples (without using explict multisampling): uniform sampler2DMS Diffuse; ivec2 Texcoord = ivec2(textureSize(Diffuse) * In.Texcoord); vec4 colorFirstSample =

Multisampling in pipeline

纵然是瞬间 提交于 2019-12-10 11:44:59
问题 In multisampling, during rasterization there are more than one sample points in each pixel and sample points are decided which constitutes the primitive. which attributes are same for each sample in a pixel? I read somewhere that color and texture values are same but depth and stensil values for samples in a pixel are different. But as fragment shader is executed for each sample points then they should be different. Also, When does the multiple samples are resolved in pipeline, after fragment

Issue with Android OpenGL Multisampling/Antialiasing

萝らか妹 提交于 2019-12-10 10:27:31
问题 I'm working on an app for Android allows the user to tap the screen to draw colors. I've got all of the drawing code working nicely under OpenGL (testing on Android 4.0.4, Galaxy Nexus, though I'm trying to make this backward compatible as far as possible; my SDK targets API 14 but has a minSDK of 8). The issue I've run into is with antialiasing; I want all my polygons and lines to be antialiased, but they're coming out jagged. I'm positive the Galaxy Nexus supports antialiasing (I've seen it

ResolveMultisampleFramebufferAPPLE generates INVALID_OPERATION

时光怂恿深爱的人放手 提交于 2019-12-10 10:14:48
问题 I can't figure out, why glResolveMultisampleFramebufferAPPLE generates error 1282 (0x0502, GL_INVALID_OPERATION ). Setup code: glGenFramebuffers(1, &framebuffer); glBindFramebuffer(GL_FRAMEBUFFER, framebuffer); glGenRenderbuffers(1, &colorRenderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(id<EAGLDrawable>)self.layer]; glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer