Stack Exchange Network

Stack Exchange network consists of 175 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

Questions tagged [texture]

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

0
votes
1answer
45 views

Sphere Texture Mapping Algorithm

I am trying to generate UV coordinates automatically to map a texture on a sphere. The problem is with seams when going from 0.8 to 0.2 there is a discontinuity and interpolation in fragment shader ...
1
vote
0answers
38 views

Anti aliasing thin features in textures

Assume I have a texture with a repeating line pattern. The lines are exactly 2 texels wide (really thin). Ans very spaced out (50 texels in between each line). I am now struggling with the ...
2
votes
0answers
61 views

Trying to optimize texture mapping

We are developing a PPI plot for a radar system, similar to the following: NOTE: 1 radial is defined as a single slice of data within the circle, and 1 range gate is defined as a single point along a ...
1
vote
1answer
80 views

Are texture binds expensive?

I am trying to get a feel for how much effort I should put into this. I am building a basic 2D engine and for my use case there are only 8 textures. Each draw call in this engine currently requires ...
1
vote
1answer
59 views

OpenGL Unable to retrieve the values of data sent to shader using textures

I've been following these tutorials and i can't figure out how to send data to shaders using textures. https://en.wikibooks.org/wiki/OpenGL_Programming/Scientific_OpenGL_Tutorial_02 In this tutorial ...
1
vote
0answers
110 views

Why do perspective correction based texture mapping do depth division

I'm currently trying to understand how works perspective correction texture mapping. I saw that actually it works by interpolating the z value of the three point of the triangle which the current ...
1
vote
1answer
38 views

Make a texture a clickable Button

What would be the best way to make a texture a clickable button? Suppose I have a Room (respresented by a 2D texture), where there are buttons. Would I in the main loop: check when the mouse is ...
1
vote
1answer
92 views

Texturing an “infinite” plane

I am rendering an infinite plane as described in the following answers: https://stackoverflow.com/questions/12965161/rendering-infinitely-large-plane https://stackoverflow.com/questions/7380250/how-...
1
vote
1answer
40 views

Export Model Textures Per Face

(Note that as far as attempts go, I can't find anything that helps me) I have a 3D polygon, and for simplicity's sake it's going to be the one below: It is textured using the UV map below: Side ...
2
votes
1answer
151 views

How do I convert a hit on an infinite plane to UV coordinates for texturing in a Raytracer?

I am trying to convert a ray hit on an infinite plane, defined by an origin and a normal vector, into UV coordinates, so I can find the appropriate texel at that point. Code I have is close to ...
0
votes
2answers
52 views

Why is precalculating a distortion different from calculating it in the shader?

I have an application where I simulate a camera distortion. There are two ways to go about it: calculate the distortion per pixel in the shader or precalculate the distortion and store the distortion ...
1
vote
1answer
143 views

Is a single shader and 1x1 pixel white sampler more efficient than frequent switching between shaders with and without samplers?

I have some existing OpenGL code that I am porting to Vulkan. The question is somewhat relevant to both OpenGL and Vulkan. I am rendering some primitives using textures, some single channel, others ...
1
vote
1answer
47 views

In texture mapping, should we set texture coordinate to every vertex or can I skip vertices in between?

I am working on a texture mapping problem. I use vtk C++ library for my work. I have a very dense mesh with lots of vertices. I want to apply image texture to this mesh. Should I set texture ...
3
votes
2answers
126 views

Which graphics APIs texture formats are HDR texture formats?

I understand that HDR files are images encoded with a higher precision in order to keep more details. When loading such images in real-time rendering applications using common Graphics APIs (DirectX, ...
1
vote
2answers
103 views

WebGL - issues doing a simple texture downsample

I'm working on an image processing app which uses WebGL to apply shaders to a bunch of input photos. At one point in the algorithm, I need to create some image pyramids where I downscale the input ...
4
votes
1answer
95 views

How to apply wire texture for realistic rendering of embroidery?

I am building an algorithm which takes a bitmap image as input and render the image as an embroidery design. The different steps are : Vectorize the image, I keep only 5 colors (Done) Generate ...
1
vote
0answers
125 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
86 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
39 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
229 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
35 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)...
2
votes
0answers
45 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
51 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
36 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
49 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
242 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
26 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
143 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
11 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
354 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
75 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
169 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
136 views

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

The typical scenario for using a texture would simply be: ...
4
votes
1answer
85 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 ...
4
votes
2answers
178 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
527 views

Full screen quad texture coordinates mapping

I'm rendering a full screen quad using gl_VertexID as GL_TRIANGLE_STRIP ...
7
votes
0answers
172 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 ...
6
votes
1answer
113 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
2answers
977 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 ...
5
votes
1answer
254 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
109 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
234 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
59 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
320 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
85 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
46 views

glCompressedTextureSubImage3D Usage

When using an array texture I can call: ...
4
votes
1answer
179 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
143 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 ...