Questions tagged [texture]
For questions related to textures: procedural generation, encodings, aspect characterisation, filtering, mapping, storage...
237
questions
1
vote
1
answer
144
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
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 ...
0
votes
1
answer
32
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:
...
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 ...
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 ...
2
votes
1
answer
32
views
Opengl Texture top row pixels are garbage
This code displays a white texture always except when the dimensions are 383 x 512
...
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
151
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
110
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 ...
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
207
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
194
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
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 ...
2
votes
1
answer
422
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
50
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:
...
0
votes
1
answer
163
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 ...
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
142
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:...
-1
votes
1
answer
127
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.
...
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 ...
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
189
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 ...
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 ...
0
votes
0
answers
150
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
...
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
122
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 ...
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. <...
0
votes
1
answer
389
views
How can I bind my texture in the correct orientation?
I have successfully completed a working program that draw a rotating sphere with a map of the world as the texture, simulating the earth in space. However, the texture is bound on it's side, i.e. all ...
0
votes
0
answers
413
views
Using multiple textures in a shader
Background:
I am extracting the textures for a model with Assimp and sampling those textures in the fragment shader. I have multiple uniform sampler2D textureN ...
0
votes
1
answer
65
views
Calculating Material/Texture Placement from Bitmap to 3D Model
everyone!
I am currently developing a program that converts a 3D model to 2D isometric pixel art. Part of my program extracts the texture from an FBX file (as FBX files can have textures built in), ...
1
vote
1
answer
335
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 ...
2
votes
1
answer
773
views
How are obj files textured?
I am a new learner in 3d graphics. So forgive me if I seem to ask something very basic. I am confused how obj files are textured. So far I have seen:
obj + jpg
obj + mtl + jpg
When I look online, ...
1
vote
1
answer
379
views
How does the GPU know whether to magnify/minify?
Let me first state what I think I know and please correct me if I'm too inaccurate or plainly wrong.
When you use a function like texture, you're requesting a texel value given a pair (u,v) of texture ...
1
vote
1
answer
171
views
Why is the image from the CUDA version not as sharp as the CPU version?
I am extending Roger Allen's Ray Tracing in One Weekend in CUDA (and also here) by following Peter Shirley's Ray Tracing: The Next Week; specifically Image Texture Mapping.
The image I obtain from ...
0
votes
0
answers
74
views
Packing a GL_RGB from three separate buffers?
I'm decoding an .mp4 to use as a texture on a tristrip. It's easy enough to use an unsigned byte array of RGB triplets to create this texture, but frames come out ...
0
votes
2
answers
345
views
Is there a tool capable of drawing a triangular linear gradient fill?
I need to draw some shapes filled with linear gradients starting from every point and blending smoothly between points, like an OpenGL standard shading (I guess it is called ...
3
votes
1
answer
402
views
How do I efficiently calculate the distance to the edge of a shape?
I'm trying to implement something like an "inner glow".
That is, I have an image which defines the shape of an object, and then
I want to create overlay that is a gradient that goes from the ...
2
votes
3
answers
235
views
How to paint onto 3d models
I have searched this topic for very long time and have found basically no information on it.
If we have a 3d model with a uv layout. What is the basic technique for 3d painting on said model with a ...
1
vote
1
answer
87
views
Worsening sampling quality of raytracing with increasing distance from world origin
I am using RT shader (DXR) to generate g-buffers with code below. There was no problems with smaller scene (pink room from cwyman tutorial - http://cwyman.org/code/dxrTutors/tutors/Tutor5/tutorial05....