Questions tagged [texture]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 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 ...
user avatar
0 votes
0 answers
20 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 ...
user avatar
  • 489
2 votes
1 answer
45 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 ...
user avatar
  • 169
0 votes
1 answer
36 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 ...
user avatar
0 votes
0 answers
47 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() ...
user avatar
0 votes
1 answer
36 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: ...
user avatar
  • 489
0 votes
1 answer
83 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 ...
user avatar
  • 157
2 votes
1 answer
36 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 ...
user avatar
  • 489
0 votes
0 answers
79 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 ...
user avatar
0 votes
0 answers
45 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 ...
user avatar
  • 489
1 vote
1 answer
43 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:...
user avatar
  • 111
0 votes
1 answer
76 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. ...
user avatar
2 votes
1 answer
50 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 ...
user avatar
  • 162
1 vote
2 answers
158 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 ...
user avatar
  • 157
3 votes
1 answer
70 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 ...
user avatar
3 votes
0 answers
71 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 ...
user avatar
2 votes
1 answer
102 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 ...
user avatar
  • 162
0 votes
0 answers
94 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 ...
user avatar
  • 1
0 votes
0 answers
13 views

How to get the surface alignment

How can I get the surface alignment of a 3D object in screen space? I found this example which, I believe, is aligning the UV coordinates to the 3D vectors (which are determined by their current ...
user avatar
1 vote
1 answer
63 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 ...
user avatar
  • 111
2 votes
1 answer
60 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 ...
user avatar
  • 23
0 votes
0 answers
124 views

Blending 2 or more Textures based on depth (Unity)

Ive been trying my hand at blending between 2 or more textures, so far I found I can lerp between Colors quite easily, but this lacks the detail im looking for. So Im trying to blend 2 or 4 textures ...
user avatar
0 votes
0 answers
34 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 ...
user avatar
0 votes
1 answer
88 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. <...
user avatar
0 votes
1 answer
173 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 ...
user avatar
  • 1
0 votes
0 answers
193 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 ...
user avatar
0 votes
1 answer
55 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), ...
user avatar
1 vote
1 answer
199 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 ...
user avatar
2 votes
1 answer
212 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, ...
user avatar
  • 135
1 vote
1 answer
294 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 ...
user avatar
1 vote
1 answer
154 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 ...
user avatar
0 votes
0 answers
48 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 ...
user avatar
0 votes
2 answers
197 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 ...
user avatar
  • 111
2 votes
1 answer
253 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 ...
user avatar
2 votes
3 answers
98 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 ...
user avatar
1 vote
1 answer
75 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....
user avatar
3 votes
0 answers
87 views

How should the texture file look like?

I am wondering why the texture of the following 3D model https://app.ignitionrobotics.org/GoogleResearch/fuel/models/Transformers_Age_of_Extinction_Mega_1Step_Bumblebee_Figure Looks like the ...
user avatar
3 votes
2 answers
653 views

Using array of textures in DX12

I managed to create code, working correctly as Texture2DArray in hlsl by using single ID3D12Resource and binding it as D3D12_SRV_DIMENSION_TEXTURE2DARRAY with constant array size. ...
user avatar
1 vote
1 answer
59 views

Texture value clamped to 1

I am working on ray/path-tracer using DXR and I'm starting with simple AO. In first pass, I am storing normal value and RayTCurrent(): ...
user avatar
1 vote
1 answer
113 views

How 3D painting software works

I am new to graphics programming and i'm learning opengl. I managed to make a really simple renderer where i can import models display theirs textures with all lighting. My goal is to make a simple ...
user avatar
1 vote
1 answer
219 views

Transfer the texture between two different sets of uv

Say I have a mesh with two sets of uvs. And I have a texture made for the first set of uvs. I would like to create a second texture that has the same relationship between its pixels and the second set ...
user avatar
0 votes
1 answer
289 views

What method is used for baking grayscale curvature maps

I'm looking for a way to generate curvature maps like this: The map stores the Convexity and Concavity of each pixel as a value from 0 to 1, where .5 is no curvature and 1 and 0 are the extremes. I ...
user avatar
  • 101
2 votes
0 answers
218 views

Corrupt values when writing and reading from the same RWTexture2D in HLSL/DirectX?

I'm playing around with DirectX 12 ray tracing, and I'm trying to read and write data to a 32-bit RGBA floating point RWTexture2DArray within a DirectX 12 HLSL shader. I'm getting weird corruption/...
user avatar
  • 61
2 votes
2 answers
882 views

BC7 texture with alpha has the same size as BC7 without alpha

So i've a made a texture. I've saved the RGB one with BC7 compression, then added alpha channel[specular map] with varying levels of grayscale, and saved the file again as RGBA with BC7 compression. ...
user avatar
1 vote
2 answers
131 views

What's more optimal - sampling one channel at a time or all channels at once?

I'm going through and optimizing some of my glsl code for a project, and have come across a scenario several times that I am not sure how best to optimize. In summary - Is it faster to sample a ...
user avatar
0 votes
0 answers
19 views

Custom Create Maps in OpenGL

I am trying to create some procedurally created terrains for which i need to create noise maps. How do I create a texture of noise map in OpenGL and then pass that in my vertex shader as a heightMap? ...
user avatar
0 votes
0 answers
198 views

Generate hardcoded texture data to pass to shaders

I'm trying to manually create a color data to load as a texture with OpenGl for learning purposes. I created an unsigned char array consisting of 4 pixels with 3 ...
user avatar
2 votes
1 answer
359 views

Texture loading- erratic working

I'm a noob to the OpenGL world and am picking up ideas through practice. I've been writing some code to build retro-arcade games recently and need to load textures to provide the graphic interface. I'...
user avatar
0 votes
0 answers
74 views

Is linear interpolation in a 2D texture possible (not quadratic like bilinear interpolation)?

I am currently studying for a computer graphics exam and on the slides about bilinear interpolation it is said that it is in reality quadratic interpolation. An (on the slides) unanswered question ...
user avatar
1 vote
0 answers
268 views

Sampling the depth component of a packed depth-stencil texture while rendering to its stencil component

I need to frequently perform depth testing for any given fragment at a different fragment location than the one rendered to. Since this isn't possible with normal builtin OpenGL depth testing ...
user avatar

1
2 3 4 5