All Questions

Filter by
Sorted by
Tagged with
4
votes
1answer
3k views

Why is my fragment shader not showing any colors?

I am basically following this tutorial about diffuse lighting in OpenGL. I did some modifications but the idea is the same, at least that's what I think. However, my fragment shader is not showing any ...
6
votes
2answers
856 views

Converting cartesian pixels to polar pixels

(I've largely revamped this entire question, though the motivation remains the same.) revised question I want to convert a raster of cartesian pixels into polar pixels. Is there a sensible ...
3
votes
1answer
367 views

Incorrect values written in stencil buffer

I am trying to pick objects on mouse click. For this I have followed this tutorial, and tried to use the stencil buffer for this purpose. Inside "game" loop I am trying to draw 10 (5 pairs) 'pick'...
9
votes
2answers
2k views

What is bilateral upsampling?

I've worked with various interpolation algorithms including linear, cubic (and bilinear and bicubic), other bezier (and nurbs, etc) based interpolations, lagrange interpolation and some others, but I ...
4
votes
1answer
573 views

Solving a set of Geometry Constraints - What's that Method called?

I am looking for the correct term for a type of problem solver. Since its hard to google for something without knowing its name, I hope that the good people of this stackexchange may be able to help ...
1
vote
1answer
58 views

Reconstruction filter of LCD monitor

I'm very confused about sampling and reconstruction of images. I read that in the framebuffer there is a sampled representation of an image, for visualization the sampled representation is converted ...
9
votes
1answer
11k views

OpenGL GLSL - Sobel Edge Detection Filter

With respect to this topic I've successfully implemented the Sobel Edge Detection filter in GLSL. Here is the fragment shader code of the filter: ...
4
votes
1answer
189 views

How fast should I expect to render the silhouette of a 20k triangle model?

Using VTK 7.0 I have found that rendering a 20k triangle STL model takes approximately 17ms on my Nvidia GTX970. However, I am only interested in the silhouette of this model (like the image below) ...
5
votes
2answers
479 views

How to check which API's are available on a given machine?

I'm building an engine, which has Vulkan for its primary rendering engine. But to have at least some backwards compatibility with devices that don't have drivers for it (mainly mobile) I want to ...
4
votes
3answers
402 views

OpenGL Vertex - Texture Mapping

I have a mesh loaded by an obj file (wavefront), complete with normals and texture coordinates per face, and its relative texture available. In my C++ / OpenGL code (assignment for a computer graphics ...
4
votes
1answer
1k views

How to use 32 bit Integers for Element Indices in WebGL 1.0?

WebGL 1.0 specification does not allow to create 32-bit index buffers. Now I'm in trouble, I'm trying to render huge objects with 100 thousands to 1 million indices. In OpenGL this is no issue at all, ...
3
votes
1answer
122 views

Fastest shader compilation strategy on windows dx9 and dx11?

To compile shaders, I currently spin up a thread per core where each thread pulls a shader from a list and calls D3DX11CompileFromFile for dx11 and D3DXCompileShaderFromFile for dx9. I've heard it ...
2
votes
0answers
106 views

SIFT Feature Extraction

I am trying to implement the SIFT feature extraction algorithm. I have a few questions which are not very clear from the paper: When interpolating the extrema with 2nd order functions, do we upscale ...
4
votes
2answers
1k views

How does a GPU process a task by using multiple ALUs?

I know the philosophy of how a GPU works {many weak men doing a task (GPU) compared to one strong man doing the same task (CPU)}. How does the GPU manage all the ALUs and schedule the necessary ...
7
votes
1answer
138 views

The generations of Intel's integrated graphics

Which among Intel's integrated GPUs depart from their predecessors in a major way? Which are merely incremental improvements? BACKGROUND Intel integrates GPUs with many of the processors they sell. ...
10
votes
2answers
430 views

Total emitted power of diffuse area light

I am reading the book Physically Based Rendering (Pharr, Humphreys). In the chapter on lights, they talk about approximating the total emitted power of different kinds of lights. For example, a point ...
11
votes
1answer
750 views

Why do adjacent triangles never overlap when rasterized?

Apologies for the following noob question, it's just I can't find a satisfactory answer anywhere... When I render a simple axis-aligned quad made up of two triangles, I don't understand why there's ...
2
votes
2answers
2k views

How to encode/decode buffer data in glTF?

I'm playing around with base64 embedded data URI's and tried to analyze the buffer data of the gltf box sample model, as defined in this example here (line 76). ...
3
votes
2answers
101 views

How to texturize a 3D model from video?

I have a base 3D mesh of an object that I want to texturize. I also have a 360 degrees video of the real-world object. What are good ways to use the video to texturize the mesh? Are there existing ...
6
votes
1answer
461 views

Perspective correct interpolation of normal values

I'm currently writing a software rasterizer and I'm at the point where I can draw arbitrary triangles with vertex colors and perspective correct texture mapping. I do point and directional lighting by ...
4
votes
2answers
161 views

Move position in smooth gradient

I am decrementing/incrementing position x until it reaches y. However, this creates a rectangular-like path. I want position x to smoothly curve towards y (diagonally) on a 2D plane. What kind of ...
14
votes
1answer
1k views

benefit of perlin noise over value noise

While investigating the inner workings of perlin noise, I wondered why one would use perlin noise instead of simple value noise. As far as I understand it right, the following applies: Perlin noise ...
6
votes
1answer
518 views

Open GL Shader Storage Buffer Objects to replace Vertex Attributes

At first: I already posted this on the stackoverflow community. I'm new and didn't know about this community here. I apologize. I basically got the same question as the guy who asked here: https://...
4
votes
1answer
703 views

Compute shaders: one-time-only versus persistent buffers

When using a Compute Shader, is it possible to keep a buffer in the GPU memory during the whole run-time duration of the application, so whenever the original Compute Shader or other Compute Shaders ...
4
votes
1answer
126 views

Components that can be used for 3d shadow analysis, sunhours of surfaces throughout the year in a 3d model?

I want to develop a component for 3d shadow analysis of 3d city model. I decided to use ray tracing for this purpose. For every time step (for sun's dynamic position during the year) rays will be sent ...
4
votes
2answers
175 views

Implement own Bend function

I'm trying to write a mesh deformer that bends a Cube around an axis like this: The bend degree in figure A is 90 and something like 35 in B. So if I know my desired bend degree how can I get alpha? ...
1
vote
1answer
455 views

Texture rendering in OpenGL

I know there are tons of questions about it, but I found nothing useful so far so, here I am. I'm trying to render a texture which is attached to a wavefront .obj mesh. I continued to fail (somehow, ...
1
vote
1answer
83 views

How to convert image results into data?

I have made an 3d solar exposure analysis for a 3d city model that determines how long a surface receive direct sunlight throughout the year. Results are coloured surfaces and legend of coloures that ...
1
vote
1answer
50 views

How would I create a virtual cabling system?

I am trying to devise a GUI system that functions as a virtual patchbay, as seen in something like Logic Studio's environment editor, or seen in virtual synthesizers that use virtual patchcables. I'm ...
4
votes
2answers
6k views

What are the differences between GPU instancing and standard instancing?

I have been reading a lot of debate on a new feature that will be available in the new version of the game engine Unity 5.4 - called GPU instancing. I understand the importance of instancing in ...
2
votes
1answer
407 views

scan line algorithm is too slow?

This is my code of the algorithm for making triangles :- ...
8
votes
1answer
1k views

Why does checkerboard pattern on a computer screen appear with a yellowish tint?

This question was originally asked on Physics, then moved to Cognitive Sciences. Consider the following image: You might want to display the image in a new page, in case it gets resized for mobile ...
55
votes
10answers
32k views

Should new graphics programmers be learning Vulkan instead of OpenGL?

From the wiki: "the Vulkan API was initially referred to as the 'next generation OpenGL initiative' by Khrono", and that it is "a grounds-up redesign effort to unify OpenGL and OpenGL ES into one ...
3
votes
1answer
314 views

Chromakey Conversion

I have a program I wrote that allows chromakey (green screen) using a web cam. I wrote it using DirectShow - I created a custom filter to blend the web cam video with a graphic. It works fine but ...
3
votes
1answer
535 views

Object rotating around origin instead of object center?

I am implementing simple rotation but the object is not rotating around the local center instead it is rotating around world origin. This is the code: ...
4
votes
0answers
234 views

View Reference Coordinate System

For a 3D scene in the World Coordinates, its View Reference Point is at c=(0,3,4), and a viewer is looking towards its origin O (0,0,0). Construct a transform matrix which will map World Coordinate ...
2
votes
0answers
209 views

How to project a view frustum in an orthographic cuboid?

I know that OpenGL uses a projection matrix to project the view frustum directly into the canoical volume [-1, 1]^3. But how would I project the frustum into an orthographic cuboid, which would then ...
9
votes
1answer
1k views

Full Monte-Carlo Volumetric Scattering

I would like to add full monte-carlo volumetric scattering to my path tracer, but I'm having a hard time researching how to do it. Let me explain what I would like to do: A ray enters a material, and ...
13
votes
4answers
418 views

What physical properties are “lacking” to keep this 3D scene from looking like a real photograph?

So I know that I'm basically asking to identify the main problem to be solved in creating realistic 3d Graphics, but as someone without much technical experience in the field, I'm curious that if ...
1
vote
1answer
108 views

“Anchor” vehicle to 3D path with OpenGL / SDL

As a CG assignment with OpenGL and SDL, I want to create a clone of the videogame WipeOut instead of the classical car racing game. Examples of motion in 2D have been given and are rather simple to ...
4
votes
0answers
460 views

OpenGL ES vertex/fragment shaders - Blinn phong

I'm developing a simple educational project to study OpenGL ES. I'm try to render some simple OBJ models using Blinn-Phong. The first version of the of my implementation calculate all the lighting ...
1
vote
1answer
364 views

Why does substracting -1 in shader fail for a float data type?

I am loading a texture in a WebGL fragment shader (GLSL version 1.00). This is my working code: ...
4
votes
1answer
438 views

Understanding view matrix

I've been reading several sources in the web about transforming world-space points into camera-space ones. I am building my view-matrix from the following parameters ...
3
votes
1answer
169 views

GPU short circuit when multiply by 0?

So I am trying to make my shader efficient by lowing the amount of texture lookups. If I had a line of code with something like. ...
1
vote
1answer
41 views

Fading an object in add mode with correct color math

I have a scene rendered entirely with objects with additive blend mode. I have a value that is oscillating from 0, to 1. When it is 1 the object is supposed to be invisible, 0 should be entirely ...
5
votes
2answers
256 views

In a shader, how to store fragment coordinates in a spatial partitioning from one pass to the next?

I have a post-effect camera-shader in which I want to implement a simple spatial partitioning of the screen between two passes of the fragment shader. The first pass should divide the screen into ...
4
votes
1answer
1k views

Is there a way to interpolate color across the line with only integer calculation ?`

Here is my function that does interpolation ...
3
votes
1answer
106 views

Hlsl - registers type

Is there any difference between registers types in hlsl? For example when using register t0 for UAV will it be somehow precache ...
1
vote
0answers
47 views

distribute the bounding area into grid space

I have a bounding area of a contour after the slicing operation. Now to generate the tool-path over the contour, I need to distribute the bounding area into grid space so that each each cell maintain ...
2
votes
1answer
166 views

Midpoint algorithm

I am going through one of the most basic line drawing algorithms and stuck with the following mathematical explanations. The implicit function of line equation is: ...

15 30 50 per page