Questions tagged [texture]

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

Filter by
Sorted by
Tagged with
21 votes
3 answers
3k 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
377 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
27 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
22 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
77 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
351 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 ...
0 votes
1 answer
37 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: ...
1 vote
1 answer
208 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
89 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. <...
2 votes
1 answer
59 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
46 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
70 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() ...
1 vote
1 answer
112 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 ...
0 votes
1 answer
86 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 ...
12 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
37 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
86 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
50 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
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:...
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
55 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
161 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
106 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 ...
3 votes
1 answer
79 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
78 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
105 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
944 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. ...
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 ...
1 vote
1 answer
64 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
68 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
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 ...
6 votes
1 answer
204 views

CrazyBump Shape Recognition

I've recently been using CrazyBump, and I think I'm starting to understand how it works. But I'm confused about what it calls Shape Recognition. According to this website, that feature attempts to add ...
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 ...
0 votes
1 answer
194 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
209 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 ...
2 votes
1 answer
681 views

Video-games; Rendering textures on scope zoom-in. Texture compression problem?

This is general question. In the multitude of video-games that are not specialized in scoped warfare (like Sniper Elite), I've noticed that when you zoom in with a scope, the textures and normal maps ...
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), ...
0 votes
1 answer
301 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 ...
2 votes
1 answer
248 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
156 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 ...
1 vote
1 answer
302 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 ...
0 votes
0 answers
49 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
209 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
271 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
111 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
77 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
2 answers
703 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. ...
2 votes
2 answers
912 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 vote
1 answer
60 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
118 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
2 3 4 5