All Questions

Filter by
Sorted by
Tagged with
3
votes
1answer
66 views

vertical or horizontal line test

I have a line segment defined by two coordinate values and I need to check if the line segment is parallel to the x-axis or y-axis. I believe that it is not that difficult to find. When it comes to ...
4
votes
1answer
238 views

SVG opengl implementation - strokes overlap on transparency

I am trying to implement svg rendering by opengl using meshes. In paths with opacity less than 1, the color of overlapping strokes add up. But it should be like this the opengl calls are: ...
14
votes
1answer
7k views

Get vector length with GLM

I am quite confused over how GLM library is behaving or I am using it improperly. glm::vec2 testVec(6,-4); float len = testVec.length(); I get the value ...
9
votes
1answer
243 views

Map a texture onto a hyperbolic triangle

I've been stuck on how to approach this for a while, so any suggestions would be gratefully appreciated! I want to map a texture in the form of a lower right euclidean triangle to a hyperbolic ...
7
votes
2answers
568 views

Raytracing Problem - Casting Shadows

So I was tasked to create a model of the Cornell Box. I've managed to do everything up until casting shadows, in which case some shadows are cast when there should not be any. Here are pictures of ...
11
votes
1answer
555 views

Compensation for energy loss in single-scattering microfacet BSDF models

Single-scattering microfacet-based surface models like the original Torrance-Sparrow BRDF or derived models like the BSDF for rough dielectric surfaces by Walter et al. neglect inter-reflection of ...
1
vote
1answer
66 views

How to test if one object A intersects and is therefore partly or wholly inside object B

I have the world point positions of two objects, and would like to test if there is an intersection between the two objects from this information. What methods can I use to test this, especially at ...
4
votes
1answer
160 views

Test if a point is on a line segment

I have a line segment defined by two end points. And I have another randomly chosen third point and I want to find out if the third point is on the line segment or not. By "On the line segment", I ...
9
votes
1answer
772 views

Is Jump Flood Algorithm Separable?

JFA (the algorithm described here: http://www.comp.nus.edu.sg/~tants/jfa/i3d06.pdf) can be used to get an approximation of a Voronoi diagram, or a distance transform. It does so in logarithmic time ...
4
votes
1answer
260 views

Frustum - problem with z dimension

I'm beginner in OpenGL and I stumbled into a problem. I'm in OpenGL 2.1 for the time being, if that's of any help. I set my Frustum as such: ...
1
vote
3answers
196 views

Trouble Finding Simple 2D DirecX11/HLSL Issue

Some possible things that might be the issue and could be explained by someone who is knowledgeable Order of my indices, In all I've read, your array of indices for a triangle list is just clockwise ...
3
votes
1answer
449 views

Triangulated model rasterization: light-weight Python library

I have a 3D model, which consists of ~50 thousand vertices and 100 thousand triangles. Format is: there's array of vertices' coordinates and array of triangles, which has numbers of vertices (e.g., [1,...
9
votes
3answers
1k views

Ordering a set of unorganized points along a curve

I have a set of 3D points (which I recover from a library that performs the tessellation of a solid body) that belong to a curve (i.e., an edge of the solid). That means that the curve surely passes ...
2
votes
1answer
108 views

How can I use multiple texturing with shadow mapping?

So, recently I followed this tutorial about shadow mapping, but in the tutorial it doesn't texture the object.. When I try to add a texture, it's distorted by the ...
4
votes
2answers
629 views

Why map Hammersley 2D set's (u,v) to sphere's (θ, φ) coordinates (and not to (φ, θ) )?

As explained in Holger Dammetz page Hammersley Points on the Hemisphere, the 2D coordinates (u,v) are usually mapped to the spherical coordinates (θ, φ). As a result, the coordinate "uniformly ...
8
votes
3answers
364 views

Color space of MERL BRDF database?

I know that by now it might be considered as a kind of sad recurrent joke, but by chance, does anyone here has the least information about the colorspace of RGB values in the MERL BRDF measurement ...
6
votes
1answer
163 views

Volume Rendering in simple words

I am looking for a explanation about volume rendering in simple words, a step by step kind of, like ray tracing: for every pixel in the screen plane, trace a ray starting from the eye point to ...
5
votes
0answers
197 views

scan line conversion

I am going throug the topic scan line conversion where the scan line parallel to the x-axis is put through the intersection test with all the edges of the polygon. Would there be any large ...
6
votes
1answer
733 views

HLSL Deferred Rendering

I've recently made the switch to Visual 2015 and the .fx files have been depreciated. My project contained .fx files for the shaders so I've been switching over. Only during the switch have I changed ...
9
votes
1answer
339 views

Creating shared vertex normals on GPU

I've mostly succeeded at porting an implementation of Marching Cubes from CPU over to OpenGL compute shaders, but I haven't tackled normals yet and wondering the best way to go about it. My ...
6
votes
2answers
2k views

Rotate image around its center

I'm struggling with a problem with image rotation. I'm using the idea of "Rotation by area mapping" in the following link: http://www.leptonica.com/rotation.html My c# codes are as follows. The idea ...
4
votes
1answer
718 views

Interpolating vectors on a grid

If you have values on a grid and you want to find the value of a point within one of the cells, you can use techniques like bilinear or bicubic interpolation to get the data at that point. What ...
3
votes
1answer
345 views

Bitpacking into buffers with webgl (shadertoy)

I'm working on a webgl pixel shader which is writing to a 16 bit floating point buffer (each color channel r,g,b,a is a 16 bit floating point number). I'm trying to figure out if there are any decent ...
3
votes
1answer
1k views

Uniform Buffers: What is quicker?

So I want to render a buttload of quads by using a single 4 point vertex array and change the position of the quad. What is quicker: Using glBufferSubData to ...
6
votes
1answer
744 views

Confused about z-axis behaviour

I'm a newcomer to OpenGL and I was playing around with drawing triangles with different z-coordinates. From what I understand, the z axis point out of the screen, and the -z axis points into the ...
5
votes
1answer
4k views

How does DirectX 12 SLI VRAM stacking work?

Mainly talking about dual-SLI here for consistency. With past DirectX (and OpenGL) APIs, VRAM was mirrored across graphics cards. With dual-SLI, this was possible by rendering one frame with one ...
1
vote
2answers
712 views

How to build a triangle-voxel list from a triangle mesh?

I have been playing with voxelization for a little time, I'm still very new to this technique. I am trying to use it for ray tracing but I've been stuck with one problem. There are some codes out ...
4
votes
1answer
304 views

Jitter texture generation

I am currently reading the awesome paper by Jorge Jimenez about Character rendering : Next Generation Character Rendering In the part about multi-sampled transmittance he uses some Poisson offsets ...
6
votes
2answers
570 views

Rotate line around center

I have to use a propriertary graphics-engine for drawing a line. I can rotate the whole drawing by its origin point (P1). What I want, is to rotate it around its center point(M). So basically that it ...
3
votes
1answer
573 views

Choosing & Using a Projection Matrix

I'm looking into the graphics pipeline processes and at the moment in particular, perspective projection matrices. After looking in several different sources, and across the breadth of previous ...
4
votes
1answer
719 views

Bicubic bezier surface from 4 bezier curves

In the program I need to create, the user should specify the hull geometry of an aircraft wing and fuselage using cubic bezier polycurves. But to get to m bezier ...
8
votes
1answer
2k views

What is the benefit of using Half Edge over Winged Edge?

For mesh representation, what is the benefit of using Half Edge over Winged Edge data structure? I understand both mesh representations, the only difference is that half edge uses directional edge ...
6
votes
2answers
1k views

Ray tracing with thin lens camera

I'm reading Cook's paper "Stochastic Sampling and Distributed Ray Tracing", I don't understand how the rays are generated. He says: Determine the focal point by constructing a ray from the eye ...
4
votes
1answer
147 views

What are the most efficient ways to convert between f32 and smaller float formats on the CPU?

Open GL and other graphics APIs support floating point formats smaller than 32 bits (e.g. see https://www.opengl.org/wiki/Small_Float_Formats). While GPUs seem to handle these formats natively, CPUs ...
3
votes
2answers
647 views

Correct view-space transform

I am attempting to model a simple graphics pipeline (i.e. Local->Word->View->Screen->2D spaces). I've been looking at the algorithm required to transform from world to view-space and using the ...
6
votes
1answer
1k views

What happens when you display a high resolution image on a low resolution screen?

For a non-computer graphics expert, what happens technically when you do this? Are multiple pixels merged to one to compensate for the lower resolution? And in how far will this affect the image ...
15
votes
1answer
1k views

why does black text have orange and blue pixels

Why is it that when you zoom in to some black text you find that it is made up of orange, slightly black and blue pixels like the picture below.
5
votes
1answer
1k views

What is stereo about multi-view stereo?

What 3D scene reconstruction methods does the term "multi-view stereo" encompass? Is it only used for methods that apply binocular stereo algorithms (taking 2 views as input) in a pairwise manner? Or ...
6
votes
0answers
162 views

Cannot use more than a couple of MB in a shader storage buffer

I am implementing a simple ray tracer with OpenGL. I have a shader storage buffer with all the triangles so I can test them for intersections in a compute shader. It works fine up to a certain buffer ...
7
votes
1answer
363 views

Explicit vs Automatic Attribute Binding

I'm a beginner in OpenGL and I've been doing some research on the topic of shaders and attributes. Most places I go say that explicit attribute binding (whether it be in the shader itself with ...
5
votes
1answer
212 views

Graphics Pipeline: Viewspace & Back face culling incorrectly

I'm attempting to model a simple graphics pipeline - using Matlab at the moment as a modelling tool to get the transformations correct. I appreciate there are software tools that would make this ...
6
votes
2answers
960 views

OpenGL with SFML, create an n-pointed star?

Completely stuck on how to do this. Yes, it is a homework problem, but its the first we've had in the class so not too familiar with graphics. Also, seeing as its homework, please don't just give the ...
14
votes
2answers
7k views

What is Tessellation in computer graphics

In recent games I have noticed something called Tessellation, Turning the thing ON destroys my frame rate. I have noticed that it when turned on it looks like Anti - Aliasing. Can someone give me ...
2
votes
0answers
131 views

Shadow Mapping Errors

I recently started to create a shadow mapping system in OpenTK. I ran into a problem: The depthtexture is always completly white -> no depth. Even if the color from the shader is changed (I know it ...
5
votes
1answer
180 views

Artefacts on top and bottom of utah teapot

I am implementing a simple Phong shader in OpenGL GLSL, and the test object is the utah teapot. However on the bottom I get a solid red circle, and on the top there is are sharp sectors that are ...
5
votes
1answer
96 views

Renderbuffer needs to be bound before glFramebufferRenderbuffer?

The documentation of glFramebufferRenderbuffer only says that renderbuffertarget needs to be ...
4
votes
3answers
1k views

OpenGL - Colours not working properly

I am using a single VBO to store vertices in the follow format: v1X, v1Y, v1Z, v1R, v1G, v1B, v2A, v2X, ... Vertex positioning is fine, shapes show up where expected, however instead of using the ...
5
votes
1answer
121 views

Where is the shown display image actually stored and accessed?

In a modern day desktop or mobile computer, you got the CPU, the RAM, the GPU and it's own video RAM. When a modern OS renderes an image to the screen, where is the actual image data for that screen ...
6
votes
1answer
98 views

implementing right handed coord system APIs on top of a left-handed rendering engine

I am trying to plug in a 3D game engine as the rendering engine for an existing graphic API system that uses a right-handed coordinate system. Game engines often uses a left handed coordinate system ...
3
votes
1answer
409 views

Why does my lighting look incorrect?

I have a problem with lighting calculations. I am rotating the camera around a cube which was supposed to be illuminated by the light but the resulting lighting is very weird. Check out the image ...

15 30 50 per page