Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.
4 votes
Accepted

Only Square Textures loading correctly (Beginner question)

It looks like your pixel lookup is backwards: int pixel = rawPixels[x*width+y]; Should be int pixel = rawPixels[x+width*y];
user avatar
  • 4,241
3 votes
Accepted

UVs Distored When Importing Mesh?

Blender and unreal engine read the meshes in a different way, I don't know the geometry of your object, but sometimes when you have n-gons, sometimes even quads, blender triangulates the mesh in a ...
user avatar
3 votes
Accepted

Unity Texture2DArray is too noisy

...
user avatar
  • 113k
2 votes

Scratching with mouse to reveal a symbol

One way to accomplish this would be to have 4 textures: a pre-scratched texture a post-scratched texture an alpha mask which determines which of the latter textures are visible a "brush" or ...
user avatar
  • 723
2 votes

How to create/get good terrain texturing for an RTS game?

Apply multiple "octaves" of textures/noise to avoid repetition. (You can read more about a related technique as used for generating procedural terrains here: https://developer.nvidia.com/...
user avatar
  • 610
2 votes
Accepted

Should I be worried about textures higher than 4K?

You'll probably be fine with textures up to 16384x16384 on modern hardware as that's the limit in DX11. For older hardware (DX9 era), you probably want to set the limit at 2048x2048. The reason that ...
user avatar
  • 6,566
2 votes

Make materials higher quality as the user gets closer

Sounds like you may want to use the LOD system. It stands for level of detail. You can set different rendering qualities based on the distance you’re viewing it from. It’s really useful for rendering ...
user avatar
  • 514
2 votes
Accepted

Techniques to make 3D models to look like oil paintings

A kuwahara shader would be a good start, with bright colors as an input. First hit resulted in this: ...
user avatar
  • 2,305
2 votes

How to generate the in-game world map UI for a large world?

Usually the approach to rendering something "too large" in any sense is to split it into several overlapping small parts, render each part separately and then compose the individual render ...
user avatar
  • 205
1 vote

Unity: How to determine and highlight map region under mouse pointer efficiently

I solved this problem once by creating my map in Blender and then slicing it into separate objects for each region. The map doesn't even need to be 3d for that. You can just create a plane, put your ...
user avatar
  • 111k
1 vote
Accepted

How do I offset a texture pointer in order to store an array of D3D11_SUBRESOURCE_DATA?

The offset is what you computed for SysMemSlicePitch, so for a 2D Texture array without mipmaps something like: ...
user avatar
1 vote
Accepted

How to add a texture inside a specific area in a canvas in javascript?

Solution: so I had to do it like this : ...
user avatar
  • 11
1 vote

Depth does not writes in texture

Forgot setup min max depth in viewport, now it works: ...
user avatar
  • 11
1 vote

GL error GL_INVALID_OPERATION: mismatched type setting uniform of location "4" in program "1"

glUniform1i(lightColor_location, 0); This says "set lightColor to the single number value zero". But ...
user avatar
  • 113k
1 vote

If I want to use textures and colors, how do I put them into my fragment shader?

You need to implement the change. There are many ways to do this. For example, we can swap components. In fact, we could just pass a single int to rotate the ...
user avatar
  • 18.1k
1 vote
Accepted

How to draw splatter (one color) on 2D grid to cover approximate number of pixels? (looking for algorithm/math answers)

A simple way to do this is to loop over the pixels in your image (or process them in parallel with a shader). For each pixel, measure its distance to the center of each splat, and subtract the radius ...
user avatar
  • 113k
1 vote

How to map texture pixels to the corresponding 3D positions?

This answer only covers Affine Texture Mapping. Consider this a partial solution. I'll be assuming you can process your obj to a list of triangles. Each triangle having three vertex. And each vertex ...
user avatar
  • 18.1k
1 vote
Accepted

What could be causing my texture in ash Vulkan to render lighter?

Special thanks to a comment by DMGregory! The issue is caused because my Texture ImageView and my texture were using different formats. One was set to R8G8B8A_UNORM, and the other to R8G8B8A_SRGB. ...
user avatar
1 vote

Texture "Mapping" (Using just part of a texture sheet on a object face)? Unreal Engine

Well I figured I'd have a go at answering my own question since there wasn't any responses yet and I made a little progress. I really dislike using visual scripting/material editing but this was the ...
user avatar
1 vote

OpenGL 2D texture lookup returns zero (black)

Now that I read my question I noticed the bug. I used GL11/GL_TEXTURE_1D instead of GL11/GL_TEXTURE_2D for the second texture, sorry: ...
user avatar
  • 125
1 vote

How do I convert a voxel model to a low-poly mesh with texture mapping that accurately mimics the coloured voxels?

There exists an addon on the asset store that can import .vox files directly, no exporting needed: https://godotengine.org/asset-library/asset/162 Regarding the high poly count, I'd say that you can ...
user avatar
  • 281
1 vote
Accepted

Edge bleeding with opacity map

Select the texture in your Assets folder, and change the Wrap Mode to Clamp. This says that samples near the edge of the texture should clamp to the pixel on that edge, instead of repeat which wraps ...
user avatar
  • 113k
1 vote

Does a texture mask need to be the same size as the base texture?

When a pixel shader samples a texture (regardless of what kind of texture), it usually does so using the UV coordinates interpolated between the UV coordinates of the vertices of the polygon. The ...
user avatar
  • 111k
1 vote
Accepted

How to use Texture2DArray with Normal map and Normal Unpack node in Shader Graph

Problem was, Normal Unpacking only works with non-SRGB textures. In order to generate non-SRGB Texture2DArray you'd need to provide last parameter(Set texture to be ...
user avatar
  • 541

Only top scored, non community-wiki answers of a minimum length are eligible