As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [texture]

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

Filter by
Sorted by
Tagged with
9 votes
2 answers
808 views

Are textures automatically Morton-coded when loaded to VRAM?

I know that texture caching on GPU works to optimize locality in 2D (or 3D if using 3D textures). I believe this is done using space-filling curves like Morton or Hilbert curves. When passing an ...
5 votes
1 answer
2k views

The mathematics of two dimensional interpolation on a quad

I am trying to wrap my head around how exactly the GPU interpolates texture coords on a quad. I realize to the GPU a quad is two triangles but I find thinking in terms of the whole quad to be easiest. ...
3 votes
2 answers
645 views

Making low discrepancy sequence noise textures, not LDS sample positions

When making sampling locations, there is a lot of information out there on how to do white noise sampling, uniform sampling, uniform+jittered sampling, low discrepancy sequence sampling (eg halton) ...
11 votes
2 answers
2k views

Is using many texture maps bad for caching?

If I have many textures (say 5+ maps) bound to the same texture unit, does it work worse for cache than if I had only 2 or 3 textures?
2 votes
0 answers
119 views

Algorithm for 3D mesh model segmentation to chart

I'm trying to implement a segmentation model which will divide a 3d mesh model into charts. But I'm having really hard time to find resources in the web. The papers and some other places these ...
1 vote
1 answer
403 views

How do you scale an image across planes while retaining perfect tiling?

Scaling up or down a texture is quite simple, modify the UVs. In my particular scenario though, I have multiple "quads" (it is a patch tessellation shader) each with a tiling texture. Does anyone ...
1 vote
1 answer
1k views

OpenGL: Rendering 2D shadows

I've been working on a 2d shadow system for a school project, using this method to generate visibility polygons. However, I'm having issues figuring out how to draw those visibility polygons in a way ...
1 vote
0 answers
471 views

Nearest depth upsampling

Nvidia in this article presented a way to upsample low res buffer to full res buffer called Nearest Depth Upsampling. This works by comparing four depth values from downsampled low res depth buffer ...
3 votes
1 answer
343 views

procedurally generating a texture overlay simulating shrink wrap

I'm looking for a way to procedurally create a realistically looking texture overlay simulating the object being shrink wrapped. It is only used to be added to single images, so it does not need to ...
1 vote
0 answers
54 views

Emission maps that interact with a bump map

I am trying to create an effect where a bumpy billboarded texture is illuminated by a emission map that is also billboarded but is logically closer to the camera in 3D space. In this way a blue ...
0 votes
1 answer
1k views

How do you interpolate UV mapping coords in a quad tessellation evaluation shader?

Does anyone know who to interpolate UVs in a quad tessellation evaluation shader? I can interpolate the position easily like so : ...
5 votes
1 answer
2k views

What happens to float values written to UNSIGNED_BYTE texture?

This is more a theoretical question. I'm wondering what happens when I write float values into an empty RGBA texture of type gl.UNSIGNED_BYTE in WebGL 1.0. ...
2 votes
2 answers
852 views

How to use multithreading in 3D software renderer to speed up fetching texture values

The biggest bottleneck of my code is fetching texture RGB values from memory. My code looks something like this: ...
3 votes
0 answers
95 views

Slope Based Texturing

On the main page for Allegorithmic's Bitmap2Material, it mentions that the software uses a Slope Based approach over a Luminance Based approach. What exactly does this mean?
6 votes
1 answer
2k views

Seamless Textures

I understand how an artist would make seamless textures by hand, but how can a computer program automate that process? Software like PixPlant is capable of doing this, but I don't understand how it ...
2 votes
1 answer
45 views

Hiding Boundaries with the Eye close to a set of adjacent textured quads

I'm rendering clouds by applying a texture map on the inside of an ellipsoid. From a distance (at the center of the cloud ellipsoid) the texture looks quite nice and reasonably realistic. See image ...
4 votes
1 answer
470 views

How are Normal Maps created?

How does one go about taking a single photograph, like a picture of a rock wall, and getting a decent normal map out of it? If you can, I'd like to learn about the mechanics behind it, and not a ...
4 votes
1 answer
429 views

Special Texture Stretching without deformation

I am trying to achieve a special texture stretching effect in my shader. Here is how I define my uv before sampling my texture, nothing really special. ...
5 votes
2 answers
229 views

What is missing in this image that stops it from looking like a photograph?

Look at this image: This is CG, Saya, a project meant to make as real CG as possible to the point of becoming indistinguishable from reality. I would say that it is pretty believable. But, it still ...
2 votes
1 answer
119 views

Possible methods to deal with artifacts when drawing billboards to a cubemap

When drawing billboards to a cubemap, the billboard texture was incorrectly aligned on the boundaries of the cubemap between different sides. My guess is that the false projection of the billboard ...
8 votes
3 answers
310 views

Changing image so it would look like through colorful glasses

I am currently working on some simple pixel shader in HLSL. I send to shader texture and I want to make it more colorful (something like in the picture below). In the picture 1 there is original ...
4 votes
2 answers
654 views

Fast approximation of spherical texture coordinates

I'm working on a Software Rasterizer on a sub-30 MHz RISC CPU My current focus is on zooming-in on a slowly rotating planet. For maximum quality, no 3D polygons are involved with the planet - the ...
3 votes
1 answer
3k views

WebGL: Why are my textures black?

I am trying to write a simple WebGL script to display a pyramid with a brick texture and Phong lighting. The lighting works fine but when I incorporate the texture, the pyramid turns black. I've ...
0 votes
2 answers
4k views

Emission of light from texture on WebGL

I have to build a texture of a cube that models the emission of light by the object. Any tips? I really don't know where to start.
2 votes
2 answers
13k views

Send Texture to Shader

I've been following the LearnOpenGL tutorials and I've come across a piece of code I don't understand. ...
8 votes
2 answers
1k views

Help me grasp Anisotropic Filtering (AF)

Lately I've been reading about texture filtering, namely Nearest-neighbor filtering, Bilinear filtering, Trilinear filtering, Anisotropic filtering, MIP maps, RIP Maps and so on. From a high-level ...
5 votes
1 answer
586 views

Performance impact during texture layer loading

Recently I have been having a rather confusing performance drop with loading in layers of a 2D texture array, but only in one case from what I can tell, leaving me to speculate on why it is happening ...
2 votes
0 answers
75 views

Implementation of the paper "unified texture management of arbitrary meshes"

I briefly read the paper and I think I got the basic idea of it. The paper doesn't really go into implementation details though so my question is mostly on that. In the paper, needed tiles are ...
1 vote
0 answers
96 views

Advice on synthetic data generation using 3D mesh

I'm developing a deep learning algorithm to find and classify (post consumption) plastic bottles on a conveyor belt. A way to train my model is to get tons of labeled images of each bottle, which for ...
0 votes
0 answers
139 views

How to quickly draw multiple instances of a texture?

I am going to have the following texture drawn hundreds of times all over the screen using a 4 point GL Triangle Strip. I would use GL's dots except I need to be able to orient the texture. The color ...
4 votes
1 answer
2k views

Stretch the cube mesh but repeat the texture?

I have a simple cube mesh, which I scale with modifying the model matrix. Texture settings: ...
4 votes
1 answer
630 views

What happened to my texture mapping?

Recently, I am writing a simple software rasterizer for self-studying and fun. But the texture mapping has problems. The texture I want to map is below: But the final image of two triangles is ...
0 votes
1 answer
308 views

Getting texture value of cartesian coordinate from a Obj file

I have an obj file together with an associated mtl file and texture jpg file. I have managed to find some code that sets a specific camera view and raytraces the image to output a depth map plus a ...
1 vote
1 answer
1k views

Barycentric Coordinates of a Point on a Line

Given a point and a line segment, how do you calculate the barycentric coordinates of the point to the line? bool BarycentricCoordinates(const Vector3& point, const Vector3& a, const Vector3&...
4 votes
1 answer
1k views

Using RGB texture format for image load/store

As stated in documentation possible values for layout qualifiers of image formats are (for example floating point): Floating-point layout image formats: rgba32f rgba16f rg32f rg16f r11f_g11f_b10f ...
1 vote
0 answers
466 views

Texture mapping on a quad strip [closed]

I have just started learning OpenGL and I am trying to map a texture on a Quad Strip. Basically, I am trying to create a parametric surface and I don't know how to map the coordinates. What can I do? ...
3 votes
2 answers
587 views

Texture Mapping jagged pixel edges

I'm currently writing a software renderer. I managed to implement texture mapping and it works fine. Only issue is, that the edges between the pixels are sometimes jagged in x direction as you can see ...
9 votes
1 answer
334 views

Perturbed image texture implementation from renderman language

I am trying to implement (in C#) an image perturbation algorithm presented in the book "Texturing and modeling - K. Perlin et al" (page 91 if anyone has it), which distorts an image. The following ...
3 votes
1 answer
2k views

Skybox in a Ray Tracer

I have implemented a sky rendering model in my ray tracer which saves the color of the sky to an image. I was wondering how I can render the sky dome and texture map the image on to it. Do I render ...
7 votes
1 answer
2k views

What's the difference between Sample and tex2D

I am mainly using Unity but I think that it's not related to this engine, and I am wondering what's the difference between using tex2D and ...
3 votes
1 answer
245 views

setting up integer texture and binding as image pt. 2

Made a new question as suggested, follow up to that one. I was experimenting with texture declaration to find solution and thats how I done that before (...
3 votes
2 answers
2k views

Setting up integer texture and binding as image

When I set up a texture as float it works (color is written - BTW I'm doing voxelization): ...
2 votes
2 answers
369 views

Can I have lower color bit depth in sample buffer than target framebuffer?

I´m looking into uses of high amount of samples in multisampling. If I have an RGBA8 framebuffer and render to it using multisample with many samples, say 32, dithering on per-sample level should ...
4 votes
1 answer
416 views

How to implement Texture Baking?

So currently I want to implement radiosity in my engine. After figuring out the amount of light that bounces between elements/disks/patches (I've been told disks are the best - correct me if I'm wrong)...
1 vote
0 answers
153 views

Model UVs optimization

This is related to question on SO (but the purpose of this question is different). I have model with UVs (3DS max UVW editor screenshot) I have grouped some unused parts of UVs on the top right ...
3 votes
2 answers
436 views

Frustum aligned volume integration - aliasing issue - temporal reprojection

Raw volume raymarching especially aligned with frustum seem to produce a lot of aliasing/banding on edges of shadow map. Especially when fragment pos is far because step length is then getting bigger. ...
5 votes
2 answers
144 views

Problem with Basic Diffuse Lighting

So recently I have been learning how to implement Diffuse Lighting in DirectX and I have done so with the following code: ...
8 votes
1 answer
5k views

Perspective Correct Texture Mapping

So I'm trying to correctly map my textures in my software renderer using the u, v coordinates but I can't seem to get it working. I got affine texture mapping working. This is what I can produce using ...
1 vote
1 answer
3k views

Background behind 3D model

I have object loader, which i want to have background. I tried to put jpg image like texture to my application. I tried to make that with FreeImage library, but the image didn't show. Also i tried ...
1 vote
1 answer
734 views

Texture rendering in OpenGL

I know there are tons of questions about it, but I found nothing useful so far so, here I am. I'm trying to render a texture which is attached to a wavefront .obj mesh. I continued to fail (somehow, ...