Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

For questions related to textures: procedural generation, encodings, aspect characterisation, filtering, mapping, storage...

1
vote
0answers
39 views

Generating Mip Maps For A Cube Map

Let's say I have a cube map that has a resolution of 256x256 for each face and I want to generate mip maps for it using a box filter. It's tempting to just mip each face individually, cutting the ...
1
vote
1answer
75 views

Issue with loading a texture on the GPU with OpenGL 4.1 Core profile

I’ve been trying to render a texture on the whole screen in OpenGL 4.1 using the Core profile and followed a few tutorials on the matter, but all I have so far is a blank screen. I tried using my ...
0
votes
0answers
25 views

Problem with imageStore to 3D texture on old AMD card

I've been updating an old project that does Marching Cubes using compute shaders, and it fails on my laptop with an old AMD GPU (7670M). After investigating a bit, I found the problem is with writing ...
0
votes
0answers
57 views

OpenGL - Fit High/Low Resolution Image/Texture to a particular size Window

Consider a ray tracer written in OpenGL and using GLFW as a window toolkit. There are basically 2 options to display the ray-traced image. 1) Create a RenderBuffer ...
0
votes
1answer
19 views

Texture units parameters in OpenGL

I am writing a procedural terrain renderer for OpenGL. To shade the terrain I use multitexturing, that is 4 material textures and a blend map which distributes them across the terrain (encoded in RGBA)...
1
vote
0answers
30 views

Cem Yuksel's “Mesh colors” implementation/demo?

Are you aware of any sample implementation or demo application of Cem Yuksel's "Mesh Colors" or "Mesh Color Textures" (http://www.cemyuksel.com/research/meshcolors/) ? The author does not provide any ...
1
vote
1answer
47 views

Can you avoid querying for a texture location in OpenGL?

The way I learnt to send a texture to a shader is more or less ...
1
vote
0answers
33 views

Handling varying texture sizes in an array texture

Say we've idetified that we have a varying number of textures that are upper capped by 2 parametrs. thus we allocate the maximum amount of memory needed to store all textures as follows: ...
1
vote
2answers
42 views

How to assign a texture to a single entry of a texture array?

The C++ psuedo code to transmit the idea of what I want to do would be: Texture_array tarr = Texture_array(6); tarr[0] = texture; Which I am attempting to do as ...
1
vote
1answer
44 views

How do you load multiple textures into an array texture with OpenGL?

I have been reading the OpenGL documentation but it is not clear to me how to achieve the following. Say we have an array of strings. Each string in the array is a valid relative path to an image ...
1
vote
0answers
23 views

Proper design of data structure to store wavefront file information?

Currently I have a naive Mesh data structure to store wavefront files. This data has 3 buffers for the vertices, normals and UVs. It works well to the point I can render the sponza scene, despite ...
2
votes
0answers
52 views

MipMaps for Signed Distance Field

Is there some algorithm that keeps details when creating mipMaps for SDF? For example group of 4 pixels when only one is above threshold will lose this pixel with bilinear and creating mipMaps with '...
0
votes
0answers
64 views

Texture coordinates for cone

I am new to OpenGL so forgive me for the basic questions. I am trying to draw a cone with texture coordinates and surface normals. The surface normals seems to be working fine for the lighting part ...
0
votes
0answers
8 views

Where on the .obj or .mtl files is the information needed to find the texture associated with a wavefront file?

I've downloaded the sponza scene, and I will use it to develop multi object rendeirng on my engine. I can load the mesh just fine. But the mesh is currently monochromatic (looks 3D thanks to blinn ...
0
votes
1answer
71 views

How to assign/calculate triangle texture coordinates

Below is a triangle with its vertices and uv coordinates. These are read from the input model file. I don't understand why the texture comes in different orientation than the image. here is the ...
0
votes
0answers
45 views

How does patch match algorithm work?

I'm reading through a paper for texture synthesis. In such paper the "Patch Match" algorithm is mentioned. I'm reading the original paper, and as far as I've understood the goal is to find a NNF (...
3
votes
4answers
129 views

How to access several textures from huge amount of textures in a shader?

I'm developing a light probe based GI solution and currently dealing with light leaks due to interpolation between probes located on opposite sides of the walls. I want to tackle the problem by ...
0
votes
1answer
92 views

What is the typical use case for rendering to an image through imageStore?

The typical scenario for using a texture would simply be: ...
0
votes
0answers
114 views

glGenerateMipmap does not generate mips for texture with a particular image

I load materials for my models using stbi library and upload pixels to textures through glTexImage2D function. Immediately after ...
3
votes
1answer
57 views

If I have more than enough memory, can it still be beneficial to use compressed textures?

I'm wondering whether some of you would have tested and seen quite a difference in using a compressed texture even when the OpenGL environment does not need saving any memory (i.e. the card has more ...
3
votes
1answer
83 views

Texture prefiltering for Linearly Transformed Cosines

I'm implementing Real-Time Polygonal-Light Shading with Linearly Transformed Cosines from Siggraph 2016. I'm stuck on the texture prefiltering (section 5.3). As I understand they use ...
2
votes
2answers
194 views

Full screen quad texture coordinates mapping

I'm rendering a full screen quad using gl_VertexID as GL_TRIANGLE_STRIP ...
7
votes
0answers
154 views

Supersampling HDR

I'm encountering some issues supersampling in HDR for an SDR result and was curious what the usual method for doing this is. Notice how pixelated the edge of the white sphere is. Here's how I render ...
2
votes
0answers
58 views

What does different tangent basis mean for a normal map

What does it mean that a normal map was computed with a different tangent basis and is the reason why the normal map does not render correctly. I used the following code (very generic) for my ...
6
votes
1answer
76 views

Jagged texture's edge on perfectly straight UV of sphere mesh

I unwrap UV from sphere mesh to grid and put texture to align with UV grid too. When white and black border of texture fall between UV columns, I get jagged edge like in the picture. This only happens ...
3
votes
1answer
274 views

MTLTexture getBytes returning blank image

Inside of my application I am trying to convert a MTLTexture into a CGImage or CIimage for use in other parts of the app. I am having a difficult time doing so because none of the example code I find ...
4
votes
1answer
172 views

Kaiser windowed sinc filter for mip mapping

These older but informative article talks about how a Kaiser windowed sinc filter is a good way to generate mips. The Inner Product - Mipmapping - Part 1 | Jonathan Blow The Inner Product - ...
2
votes
0answers
74 views

Triplanar UV unwrapping - overlapping triangles

For some time I have been working on UV unwrapper for radiosity computation. The information online about it is very sparse, except how to do it in some high end software. So far I have used triplanar ...
1
vote
1answer
127 views

How to scale and offset a cubemap using sphere mapping

I am trying to scale and repeat a Cubemap with Latitude-Longitude mapping layout just as you would do with classical UV mapping but without any interesting result. This should be used as a skybox. ...
1
vote
0answers
54 views

How to automatically project texture from high poly mesh to low poly mesh?

I have two aligned meshes: I have exact mapping from each vertex of low poly mesh to surface of a high poly mesh. High poly (~100K vertices) mesh is non-manifold, low poly (~1K vertices) is manifold ...
3
votes
1answer
215 views

Combine material coefficients and textures in Phong Shading

I'm trying to implement a simple Phong shader that supports non-physically-based materials and textures. Even though the material has a texture for each light component I still want the respective ...
3
votes
2answers
71 views

Projective texturing from many images

Problem: I'm trying to dynamically texture a mesh of the real world generated by the Hololens over time using photos also captured from the Hololens, perhaps one photo per second. Each of the photos ...
3
votes
1answer
36 views

glCompressedTextureSubImage3D Usage

When using an array texture I can call: ...
4
votes
1answer
92 views

OpenGL: Why glTextureSubImage2D crashes?

I'm trying to create single-channel (no mipmaps) texture initialized with my custom pixel data, but it crashes on glTextureSubImage2D. Any idea why? ...
4
votes
1answer
82 views

Any way to fake textureLod on GLES2?

I've been having nightmares at work this week trying to get Unity's Standard shader, and my own custom car paint shader modded from it, to look good on Android. The most obvious problem was ...
3
votes
1answer
54 views

If the OS uses a frame-buffer with potentially different textures being displayed each frame why dont we?

At least on iOS every frame you are likely to get a completely new texture that you need to draw to due to the OS switching between a couple textures each frame. My question is essentially if the OS ...
3
votes
1answer
67 views

How do I replace a mesh's texture with vertex colours?

I have a textured 3D mesh. I want to deduce a 3D mesh without texture, but with an RGB vector color on each node of this 3D mesh. The colors have to be picked from the initial texture. Is there a way ...
1
vote
0answers
254 views

YUV (NV12) Chroma subsampling while converting from RGB image

I convert RGB input to YUV 420 semi-planar output using compute shader.Luma plane is straightforward as it maps 1:1 with RGB dimensions. As we know, NV12 packs Cb and Cr into one plane, which means ...
3
votes
1answer
66 views

Video-games; Rendering textures on scope zoom-in. Texture compression problem?

This is general question. In the multitude of video-games that are not specialized in scoped warfare (like Sniper Elite), I've noticed that when you zoom in with a scope, the textures and normal maps ...
1
vote
0answers
100 views

Composition of an .obj file

Using an iPhone X, I can get a mesh of the face (using ARFaceGeometry), which I can output as an .obj file using ...
6
votes
1answer
185 views

Ray tracing - partial derivatives for texture lookup

I'm doing some ray tracing on GPU using a fragment shader... How can I calculate texture coordinates partial derivatives with respect to screen coordinates so I could perform filtered texture lookup ...
1
vote
1answer
55 views

Is there any free software to visualize a texture mapped to a sphere? [closed]

I am trying to study the texture deformations caused when mapping a rectangle to a sphere, if I had a software that took an image as an input and displayed how it looks like when texture mapped to a ...
5
votes
2answers
78 views

Are textures automatically Morton-coded when loaded to VRAM?

I know that texture caching on GPU works to optimize locality in 2D (or 3D if using 3D textures). I believe this is done using space-filling curves like Morton or Hilbert curves. When passing an ...
5
votes
1answer
210 views

The mathematics of two dimensional interpolation on a quad

I am trying to wrap my head around how exactly the GPU interpolates texture coords on a quad. I realize to the GPU a quad is two triangles but I find thinking in terms of the whole quad to be easiest. ...
4
votes
1answer
413 views

How to dynamically calculate texture coordinates in a vertex shader with OpenGL?

I modified my code, and tried to pass a set of integers specifying the face of a cube (top, bottom left...) to the vertex shader in order to draw multiple instances of a cube face. I did this by ...
4
votes
2answers
288 views

Making low discrepancy sequence noise textures, not LDS sample positions

When making sampling locations, there is a lot of information out there on how to do white noise sampling, uniform sampling, uniform+jittered sampling, low discrepancy sequence sampling (eg halton) ...
2
votes
0answers
53 views

Algorithm for 3D mesh model segmentation to chart

I'm trying to implement a segmentation model which will divide a 3d mesh model into charts. But I'm having really hard time to find resources in the web. The papers and some other places these ...
1
vote
1answer
107 views

How do you scale an image across planes while retaining perfect tiling?

Scaling up or down a texture is quite simple, modify the UVs. In my particular scenario though, I have multiple "quads" (it is a patch tessellation shader) each with a tiling texture. Does anyone ...
11
votes
1answer
958 views

How are mipmap levels computed in Metal?

My question is specifically in regards to Metal, since I don't know if the answer would change for another API. What I believe I understand so far is this: A mipmapped texture has precomputed "...
1
vote
1answer
321 views

OpenGL: Rendering 2D shadows

I've been working on a 2d shadow system for a school project, using this method to generate visibility polygons. However, I'm having issues figuring out how to draw those visibility polygons in a way ...