Questions tagged [texture]
For questions related to textures: procedural generation, encodings, aspect characterisation, filtering, mapping, storage...
243
questions
3
votes
0
answers
226
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
158
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
78
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
137
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 ...
6
votes
1
answer
207
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
89
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
462
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
517
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 ...
3
votes
1
answer
745
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
72
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
421
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
925
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
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 ...
1
vote
1
answer
408
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
79
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
360
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
465
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
276
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
88
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
1k
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
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
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
194
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 ...
6
votes
3
answers
4k
views
Gaussian blur with transparency
I made a convolution testing program for experimenting with stuff. I've created a 5x5 Gaussian kernel for blurring. Everything looked fine, then I tried to blur a transparent png with a white circle ...
1
vote
1
answer
375
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 ...
2
votes
0
answers
305
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/...
4
votes
2
answers
1k
views
Transforming fragment-to-camera to tangent space for parallax occlusion mapping
I'm trying to implement POM using this tutorial. As stated, I need to transform fragment-to-camera to tangent space and then pass it to a function.
tangent space is computed using Assimp. Well I ...
1
vote
2
answers
178
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 ...
0
votes
0
answers
26
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?
...
2
votes
1
answer
716
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'...
2
votes
1
answer
734
views
Nice way to make noise seamless (without tampering with the noise generator)
Here's the problem :
I have multiple noise generators in my program I Can't change.
Perlin Noise, Diamond Square, Voronoi, etc.
Unfortunately for me, I want the noise to be tileable, no matter the ...
0
votes
0
answers
85
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 ...
2
votes
1
answer
152
views
2D array texture with different filtering setting per texture?
Currently I have textures which need GL_NEAREST and some other need GL_LINEAR in the same texture2dArray. In the shader I perform a manual GL_NEAREST lookup via textureFetch().
To avoid this my ...
1
vote
0
answers
39
views
Optimizing texture fetches with higher mip levels
Let's say I have some shader program in DirectX or OpenGL rendering a full screen quad. And in a pixel/fragment shader I sample some huge textures at random texture coordinates. That is one same ...
4
votes
2
answers
1k
views
MipMaps for Signed Distance Field
Is there some algorithm that keeps details when creating mipMaps for SDF?
For example group of 4 pixels when only one is above threshold will lose this pixel with bilinear and creating mipMaps with '...
1
vote
1
answer
2k
views
convert image pixel dimensions to UV
Hi i am rather new to computergraphics but i am trying to map an equirectangular image (360 video) to the inside of a sphere now i found the following formula to do this.
...
4
votes
2
answers
1k
views
What does texture resolve mean?
In the context of render targets or textures, what does "resolve" mean?
For example: To resolve a color texture.
From my understanding, it seems to mean, "copy but process/convert at the same time", ...
1
vote
0
answers
480
views
Why is glUniform1i() returning GL_INVALID_VALUE?
I have a sampler variable in a shader:
uniform sampler2DArray tiles;
Which I am trying to bind to a texture unit in GL:
...
2
votes
1
answer
550
views
Zero-copy texture reading from CPU memory
The Intel 740 AGP graphics card read textures directly from system RAM, using VRAM exclusively for depth buffers and the framebuffer. This has the effect of saving video RAM, and it could be ...
1
vote
0
answers
43
views
How can I detect if an edge has flipped during the UV unfold process?
I'm writing my own UV Unfold operation (similar to Maya's Optimize UV tool or 3DS Max's Relax Tool). My code works great 90% of the time but in some instances, I'm getting faces and edges that flip ...
0
votes
0
answers
473
views
Inverse texture mapping
I have a textured 3D object and looking for ways to transform back the texture. Effectively, I think this is an inverse texture mapping task. Do you know of anything close to this? Some papers or ...
4
votes
0
answers
331
views
Are there any reasons to use power of two textures with modern mobile platforms?
Are there any reasons to use power of two textures (like 128x128 sized) if one targets modern mobile platforms (with OpenGL ES 3.0, Metal and/or Vulkan)?
With iOS the PVRTC only supports power of two ...
1
vote
0
answers
356
views
Which is more important : Texel or Pixel rate? [closed]
I would like to know which is the most important ? More particularly in games or for the display of a desk (ex KDE Plasma, Windows 10 ...) ?
1
vote
0
answers
53
views
Where to find BRDF textures
I've read about measured BDRFs and models like cook-torrance have parameters that need to be set. It isn't hard to imagine that these parameters and the measured properties would vary from point to ...
0
votes
0
answers
31
views
Visualize a mesh with sparse vertex counts
I have a mesh that records some integer information for its vertices. I expect this information to be quite sparse, with possible large variations.
How could I visualize this on a colorscheme (e.g. ...
-1
votes
2
answers
420
views
Why does Cubemap have 6 individual textures?
I am learning about Cubemap and I learned that A cubemap is basically a texture that contains 6 individual 2D textures but my question is Why does it contain 6 individual texture ? and also I've read ...
1
vote
0
answers
55
views
Why cache working set per multiprocessor for texture memory in Nvidia has a variable size?
I saw it here https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#features-and-technical-specifications__technical-specifications-per-compute-capability , I don't know if it also happens ...
0
votes
1
answer
1k
views
Sphere Texture Mapping Algorithm
I am trying to generate UV coordinates automatically to map a texture on a sphere.
The problem is with seams when going from 0.8 to 0.2 there is a discontinuity and interpolation in fragment shader ...