Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [textures]

A bitmap (raster image) used in a texture mapping process.

2
votes
3answers
1k views

How to reduce lag when rendering 40,000 sprites in Unity?

I am attempting to render 40,000 sprites: a grid of 200x200 with each grid node having a sprite renderer. All the way zoomed out I get about ~20 frames per second. What would be the best way to ...
1
vote
1answer
178 views

How to calculate a projection of 360° equirectangular slides?

My goal is to have a light source inside of a transparent sphere that has an equirectangular texture to act as a 360°-slide. I want to get the projection on arbitrary objects as a texture image on ...
1
vote
2answers
183 views

OpenGl: Error, The loaded object takes the same colors and style of the Texture?

I'm new to OpenGl Faced this problem: Draw function: ...
1
vote
1answer
172 views

Procedurally generated satellite view textures for large landmass rendering

I'm rendering a big land mass to be viewed from high altitude (40+ km), so I need satellite view style textures to be generated on the fly. The per vertex attributes I've got are: Biome (forest, snow,...
0
votes
1answer
103 views

Setting Texture to material slowly

Have an idea to set the texture to 3D material slowly. It would be like some animation, that change previous texture to new sloowly from bottom to top. I need it to my game... Can't find the solution.....
0
votes
0answers
151 views

Issue whith transparent textures when loading a prefab in Unity

I'm trying to implement Asset Bundles in my Unity game. I used to instantiate a prefab with Instantiate<GameObject>(gameRootPrefab), which worked fine. Now ...
3
votes
1answer
194 views

How to create an OpenGL texture using primitives?

I'm currently rendering a large proportion of the graphics of my game using custom OpenGL primitive functions (e.g. DrawCircleFilled(), ...
0
votes
1answer
148 views

Hard edges with non power of 2 images in OpenGL

When down scaling 2D images in Java2D, it does a great job at preserving hard edges while downscaling to non power of 2s. However, in OpenGL, I have been unable to find a solution to this. I have ...
1
vote
2answers
225 views

C++ SDL Vector of Textures Storing NULL Objects

I'm attempting to (re)learn C++ by making a top-down shooter game using SDL. In my game, I have created a Graphics class that handles all of the drawing, textures, ...
0
votes
3answers
160 views

Unstable sampled color in GLSL shader

It looks like that sampling the same exact color data from different areas of a texture atlas results in different vec4 in the GLSL fragment shader. In other words,...
1
vote
2answers
432 views

Rendering model with multiple tiling textures

See edit: How would I go about rendering a model with multiple tiling textures? I have a few ideas, but all of them have drawbacks, here are a few (by the way this is for an opengl game): -Use a ...
2
votes
0answers
170 views

How to map trapezoid image to rectangle cubemap face?

I am writing a 360 video application on oculus mobile SDK. My video frame has a trapezoid region and I need to map it into a rectangle region. In the above figure, trapezoid ...
0
votes
1answer
859 views

How to import texture from Maya to unity?

I am trying to export a model from Maya with animation but when I import into unity I am getting the model but the texture is not there. From the internet I found that while importing the model I need ...
0
votes
2answers
138 views

Wrong UV calculation

For a personal project, I'm trying to implement a tilemap. My goal is to obtain this But all I got is this I am calculating the UV coordinates inside my shader, with this formula. 8 and 13 is the ...
1
vote
1answer
190 views

Why do I have an uneven sprite line, when zooming and moving in libGDX?

I'm having trouble zooming in and moving my sprites. I made a simple drawing to demonstrate what happens. No zoom: Zoomed out: Some lines disappear, when moving a sprite. If I use a filter, this ...
0
votes
1answer
82 views

Why does texture-sampling only work at (0,0,0)?

I want to save the color of every point of one object in the RWTexture3D(UAV Resource) and transfer them to another object in its shader. I made a test in the ...
2
votes
1answer
76 views

How can I add my custom mob to my minecraft game?

So, I'm obviously not a very experienced mob maker, so ill just get to the point. after I made a custom mob, I had no idea where to put it, how to make sound, how to make an egg for it etc. would ...
0
votes
0answers
658 views

openGL ES - Cube and texture coordinates

I'm learning openGL ES (1.0 - Android) because I'm interested in writing a simple framework (for learning purpose). I'm writing all the "primitive" 3d objects (a cube in this case), they seem work ...
3
votes
0answers
74 views

Advanced copying between textures in OpenGL

I have many RGBA textures in my project. I often copy a part of one texture into another texture using copyTexSubImage2D . I am probably able to copy just a specific channel by setting mask (colorMask)...
0
votes
0answers
69 views

Rendering 2D images in layers using JME3 and Lemur

After some research, I discovered that using the LayerComparator provided by Lemur allows proper layering of images. I combined the logic of this JME3 forum thread and the ...
3
votes
1answer
132 views

Should we avoid a padding of transparent pixels around an image when creating Assets to be used in 3D Space?

Assuming we are creating Assets to be used on iOS in order to create textures that are then mapped to the surface of Quads in 3D Space, is below recommendation and its reasoning appropriate? Try to ...
0
votes
1answer
212 views

Mipmapping on CPU

I'm trying to load a big terrain texture and only want to load a certain mipmap level to the GPU with Vulkan. When the whole terrain is in sight, the camera is far enough away from it so that only a ...
1
vote
0answers
186 views

Texture mapping artifacts at triangle edge (for thin triangles?)

I'm working on generating programmatic textures for 3d models and showing them in WebGL using Threejs. To do this I generate a texture image (PNG) that contains per-triangle textures (a rectangle on ...
1
vote
1answer
2k views

Difference between “texture” vs “texture2d” in OpenGL ES?

I see many example in shadertoy use texture, but in the cocos2d-x, only texture2d. Does ...
0
votes
2answers
156 views

How are minimaps rendered for open worlds?

When I've created minimaps for smaller to medium levels before I would use a large texture mapped to a plane for the minimap and world map. The minimap/world map camera would then view this texture ...
0
votes
1answer
69 views

How to edit the alpha channel of an existing specular map?

I am working with a third party model and need to change the specular map. The model material is using the spec map's alpha channel information. I have opened the spec map in Photoshop and if I go to ...
0
votes
1answer
114 views

My generated texture is flipped

I'm learning OpenGL and I don't understand why my texture is flipped if I give as UVs the "matching" vec2 of the mesh's vertex (vec3). Example: ...
0
votes
0answers
2k views

Texture size required for 4K resolution

If I want to develop a 3D game that will run in 4K (3840 × 2160) resolution, what texture size should I use to avoid it looking pixelated or bad? Is safe to say that a 4096x4096 texture is ok? Won't ...
1
vote
1answer
182 views

Textures drawn with visible missing lines of pixels

I am making a game in monogame and have encountered the following problem: The black arrows mark the places where the rendering is "off". As you can see the gray lines aren't "flush" or "smooth". ...
3
votes
1answer
189 views

Triangle Texture Packing Problem

I'm trying to create a texture atlas where each triangle face is laid separately from each other (i.e. it is not typical mesh parameterization). In order to do this, I would have to pack the triangles ...
0
votes
0answers
56 views

Best way to add material to mesh map Unity

Ok bear with me because I don't know most of the terminology yet. I downloaded an asset for 2D tiling to use in my game so I'm basing this off the documentation terminology. It chunks my 1000x1000 map ...
1
vote
2answers
582 views

UE4 - Loop through pixels for material

I am using Unreal Engine 4, and I want to try to procedurally generate a grass texture. For now, I am using a noise block. Now I want to loop through every 16 pixels or whatever (4x4 squares), take ...
0
votes
1answer
1k views

How to load and display an image in OpenGL ES 3.0 using C++

I'm trying to make a simple app on Android Studio using the NDK, JNI to call C++ code that load and display an image. I have managed to create the surface and draw a simple Triangle already. Now, I'm ...
0
votes
1answer
386 views

Multiple textures/texture atlas

Is there any performance difference between using multiple textures and using texture atlas in splatmapping? I would want to use multiple ones beacouse tiling and changing them would be easier but ...
4
votes
1answer
446 views

OpenGL - texture releasing

If I call glDeleteTextures, will it release memory immediately? And what is the performance? I know that glGenTexture is quite ...
5
votes
1answer
796 views

How can I render images to multiple windows without creating double textures in SDL2?

Simply put: What is the simplest way to render an image to two different sdl2 windows? I'm pretty new to SLD2, but I have a nice little level editor working. I then decided to move the area with edit ...
1
vote
1answer
423 views

Is there a way to set texture wrap mode as repeat in SDL 2?

In SDL2, I would like to render a texture on the screen, but with destination rectangle greater than texture size. Instead of stretching the texture, I would like ...
1
vote
0answers
254 views

OpenGL ES 2.0 Framebuffer stays empty?

As first I want excuse me for opening another FBO question. I found alot of them but I still can not manage to get it working. I want to implement a framebuffer class for postprocesing in my 2D ...
0
votes
2answers
167 views

Texture2D.SetPixel method behaving weirdly in game province creation

I have been trying to implement a province system in Unity. I am trying to read the provinces from an image file, store their coordinates in a province, and use those coordinates to generate a texture ...
0
votes
1answer
2k views

UV World mapping in shader with Unity.

Please refer to this Answer. DMGregory script is working for me, although I have a problem I can't fix because I don't talk shader :) The tiling will be applied correctly on geometry aligned on XY ...
0
votes
1answer
186 views

Particle system color not set properly in Android build in Unity.

I want to set the color of "Particle System" that I add to a game object in run time. Both game object and particle system are created in run time too. I have the following code that works well on PC ...
1
vote
3answers
362 views

Why add a transparent border to a texture?

I've seen game developers give advice to add a transparent border around sprites, for example around 3:00 minutes into this tutorial. Why should we leave a transparent border around a texture before ...
1
vote
0answers
340 views

1D vs 2D vs 3D texture performance

I'm working on a 3D game with large blocky untextured, but individually colored, voxels (similar to CubeWorld). For rendering, right now I naively convert online all visible faces ahead of time to ...
1
vote
0answers
384 views

How does Unity's QualitySettings.masterTextureLimit work?

I'm trying to get to the bottom of how masterTextureLimit works, but my results have been inconsistent so far. I created a massive sprite (8192x8192), and I'd like to resize it at runtime to save ...
3
votes
3answers
348 views

DirectX11 - Texturing Terrain Mesh with Shared Vertices

I'm trying to create and texture a terrain mesh in DirectX11. I've managed to create the mesh itself, but I don't know how I should do the texturing. Let me start by explaining what I'm doing so far: ...
4
votes
0answers
326 views

Render live MJPEG stream on a plane in Unity

I'm trying to display a live video stream as a texture in Unity. It comes from a Raspberry Pi using motion and encoded as MJPEG. Is there an easy way to implement ...
1
vote
1answer
176 views

Offsetting ground texture doesn't work in WebGL

so I've created a 2D sidescroller game, the technique I used is to keep the player on the same place, and move the obstacles towards him. I also offset the ground and backdrop constantly to create the ...
9
votes
1answer
8k views

Animated textures for models; How to write a shader?

Was watching some Rocket League and notice there was animated decals and wheels. . I would like to implement something similar to the effects in the image above. How would I go about writing a ...
0
votes
1answer
34 views

texture cordinate VBO not being updated OpenGL

I'm making a minecraft style game and I decided to add a VBO with the texture atkas coordinates of the vertices but it is appearing all white. However I'm following the same process as another VBO for ...
1
vote
1answer
733 views

Why is my texture wrong?

So I am creating an AR app using Vuforia, and I have found a way to read obj files and index them. But now that I finally got my model to show up, there must be something wrong with my UVs/texture ...