All Questions

2,635 questions
Filter by
Sorted by
Tagged with
93 views

What other paradigms exist besides vector/fragment/transform graphics programming?

I am familiar with the basic concepts of writing vector and fragment shaders while using linear transformation matrices to describe orientations in 3D space. But, what other paradigms exist (...
875 views

How much precision (half, float, double, etc) is enough for a Color class?

While doing some reading on how real-time applications handle color under OpneGL, I noticed that some examples implemented Color as a collection of 4 floats, while ...
365 views

How do CAD programs render non-polygonal 3D objects?

How CAD programs handle displaying B-Reps and NURBS/T-Splines in their viewports? Assuming viewport uses OpenGL API - are those programs transform every object into triangles and creating/deleting ...
530 views

ping pong between same framebuffer two color attachments

In order to optimize I'm trying to set up a setup which ping pong between same framebuffer two color attachments to apply some postprocess effects. It seems to work (effects are applied) but ...
276 views

Transformation Matrices

Consider the following problem and its answer: Given 3 points in 3D: $A=(A_x,A_y,A_z); B=(B_x,B_y,B_z) ; C=(C_x,C_y,C_z)$ Find the transformation matrix (in homogeneous coordinates) that ...
172 views

File format for swept profile with changing normal

I have to create a file describing a 3d surface with the following properties: a circular arc cross section is swept along a closed 2d curve spine defined with equations the normal direction of the ...
709 views

Can we use PhysX in WebGL?

I'm new to GL stuff (coming in via WebGL, with no direct OpenGL experience). Can we use PhysX with WebGL?
218 views

Meaning of the parameter in a line-plane intersection in the space

The scenery is the following: I have a polygon in the space, defined (the polygon) from your vertices. By 3 vertices of the polygon (non-aligned) revenue equation of the plane containing the polygon. ...
1k views

Is it better to blur the input or output of an edge detection shader for noise reduction?

To reduce noise of edge detection the norm seems like it is to apply a blur. However, is it generally better to apply the blur to the input of the edge detection. The input in my case being the depth ...
93 views

Calculating inverse disparity of a stereo image

I have code, which for the sake of argument, looks like the code here: ...
77 views

Expressing a reflected ray at a point as a function of the incoming ray and the normal to the surface at that point

Said L the incoming ray (at a point $P$). $R$ is the reflected ray. $N$ is the normal to the surface at the point $P$. $\alpha$ is the angle between $N$ and $L$ (and $N$ and $R$ also). It is assumed ...
109 views

What are the fConstX in Spherical Harmonics?

At page (slide in reality) 12/20 of this tutorial it is shown a function used to project lights into SH coefficients, however the value of those coefficients is not given, what are their values and ...
94 views

In a polygonal mesh 3d model which consist of triangles is it possible to separate different objects?

I have a 3d city model that is a collada file which consist of many triangles. When I select the model in a 3d software all buildings are selected. But I want every building to be selectable ...
103 views

Can I Implement Clustered Lighting with WebGL?

Do current WebGL capabilities allow to use Clustered Lighting? If not what is it missing to allow that? Basically WebGL uses GLES 2, so is that possible with GLES 2? I want to implement this one: ...
832 views

GLSL - Merge two textures

I would like to display arbitrary 3d meshes with black edges (black outline, black ridges, etc.). Thereby I have created two different textures: One color texture and one anti-aliased edge texture. ...
619 views

Ray tracing scene with 2 lights and sphere

I'm writing my implementation of ray tracer and I've got result which you can see at this image. So you can see that some dark parts are overlapping. And I have them even in the part where it should ...
197 views

Can I use the same vertices to render multiple things?

I'm passing my vertex shader a bunch of vertices and color data. I would like to first render the triangles and then render a point at each vertex. The triangles render fine, but I can't think of a ...
2k views

Controlling reflection and refraction with material properties in ray tracing

As tutors for this year’s programming languages course during our Computer Science studies we’re preparing for the students final project which is the implementation of a ray tracer. We’re ...
50 views

How do you sample an analogue image and store it in a true-colour frame buffer? [closed]

I really cannot get my head around on this issue - how does an analogue image is sampled and then stored in a ture-colour frame buffer (e.g. in a camera) and how do you prevent noise when you do so? ...
356 views

mapping 3d texture on view frustum (or part of it)

I'm implementing volumetric fog in my OpenGL renderer. First I inject color into 3D texture using compute shader, atomic operations and shadow map visibility check. The information I use to compute ...
622 views

draw a chord in three.js as in d3.js

I'm starting to learn three.js and want to create a chord diagram as possible in d3.js, but from ground up. I've created a scene and have circle segments on xz axes. But I got stuck on the chords. I ...
51 views

Removing a darkened caption with text on it in an image

Alright so I'm a complete n00b at image processing so forgive me if my question sounds vague. I'll try to supplement it with what I have learnt until now and also a couple of images. See the caption ...
55 views

What is required to limit the amount of draw calls in Unity?

I would like to limit the amount draw calls to approximate performance. Is there a nominal amount to aim for when working with high performance gaming? From my understanding to render an object that ...
1k views

Dark stripes on surfaces in V-Ray when rendering to texture (baking)

I am working in 3DS Max with V-Ray 3.4. I have recently been encountering strange artifacts on baked textures. Surfaces that should be flat smooth objects render with dark stripes or other unusual ...
2k views

Why use a tent filter in path tracing?

The 99 lines of C path tracer Smallpt renders a 2x2 subpixel grid for each pixel it intends to render and then does a tent filter to combine them. There is an interesting presentation explaining the ...
672 views

Why random monte carlo sampling instead of uniform sampling?

Why is it that it's so common to use monte carlo randomized sample locations, instead of uniform sampling? I'm assuming that taking randomized samples gives some benefit but I don't know what they ...
192 views

Changing colors after raytracing

Intro Maxwell Render has a feature called multilight, where one can ray-trace a scene with multiple light sources, and change the brightness of the individual light sources afterwards. Luxrender has ...
441 views

How to use Shaders with vertex & index buffers?

I'm trying to render a randomly generated terrain with vertex buffers and OpenGL. I want to use a shader to color the terrain, but it seemms like my shader isn't used. I have used shaders before when ...
109 views

How do I simulate a starfield?

I am trying to write a spaceship simulator. One problem I've hit into is how to best simulate the background of space with its stars. I don't need it to be faithful to the real thing with ...
160 views

Are vertices reprocessed per-poly for indexed meshes?

I've been digging a bit into what actually happens at a hardware level on the GPU, and found NVidia's Life of a triangle which explains the pipeline pretty well, at least for green boxes. One thing I ...
152 views

How to store > 256 transparency values in textures?

I am making an engine with 2D volumetric transparent objects and need advice how to store transparency data. There are 3 requirements: - The transparency textures need to be easily editable with ...
160 views

Checking the correct offset direction for Bezier curve offset

I am implementing Bezier curve offset. My approach is simple: Given the handles, calculate the vectors normal to them Move the handle along the normal vector. If the new curve intersects the old one,...
2k views

Why shouldn't Bump, Normal and Displacement maps be gamma corrected?

So I'm trying to wrap my head around this from a fairly technical point of view. When you add a Bump or Normal or Displacement map in your shader they should not be gamma corrected. But diffuse ...
325 views

Ray casting in fan configuration produces point cloud with curvature, how to eliminate curvature?

I'm attempting to perform an intersection test using ray casting (not sure if correct term so please forgive me if not) and am outputting the intersections as a point cloud, and the point cloud shows ...
87 views

DLT algorithm (4+ points) not working, what's missing?

I'm doing a direct implementation of DLT algorithm but I can't figure out why, at the end the matrix H I get doesn't (even remotely) produce x2 = H*x1 The algorithm is not that complicated so I can't ...
388 views

How to create specular surface in Mitsuba Renderer

I am a newbie in computer graphics and I am trying to develop a special case of path tracing really slowly! But first: I came up studying the Mitsuba renderer and one of its uses in the so-called GDPT ...
684 views

What is the definition of “motion to photon” in VR?

The rough definition of "MTP" is clear. But the exact one is not. You can refer to these links: What is Motion-To-Photon Latency? | chioka.in Motion-to-photon latency | xinreality.com/wiki. But from ...
229 views

What does these FXAA settings do?

I been looking for a way to do anti-aliasing with deferred rendering with WebGL as my target platform. WebGL does not support multisampled FBOs. I found FXAA implmentations such as this https://github....
303 views

Efficiently rendering sprites

In order to naïvely render sprites, you can send single rectangles with their position, rotation, size, and texture. This is very easy, but given that reducing state changes, draw calls, and data ...
127 views

Will the gaussian kernels in this fragment shader be computed for every fragment?

I am running this fragment shader on every pixel on screen. I am trying to make it as efficient as possible. BTW I am running open gl es 2.0. The code segment below is only a sample from the code, ...
242 views

How to sample 3D points to visualize a B-spline surface?

Given that I have implemented a function called calc_bspline_surf() in C, and that function has the following declaration: ...
66 views

Texture Parts Terminology

I'm generalizing my texturing code, and have become confused by the frankly contradictory information about textures' pieces. Specifically, I'm looking to understand what exactly the terms "face", "...
50 views

detect blurred zones after conversion to black & white

I'm working on a document storage project and i found a problem. After converting/compressing a scanned document to black & white sometimes, some areas of the document are unreadable because ...
61 views

Alias|Wavefront .mtl File “decal” Command

There are material color and texture colors (e.g. Kd 0.8 0.8 0.8 vs. map_Kd diff.png). The documentation says of this: ...
295 views

Sharing calculation result between shader programs in OpenGL

Question Is there a way to compute something in a first shader program (eg. screen-space coordinates from word-space ones) and access those results in an another shader program? Possible solutions ...
269 views

Find closest point on surface interpolated by 2d matrix of points

I have rectangular matrix of 3d points sampled from a parametric surface. In my program this matrix provides base points for bilinear interpolation of surface (In any (u,v) point it returns 3d point ...
406 views

Distributed parallel rendering in Gaming or VR rendering

VR rendering needs a lot of GPU power. VR SLI can help that. But, is it possible for us to use distributed parallel rendering technology to improve the performance dramatically? There is an open ...
1k views

Sobel edge detection line thickness

My goal is to implement an edge detection algorithmus that is capable to find edges of arbitrary 3d meshes. I want to find the edges by detecting normal discontinuities. Furthermore, I want the edges ...