Questions tagged [texture]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
31 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 ...
  • 2,059
0 votes
1 answer
30 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 ...
  • 31
0 votes
1 answer
47 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
51 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
79 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
24 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 ...
  • 1
0 votes
1 answer
89 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
61 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 ...
  • 586
2 votes
1 answer
188 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 ...
  • 171
0 votes
1 answer
86 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
165 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
47 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: ...
  • 586
0 votes
1 answer
116 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 ...
  • 157
2 votes
1 answer
47 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 ...
  • 586
0 votes
0 answers
116 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
94 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 ...
  • 586
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:...
  • 111
0 votes
1 answer
89 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
72 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 ...
  • 162
1 vote
2 answers
167 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 ...
  • 157
3 votes
1 answer
104 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
121 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
128 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 ...
  • 162
0 votes
0 answers
130 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
1 vote
1 answer
72 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 ...
  • 111
2 votes
1 answer
98 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 ...
  • 23
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
101 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
271 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 ...
  • 1
0 votes
0 answers
287 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
63 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
250 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 ...
  • 11
2 votes
1 answer
471 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, ...
  • 135
1 vote
1 answer
347 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
165 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
62 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
299 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 ...
  • 111
3 votes
1 answer
331 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
182 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
81 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....
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 ...
3 votes
2 answers
838 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. ...
1 vote
1 answer
61 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(): ...
1 vote
1 answer
150 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 ...
1 vote
1 answer
280 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 ...
0 votes
1 answer
351 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 ...
  • 101
2 votes
0 answers
260 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/...
  • 161
2 votes
2 answers
1k 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. ...

1
2 3 4 5