Hot answers tagged

4

Based on the article, it seems like, when it adds "directional lighting information", the program tries to infer a location of a light source and base the normals on the colors with the added information of the directional lighting from the pixel to the inferred light source. I feel like I'm making no sense right now, so here's an example using ...


4

Red is the gray scale channel (black/white). To generate a gray scale image copy the Red channel to the Green and Blue channels, set alpha to one and a gray scale image will result. Of course that single channel can be used for many other purposes besides just gray scale image data. It can represent noise, a lookup table (LUT). The list is long and mighty.


2

It sounds like you are experiencing a loss of texture cache hit rate on your 3D texture. As with any modern processor, GPUs have a cache hierarchy. Texture units typically read from a local L1 cache, then a global L2 cache, then from DRAM. With a texture, each cache line will typically contain several adjacent texels. So, when you sample a texture at a ...


2

This is to long for a comment so I put it as an answer (but it is really more of a long comment) Deriving formula for perspective correct texture interpolation : solving for texture coordinate interpolation is the same as solving for any arbitrary attribute interpolation. So you could also title this: Deriving formula for perspective correct interpolation ...


2

Well, there is no 1:1 correspondence the pixel might be in many locations at once. What your asking is relatively easy. Just iterate through each triangle (f). Then get the texture coordinate of each triangle corner (second index in f tells you which vt to look up ). The texture coordinates are in fractions of image so 0.5 0.5 is in middle of image. You need ...


1

You are on the right track with your post... Compute two slopes then somehow use those slopes to find a normal. The slopes are the result of finite difference (like central difference) But why two slopes? Because we can use them to construct two independent vectors whose cross product will become our normal vector. One vector is in the texture's $u$ ...


1

I have rewritten my answer to make it easier to follow and I also fixed some mistakes. Let $S:[0,1]^2 \rightarrow \mathbb{R}^3$ be some parameterization of your surface (assume that the derivatives do not become zero anywhere, i.e. it's regular/an immersion). That is, the set of points of your surface is $\mathcal{M} = \{S(\beta, \gamma) \,:\, (\beta, \gamma)...


1

Binding the image is unrelated to its orientation. A shot in the dark is that your texture coordinates are either reversed or computed with the orientation in the wrong direction. You could just rotate the image as a work around. The main issue here is whether the upper left corner is your origin, or the lower left corner is the origin. But neither of these ...


1

For each visible voxel side you need to iterate over all triangles and find if ray from voxel side normal intersects that particular triangle. Having intersection point you can then calculate barycentric coordinates of this point within intersected triangle. And with barycentric coordinates you can calculate UV of intersection point and therefore sample ...


Only top voted, non community-wiki answers of a minimum length are eligible