Questions tagged [vertex]

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, tangents etc of the points defining the triangular faces of 3D-meshes.

Filter by
Sorted by
Tagged with
0 votes
1 answer
745 views

Normalizing a homogeneous 3d point

As I've seen corruption in geometry, why is it a bad idea to normalize a homogeneous (divide by w) the vertex position returned from vertex shader? Update Vertex shader: ...
worbel's user avatar
  • 173
3 votes
1 answer
3k views

Shader that draws just vertex points

The game I am developing is in unity and I want to make a shader which can be put on a mesh that only 'draws' color on each vertex point. I am not proficient with shaders, and out of all my searching ...
return true's user avatar
1 vote
1 answer
319 views

Reasonable texture Formats for VertexTextureFetch in GL

Wich is a reasonable GL version that have support for vertex textures fetchs(VTF) in OpenGL ? (for example GL 3.0, 3.1, 3.3) What textures formats should I expect to be supported in average video ...
CoffeDeveloper's user avatar
2 votes
1 answer
641 views

How can I deal with vertex precision errors between terrain chunks?

I am using OpenGL to render the following scene, using vertex data from one of the map files of a popular MMORPG. The data is chunked and the pictured scene is made up of 256 (16x16) chunks. However ...
Alan's user avatar
  • 23
0 votes
1 answer
448 views

Making multiple VertexPositionColor variables in the same class? - XNA

I have studying XNA on my spare time for about a year now and I could use some professional help on this issue. Any time given to my problem is appreciated. I have two VertexPositionColor variables ...
William Wymerus's user avatar
0 votes
1 answer
624 views

Fragment Shader output type error

StackExchange! I've been working with opengl for a bit and I'm trying to finally load the shaders instead of having them inline. I'm having a ton of issues, though. As soon as I solve one, another ...
Karim Abdel Hamid's user avatar
0 votes
2 answers
392 views

Setup VertexPositionTexture array for a texture2D at a location

I am trying to adjust the following code to render a quad on a 2D texture at a specific location and specific size. Currently this code will render a fullscreen quad, which makes sense since the ...
test's user avatar
  • 520
0 votes
2 answers
296 views

How to write an adjacency algorithm that compares position data?

I have a list of indexed triangles for which I need to generate adjacency data. I've already written a brute force algorithm that creates 3 edge data structures for each triangle and then compares the ...
P. Avery's user avatar
  • 575
0 votes
1 answer
265 views

What data to store along a vertex

Is there any other recommended data I should store in the vertex buffers aside from a vertex' coordinates, normals and texture coordinates? For example data I'd need for a feature that almost every ...
Moritz Gunz's user avatar
1 vote
1 answer
677 views

Vertex shader in OpenGL/GLSL - transformation of the interior of a textured quad

I have a LWJGL project and ran into a problem with a vertex shader I wrote. In my scene I am rendering a map whose ground consists of rectangular tiles. On top of that there are other objects (I used ...
xoric's user avatar
  • 175
6 votes
2 answers
1k views

How do professional games avoid showing pixel seams in adjacent mesh boundaries due to decimal imprecision?

Graphics cards are mathematically imprecise. So when some meshes are joined by their borders, the graphics card often makes mistakes and decides that some pixels at the seam represent neither object, ...
bandybabboon's user avatar
2 votes
2 answers
3k views

Unity, shader, vertexID

I'm writing a shader and I just wanna ask if it's possible to get the ID of the vertex that is currently being manipulated. I read something about gl_vertexID, but I couldn't find out if that is ...
sebbn's user avatar
  • 21
2 votes
3 answers
7k views

Why Does unity_LightPosition[0] Seem to Depend on Camera Position?

I'm trying to write a fairly basic shader but I keep running into lighting issues with Unity. My first problem was trying to figure out which variable stored the light's position in world space. (I'...
celestialorb's user avatar
4 votes
2 answers
1k views

How can I find the "end" vertices on an open-ended mesh?

I was looking at a video of a system that extrudes meshes along a curve, connecting them end to end but adjusting the vertices for a smooth connection. It does this with a mesh that as far as I know ...
ssb's user avatar
  • 1,245
4 votes
1 answer
683 views

2D Boxes/Vertices merging

I want to optimize my colliders geometry, at the moment is composed by boxes (it's a tile based game) of the same dimensions, i want to remove the inner vertices to have, at the end, only the shell. ...
Mal's user avatar
  • 41
0 votes
1 answer
125 views

Do I need to create an HLSL in XNA to display textures without content pipeline

I currently have a jpeg texture stored as a Color array in XNA as RGBA. I also have the vertices of a cube in OBJ format mapped to VertexPositionColor vertex buffer using the VertexBuffer and Indices ...
user1278255's user avatar
1 vote
1 answer
349 views

Render error in xna DrawPrimitive for Assimp Mesh

I am trying to render the vertices of a scene with a cube I exported as an OBJ from Blender. The 8 vertices become 24 when imported into XNA but when I render it I dont see all faces. This is not an ...
user1278255's user avatar
0 votes
1 answer
1k 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 ...
2am's user avatar
  • 313
1 vote
1 answer
61 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? ...
kyle k's user avatar
  • 121
6 votes
2 answers
934 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 ...
KKlouzal's user avatar
  • 252
2 votes
1 answer
180 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 ...
NightKn8's user avatar
  • 157
0 votes
2 answers
752 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 ...
user2715533's user avatar
0 votes
1 answer
648 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 ...
Greg's user avatar
  • 204
5 votes
1 answer
1k 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 ...
Roger Martins's user avatar
0 votes
3 answers
252 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 vertex ...
Moses Aprico's user avatar
1 vote
1 answer
1k 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 ...
user39570's user avatar
8 votes
2 answers
3k 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 ...
VitorOliveira's user avatar
1 vote
3 answers
327 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 ...
JamesHoux's user avatar
  • 135
2 votes
1 answer
876 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 ...
Gerharddc's user avatar
  • 392
0 votes
2 answers
446 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: <...
jaysonpowers's user avatar
0 votes
1 answer
1k 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 ...
sm81095's user avatar
  • 533
4 votes
2 answers
14k 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: ...
cubrman's user avatar
  • 1,551
0 votes
1 answer
85 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....
Paul Wade's user avatar
  • 103
2 votes
1 answer
2k 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 : ...
UberLambda's user avatar
0 votes
1 answer
359 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 ...
cubrman's user avatar
  • 1,551
1 vote
1 answer
531 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'...
Eric Cartman's user avatar
3 votes
1 answer
368 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 ...
Tannz0rz's user avatar
4 votes
2 answers
9k 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 ...
elijaheac's user avatar
  • 199
3 votes
3 answers
1k 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 ...
a881903z9's user avatar
6 votes
2 answers
1k 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 ...
Mythics's user avatar
  • 1,496
1 vote
1 answer
159 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?
Gerharddc's user avatar
  • 392
0 votes
1 answer
2k 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 ...
Basaa's user avatar
  • 1,053
0 votes
1 answer
498 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 ...
Basaa's user avatar
  • 1,053
0 votes
1 answer
929 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 ...
Mehdi Bugnard's user avatar
1 vote
1 answer
2k 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 "...
Mehdi Bugnard's user avatar
62 votes
5 answers
73k 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: ...
Jaanus Varus's user avatar
-1 votes
2 answers
1k 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. ...
Mehdi Bugnard's user avatar
-2 votes
1 answer
2k 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 ...
Mehdi Bugnard's user avatar
2 votes
2 answers
217 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 ...
Lennard Fonteijn's user avatar
2 votes
1 answer
156 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: ...
multifractal's user avatar