# Tagged Questions

In geometry a vertex is a point defining the corners of polygons or intersections of lines. A triangle for example is defined by 3 vertices with lines between them. In 3D-graphical APIs like OpenGL and Direct3D a vertex is a data structure containing information about the positions, normals, colors,...

456 views

### why is glVertexAttribDivisor crashing?

I am trying to render some trees with instancing. This is rather weird, but before sleeping yesterday night, I checked the code, and it was in a running state, when I got up this morning, it is ...
44 views

### vertex is bending inwards

I am trying to draw a picket fence, but the center of the picket vertex looks bent in the middle, why is the picket bending inwards to the left? // draw fence pickets float a; for (a=-25; a<=25; ...
365 views

### How do I simplify terrain with tunnels or overhangs?

I'm attempting to store vertex data in a quadtree with C++, such that far-away vertices can be combined to simplify the object and speed up rendering. This works well with a reasonably flat mesh, but ...
86 views

### Direct3D: should I use MIXED_VERTEXPROCESSING?

Yesterday on Youtube I watched a video tutorial about creating Direct3D stuff. On that tutorial there was a part about VERTEXPROCESSING compatibility with older video cards. The guy said that the ...
283 views

### Rendering terrain only with GPU

This is not about generating plane geometry and then applying a shader on it. Instead, I want a big single flat plane, then apply a shader on it. The vertex shader has a uniform vec3 ...
256 views

### How do I pass an object location into a vertex shader?

I am using Blender Game Engine. I want to create a large flat plane, and deform it locally near a moving object. So far (despite being a beginner at shaders) I've written a vertex shader for the ...
711 views

### Spritebatch Vertex shader world matrix change after each draw

I have a spritebatch where I draw some textures transformed in 3d space. The easy way was just Begin with the transformation matrix, draw, and end it right after. But that is silly, so I'm trying ...
226 views

### Why I am I told “Color0 is missing” when I run the following code?

In the code below, I want to draw a box on my screen. But when I run it, there is an error message: The current vertex declaration does not include all the elements required by the current ...
355 views

### Effectively drawing dynamic primitives

Okay, so this is where I am now. My game largely consists of textures drawn through spritebatch. Now I have to draw a dynamic number of triangles. I cannot say in advance where or how many I have to ...
2k views

### How does Unity3D lower an imported .obj vertex count?

I have a question regarding how Unity3D handles importing of .obj files. I'm importing this teapot: http://groups.csail.mit.edu/graphics/classes/6.837/F03/models/teapot.obj The number of vertices ...
217 views

### Is it possible to gain performance by omitting vertex normals in the GPU pipe?

I am working on a rendering problem where I want to render as many raw triangles to the screen as I can with either OpenGL or DirectX with the absolute fastest performance possible. I wondered about ...
411 views

### XNA calculate normals for linesegment

I am quite new to 3D graphical programming and thus far only understand that normal somehow define the direction in which a vertex faces and therefore the direction in which light is reflected. I have ...
198 views

### Need to know the origin and coordinates for 2d texture and 2d/3d vertices in webgl

Long story short, I know my coordinates are off and I believe my indices might be off. I'm trying to render a simple 2d rectangle with a texture in webgl here's the code I have for the vbo/ibo: ...
530 views

### Problems with 3D Array for Voxel Data

I'm trying to implement a voxel engine in C++ using OpenGL, and I've been working on the rendering of the world. In order to render, I have a 3D array of uint16's that hold that id of the block at the ...
259 views

### HLSL How to flip geometry horizontally

I want to flip my asymmetric 3d model horizontally in the vertex shader alongside an arbitrary plane parallel to the YZ plane. This should switch everything for the model from the left hand side to ...
5k views

### Computing pixel's screen position in a vertex shader: right or wrong?

I am building a deferred rendering engine and I have a question. The article I took the sample code from suggested computing screen position of the pixel as follows: VertexShaderFunction() { ... ...
67 views

### Change emission level of a set of vertices within a mesh

ok so here is the problem I need to solve. I have a known set of vertices that I need to "animate" the emission level of. Currently I have a vertex definition setup and RGB color data for each vertex....
1k views

### How do I create a manual object with colors for each vertex?

How do I create a shaded manual object with colours for each vertex? Eg if ogreObj is the Ogre::ManualObject : ogreObj->begin("BaseWhiteNoLighting", Ogre::RenderOperation::OT_TRIANGLE_LIST); ...
222 views

### How to control in the vertex shader where pixel ends up in the renderTarget?

What if I have an arbitrary renderTarget, that is smaller than the screen (say it is 1x1 pixel) and I want to make sure in the VertexShaderFunction that all my pixels end up exactly in that 1 pixel ...
306 views

### Optimize a vertex buffer and generate its associated index buffer

I need to generate a 64*64 grid with each cell being 32*32 wide. The following code works perfectly but I was wondering whether it can be further optimized when creating the index buffer for it. I'...
155 views

### Surface normal to screen angle

I've been struggling to get this working. I simply wish to take a surface normal and convert it to a screen angle. As an example, assuming we're working with the highlighted surface on the sphere ...
3k views

### How do I morph between meshes that have different vertex counts?

I am using MeshMorpher from the Unify wiki in my Unity project, and I want to be able to transform between arbitrary meshes. This script only works when there are an equal number of vertices between ...
729 views

### What is the practical use of IBOs / degenerate vertex in OpenGL?

Vertices in 3D models CAN get cut in the process of optimizing 3D geometry, (degenerate vertices) by 3D graphics software (Blender, ...) when exporting because they aren't needed when reusing a vertex ...
792 views

### Something other than Vertex Welding with Texture Atlas?

What options (in C# with XNA) would there be for texture usage in a procedural generated 3D world made of cubes to increase performance? Yes, it's like Minecraft. I've been doing a texture atlas and ...
121 views

### MonoGame WP custom vertex decleration

How do I go about implementing and using a custom vertex deceleration in monogame for windows phone 8. I want to be able to store a position, a colour and a normal?
495 views

### Get world-position in Vertex shader

I'm wondering how I can get the final position of a vertex. I use glTranslate in my render code, and I'm not getting the world-coordinates correct. My world is devided in chunks and my position get's ...
392 views

### GLSL Shaders-> How to manage?

As your game get's bigger and bigger, you will use more and more different shader effects. Let's take an easy example: I have clouds in my voxel-based world, and I want to give it a blue-ish tint ...
478 views

### How to update “dynamicVertexBuffer” correctly with “setdata” on XNA?

I developed a small 3d games xna and uses a "DynamicVertexBuffer" and "DynamicIndexBuffer" to store and draw my vertices. Everything works fine, but my problem is the "Update" function where I update ...
794 views

### How to draw different textures on my cubes DrawUserIndexPrimitive with XNA?

I'm having some problem to draw textures with class "DrawUserIndexPrimitive" on Xna. I can draw my cubes / models without problem. But I want to draw different textures on my cubes. I loop on each "...
16k views

### What are normal, tangent and binormal vectors and how are they used?

I would like to find out the following information: What are they? Example usage in game development (the area they are used in) About the following vector types: Normal Tangent Binormal A ...
753 views

### Draw 60,000 cubic with DrawUserPrimitives on xna with only 20 fps-buffer problem?

I'm working on a minecraft style games on xna. I know it is not easy to draw a lot of cube with a good ratio of fps. I use the method "DrawUserPrimitive" with a buffer to draw a floor 250X250 cubes. ...
1k views

### How to draw millions of cubes without idle , model instancing in XNA?

I work for a project in the style of game "Minecraft". I started using the "Model Instancing" in order to generate a large number of cubes possessing an identical model. So far so good. My problem is ...
182 views

### One or multiple VertexBuffers

I'm currently working on a personal project where I'm trying to load the levels and all of the geometry from the game "Medal of Honor Allied Assault" into my own C# code-base based on SharpDX. I ...
137 views

### Pixelated Normal Generation

I am generating normals for each vertex in a standard 512*512 quad. Yet when I do using the following code: public Vector3f[] normals(Vector3f[] surface){ Vector3f[] normals = new Vector3f[surface....
306 views

### Selecting and moving vertices

How can I identify the correct vertecis and move them in XNA using VertexBuffer? Let's say I have a simple cuboid in my project and want to move one face of it. How would I loop thru vertices, get ...
2k views

### How do I create geometry in SceneKit?

I have been experimenting with Apple's new SceneKit for fun, but I cannot seem to figure out how to input vertex data without loading a .dae file. Does anybody who has been testing SceneKit have any ...
238 views

### How can I efficiently form terrain from a large number of cubes in XNA? [duplicate]

I have a project with a floor built from with small cubes (100x100 of them). If I exceed that size, the performance of my game suffers. How can I efficiently draw a larger number of identical models? ...
330 views

### Disappearring instances of VertexPositionColor using MonoGame

I am a complete beginner in graphics developing with XNA/Monogame. Started my own project using Monogame 3.0 for WinRT. I have this unexplainable issue that some of the vertices disappear while doing ...
2k views

### DirectX 9 - model rendering from .obj files issues

Well I can clearly tell that what rendered is close to what I wanted, but there seems to be a few problems. The .obj files contained values like "f", "v", "vt". Image Of Problem: http://i49.tinypic....
1k views

### Custom VertexDeclaration for Color, Texture, Normal

What is the best way to create a VertexDeclaration, that makes it able to render a Shape consisting of vertices and also be able to store a color for the shape (in case the texture can't be rendered - ...
234 views

I have problem with my shader on NVIDIA cards. On AMD it's working right. Shader Builder exported CODE: //ROOT //PSParts //VSParts //Samplers sampler sLod23ColorGround : register(s0); sampler ...
200 views

### Is it only possible to display 64k vertices on the monitor with 16bit?

I did the first 3D tutorial over at riemers.net and stumbled upon that my graphic card only supports Shader 2.0 (Reach profile in XNA) which means I can only use Int16 to store the indices (triangle ...
550 views

### XNA shield effect with a Primative sphere problem

I'm having issue with a shield effect i'm trying to develop. I want to do a shield effect that surrounds part of a model like this: http://i.imgur.com/jPvrf.png I currently got this: http://i.imgur....
209 views

### DrawIndexedPrimitives overdraws data in previous buffer if called in loop

I doubled the question from stackoverflow here, and will delete the opposite of a question that gave me the answer. I have the Draw method in one of my renderers, that loops through the dictionary ...
257 views

My test FBX mesh is a cube. From what I surmise, it seems that the cube is on the extreme end of this issue, but I believe that the same issue would be able to occur in any mesh: Each vertex has 3 ...
352 views

### GLSL vertex shaders with movements vs vertex off the screen

If i have a vertex shader that manage some movements and variations about the position of some vertex in my OpenGL context, OpenGL is smart enough to just run this shader on only the vertex visible on ...
1k views

### Vertex shader are evil for performance?

I found that the vertex shaders are sometimes very useful, especially because they can generate geometries and extract and use a lot of informations from just 1 image. The problem is that my project ...
192 views

### Overlapping vertices on sphere?

Iv started up doing some programming in XNA as Iv been doing C# for several years and would like to start do some 3D work with C# and XNA framework. Right now Im trying to build a sphere by code. It ...