Questions tagged [texture]
For questions related to textures: procedural generation, encodings, aspect characterisation, filtering, mapping, storage...
237
questions
1
vote
1
answer
142
views
Which coding strategies exist to handle opengl texture size limit?
I recently hit the roof for maximum texture size for my opengl implementation (GL_MAX_TEXTURE_SIZE contains $3379$) when I wanted to create a texture for a 4k resolution video frame ($3840 \times 2160$...
0
votes
1
answer
28
views
How to properly create textures using DSA for ImageTexture in OpenGL
For the old approach, generating a texture for the ImageTexture for compute shaders would look like this:
...
0
votes
0
answers
25
views
Why is my texture stretched from 1 row of pixels? Metal/Swift
I have the following code below, and it generates the following render. I am using a texture test image, and it looks like its just taking the bottom row of pixels of that image and repeating then. It ...
-1
votes
1
answer
126
views
How do I view my vertex colors that I specified through the texture I've applied on my objec [OpenGL]?
I thought that if I used an image with a transparent background, I would still be able to see the colors I had specified in my vertex attribute buffer.
...
0
votes
1
answer
398
views
Unity: Pass texture pointer from OpenGL to Unity
I'm working on a scene in Unity where I have textures loaded at runtime. As a result of that, the scene is being slowed down (even with co-routines), so I thought maybe I could move the texture ...
2
votes
2
answers
137
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 ...
1
vote
1
answer
44
views
GLSL trying to bind two different layers from the same texture array as images. Should it work and if so what am I doing wrong?
I am new at this particular site in the SE ecosystem, but not to computer graphics in general. If I'm in the wrong spot feel free to redirect me.
My question regards glsl programming and binding two ...
11
votes
1
answer
331
views
Choosing width of data for signed distance field texture
A signed distance field texture is a technique where you store the distance from a pixel to the surface of a shape within the color information for that pixel, allowing almost vector graphics quality ...
1
vote
1
answer
334
views
PNG textures render correctly in Blender, but not in OpenGL program
I've been following the OpenGL tutorials from ThinMatrix and I've been able to load and render his stall.obj model along with his stall.png texture just fine. But when I try with my own models and ...
0
votes
1
answer
98
views
Why are my OpenGL mipmaps and MSAA bad?
Questions:
Why does the wavy white line on the tennis ball texture seem to be at the wrong mip level, with blocky artifacts ? For example, at 'A' in the picture.
The basketball and football textures ...
16
votes
2
answers
4k
views
How does hardware texture compression work?
That it compresses the data compared to the pixel array is obvious.
But what makes it different from from normal compression (like png, jpeg)?
2
votes
1
answer
31
views
Opengl Texture top row pixels are garbage
This code displays a white texture always except when the dimensions are 383 x 512
...
0
votes
1
answer
108
views
combinatoric explosion of sampler2D, sampler2DArray, samplerCube
I use uber-shader approach and am having issues fitting within 16 texture units.
My material uses 3 textures: albedo, special, and normal map.
However, any of these textures can be regular 2D, or 2D ...
3
votes
1
answer
64
views
Is Relief Mapping techniques being used these days?
I've been researching for some time now the Relief Texture Mapping (https://www.inf.ufrgs.br/~oliveira/RTM.html), and I'm trying to identify implementations of this technique and its improvements in ...
1
vote
0
answers
31
views
Is there a name for the values of a material at a point?
As I understand it, the usual concept of a “material” in computer graphics, particularly 3D modeling, is a set of parameters (for example, color, specular reflectivity, IOR, light emission, etc.), ...
0
votes
1
answer
150
views
Do bindless textures overcome the limit of GL_MAX_TEXTURE_IMAGE_UNITS?
When I have an array of samplers, for example:
uniform sampler3D RHToBounceGridR[MULTI_BOUNCES_NUM];
where MULTI_BOUNCES_NUM is ...
0
votes
1
answer
50
views
compressing my [0,1] floats by throwing away the integer part
I am compressing a string of data in the formats of float. The current approach is throwing away eight bits in the integer part as my float is strictly within [0,1].
I wonder how I could do this.
1
vote
1
answer
53
views
Why is it so important to minimize alpha in textures for rendering
When modeling something like a hair or foliage using textures with alpha value for offline or real-time rendering, it seems to be common practice among computer modelers to try to minimize the amount ...
0
votes
1
answer
206
views
Is glActiveTexture() still needed?
I'm using OpenGL 4.30 with JOGL (in Java). I'm playing with basic texturing, trying to learn how it's done.
The textbook I'm using has the following code:
...
0
votes
0
answers
27
views
Understanding Virtual Texturing and Virtual Texturing Coordinates
So for a few weeks now i've been trying to get my head around implementing a virtual texturing system.
Since i've got a mesh and a 32k texture that already has UV's i've been scratching my head how do ...
0
votes
1
answer
192
views
Why is my texture being stretched out on a triangle strip?
I'm trying to apply a texture to 4 different triangle strips using JOGL (OpenGL/Java). I'm trying to make a 1000×1000 path in a square, where the path is 100 wide. The texture should be stamped 10 ...
1
vote
1
answer
62
views
Why does mipmapping separate out the RGB channels?
I'm trying to understand mipmapping.
It makes sense that you would have many pictures of your textures at different resolutions, and use the closest ones in size to what you need in order to avoid ...
0
votes
1
answer
112
views
How to render and store a color gradient in a ramp texture for 16bit dataset?
I'm working on a scientific visualization project and need to create a transfer function widget. The volume data is either in range 0-255 or it can be 16 bit i.e. <...
1
vote
1
answer
372
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 ...
16
votes
1
answer
5k
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 "...
22
votes
3
answers
4k
views
Performance of vector graphics versus bitmap or raster graphics
Sometimes I use vector graphics, simply because they look just slightly nicer in some cases, and other times, I use bitmap/raster graphics.
I was wondering, are there any significant performance ...
4
votes
3
answers
396
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 ...
0
votes
0
answers
30
views
How to improve rendering of surface water in shaded-relief images
I asked a version of this question on GIS Stack Exchange three months ago, but did not receive an answer. So I am posting it here.
I’ve written a simple Java application for rendering high-resolution ...
0
votes
0
answers
24
views
OpenGL texture format equally distributed for better bit usage
I am drawing my depth values into the red color channel of a texture. the depth² + 0.25 * (dx * dx + dy * dy) value goes into ...
0
votes
1
answer
48
views
store GL_TEXTURE_CUBE_MAP_ARRAY data to CPU
I have a GL_TEXTURE_CUBE_MAP_ARRAY texture of 8 cube maps (countLayers). Now I am trying to transfer the pixels to CPU.
Currently I am using this code:
...
2
votes
1
answer
415
views
Calculating maximum number of mipmap levels for OpenGL automatic mipmap storage generation
Using
glTexStorage2D(GL_TEXTURE_2D, num_mipmaps, GL_RGBA8, width, height);
followed by
...
0
votes
1
answer
147
views
How do I convert Derivative Maps to Normal Maps?
I recently came across a set of models that include Derivative Maps. I'd like to use them in Blender, but from what I've seen so far Blender only supports exporting baked Derivative Maps, not ...
0
votes
0
answers
242
views
GLSL texture() vs textureLOD causing odd texture filtering
I've got a fragment shader sampling an environment texture for world reflections, and in testing, there seems to be a major difference in the result for texture() ...
0
votes
1
answer
161
views
Why do normal maps perturb existing normals as opposed to 'overwriting' them?
To preface, I am a bit of a beginner to graphics programming. From what I've read, normal maps merely perturb the existing surface normal as opposed to overwriting them as I'd previously thought
But ...
13
votes
2
answers
3k
views
Derivative maps vs. Tangent Space Normal maps
I discovered that some engines use derivative maps instead of tangent space normal maps.
After some reading, it seems to be a really awesome way to replace tangent space normals but are there some ...
2
votes
1
answer
58
views
using parts of GL_TEXTURE_2D_ARRAY as GL_TEXTURE_CUBEMAP_ARRAY
I am using layered rendering for all my light sources to avoid rendering multiple times.
I have lightSourceCount many point lights and one sun, which is implemented ...
0
votes
0
answers
140
views
Polygon Rendering with Linear interpolation
I am reading through an old paper (Interpolation for Polygon Texture Mapping and Shading), cause it is mentioned in other papers I am reading.
In section two we have the following steps to perform ...
0
votes
0
answers
113
views
OpenGL: storing several textures to texture2dArray and exchange them continuesly
I try to render extreme large landscapes, which are deformed by height-maps. Each area has several level of detail height-maps. Other textures are structured like the height-maps as well, so that all ...
1
vote
1
answer
46
views
Are certain solid colors more likely to survive hardware texture compression unchanged?
I have encountered two solid grey textures, #303030 and #1b1b1b, being put through BCn texture compression and coming out as #313031 (changed) and #1b1b1b (unchanged), presumably due to the 32-bit (8:...
10
votes
3
answers
5k
views
How to do texturing with OpenGL direct state access?
How do you use textures with direct state access in OpenGL?
I have the following in my code, which seems to work:
...
2
votes
1
answer
85
views
Does automatic UV unwrapping work with an indexed face set model?
When working with Graphics APIs like OpenGL its common to use an index face set model. That is, multiple faces share adjacent / overlapping vertices by using a list of indices.
Most game engines like ...
1
vote
2
answers
169
views
How are the normals 'derived' from grey scale bump maps?
From what I understand, grey-scale bump maps are used to perturb normals on a surface such that the surface appears to have bumps. With a regular tangent normal map, it seems relatively intuitive ...
2
votes
1
answer
148
views
Deriving formula for perspective correct interpolation
I am trying to derive the formula for perspective correct texture interpolation on my own while implementing my own software rasterizer (projecting an arbitrarily rotated triangle in camera space on ...
4
votes
1
answer
129
views
Why does UV tiling affect performance in volumetric ray marching?
I am building a volumetric ray marching shader in HLSL in Unreal Engine, based on Ryan Brucks’ work: https://shaderbits.com/blog/creating-volumetric-ray-marcher
I am trying to add some additional ...
3
votes
0
answers
187
views
Graphics APIs: read/write the same texture
I know we can't bind the same texture as an input resource to a shader and as a render target within a single draw call, Direct3D just forces unbinding of such a texture SRV, OpenGL says it's ...
0
votes
0
answers
149
views
glTexImage2d from bytebuffer
I want to create a single-channel 2d texture with bytebuffer which contain each float for each pixel (let say it is an alpha value) to use further in shader
Btw, I've tried this
...
6
votes
0
answers
1k
views
OpenGL texelFetch causes black stripes
THE SHORT VERSION
In my fragment shader I'm reading (using texelFetch) multiple times the same texel from a texture (created by another fragment shader) and write it to the output render buffer. ...
1
vote
1
answer
77
views
How to map texture pixels to the corresponding 3D positions?
I have a mesh stored in .obj format with a texture image in .png format. For any "defined" pixel in the texture image, I'd like to compute the corresponding 3D coordinates when the texture ...
2
votes
1
answer
121
views
Why do some texture data formats only have the red channel?
While programming something in Rust with the BevyEngine, I came across TextureFormats. My understanding is that those are used to define how the pixel data is handled. So Rgba8Unorm means that there ...
0
votes
0
answers
35
views
Character Creation. Cartoon look, Eyes and Extra Parts. What advantages are the combining to one mesh?
I am fairly new to CG and 3d art. I'm trying to learn to make good game assets (ie. Low poly count, clean looking) in a cartoon style.
I'm making this character as pictured. But his eye is a separate ...