Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
1answer
3k 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
0answers
46 views

Render (screenshot) weapon model in Counter-Strike: Global Offensive

I need to take screenshot of weapon model from screen like this, without any background. Tried to remove and change resources using mat_texture_list console command,...
0
votes
0answers
10 views

UV mapping a playing card in Maya for use in Unity (using a SpriteSheet of all the playing cards). One Material or Two?

I am wanting to make a pack of cards in Unity and Maya. I am familiar with UV unwrapping in Maya, but I never used sprite sheet for my models i unwrapped. (They all just fit onto one texture so far). ...
2
votes
1answer
22 views

Tiling texture doesn't repeat, even though wrap mode is set to repeat

For some reason, my floor tiling (set to 100 x 100) only shows on one corner of the plane. Past that corner, it just stretches out to the sides and leaves the middle one solid colour: Here is how I'...
0
votes
0answers
12 views

Substance Painter Reset 2D View?

I have been working through the 2D view to apply textures and such then for some reason the camera just spazzed out and zoomed out alot and the F key only seems to reset the 3D View. How would I go ...
1
vote
2answers
753 views

How can I loop through pixels in the material editor?

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
0answers
9 views

Pands3d. Get value of texture under mouse cursor

That's quite straitforward. While creating a technical demo, i encountered a problem, where i need to know color of textures under mouse coursor. As i see it, there must be a function to transform ...
0
votes
1answer
22 views

Finding texture coordinates for plane

I am creating a 3D ray tracer and want to add textured planes. My planes are stored using a position vector and a normal vector. I want to use a square texture and map it repetitively onto the plane....
0
votes
2answers
82 views

Limit Color Pallete Using Shader (Unity)

Basically, what I want to do is take a primary input image texture (which is a render texture in-game) and a secondary pallete texture (contains X number of colors, and is X by 1 pixels in size). What ...
0
votes
1answer
30 views

How to change Texture2D type to Sprite during runtime (Unity)

How can we convert the Texture2D type to "Sprite" using the script (not in Editor)? It seems that the Texture2D retrieved from file is by default Normal Map. I need to convert the TextureType to "...
0
votes
1answer
55 views

Draw a texture2D at specific coordinates on another Texture2D

I have a ShipTexture and a Sail Texture. I need to draw the sail texture at a specific location on the shipTexture (call it the sailMountPoint) regardless of the location vector associated with the ...
0
votes
1answer
55 views

Missing texture after add new actors

I want to add two types of characters multiple times but when I add a new actor to stage texture in "old" actors stops render. I can add multiple KnightActor (...
1
vote
0answers
26 views

Unity: Terrain Texturing Roads

The way I would texture a road within a given terrain is with a seperate mesh and a horizontally tileable texture such as this: Then make sure the texture on the edge of the road and the terrain ...
0
votes
1answer
741 views

Building a unity game without textures? [closed]

For a school project I have to build a unity game. Since the focus is on programming and building the game and not on creating graphics (we are supposed to find free models/textures online) I'm trying ...
0
votes
0answers
23 views

HLSL Texture Sampling Instability

I'm having some very strange behavior trying to calculate gradients in a shader. In both snippets, uv is the texture coordinate, duv is a float3 proportional to (1/width,1/height,0), c is tex2D(...
1
vote
0answers
15 views

How to import a texture to be used as occlusion map?

The same way normal maps need to be imported as "Normal map" in the import settings, how should I setup an Ambient Occlusion texture to correctly work? I've been searching around in the manual and ...
0
votes
0answers
28 views

Draw sprite outline with sprite renderer in opengl

I'm using a scenegraph with the visitor pattern to draw sprites in my 2D GameEngine. It works great. Now I'd like to render the lines of the cube the sprite is rendered onto. ...
2
votes
1answer
2k views

Is it reasonable to use a 2D texture as a lookup table in GLSL

I need a lookup table in a shader. The input values would be color values and the output other color values. Something like: ...
1
vote
2answers
2k views

Is it possible to use unnormalized texture coordinates from a GLES2 GLSL fragment shader?

I want to look up a texel from my GLES2 GLSL fragment shader using un-normalized texture coordinates (0-w, 0-h instead of 0-1, 0-...
0
votes
1answer
44 views

Black and white textures load as turquoise?

I have some black and white, and some grayscale textures, that are loading in unity as turquoise and white textures. What is causing this and how can I fix this? Also, can somebody verify that I am ...
2
votes
0answers
79 views

How to use large texture atlases in my shaders on mobile devices

This is a frustrating discovery. I have ported my desktop game to mobile and discovered that floating point precision in my shaders is not good. I have large animations which I store per frame on a ...
0
votes
1answer
500 views

LibGDX - Draw multiple textures with different positions with one shader?

currently I'm optimizing my render calls by drawing multiple textures with one shader. The background textures who all share the same position are no problem. But now I want to draw some Textures with ...
0
votes
1answer
59 views

How can I pack repeated textures into one texture efficiently?

I have an obj mesh with some textures, several of them are repeated(uvs are not within [0,1]). I'd like to merge all those textures into one texture and transform the uvs of obj.
1
vote
1answer
57 views

C++ OpenGL texture warping

I'm currently doing simple 3D drawing in OpenGL but I have hit a roadblock I just can't seem to get around. The problem is happening with trying to load .obj files. I've written my own .obj reader. I ...
0
votes
0answers
12 views

How to dynamically fit texture to screenspace projection of object?

I want to map a texture onto an object so that it gets fitted onto the entire screenspace projection of the object, i.e. for each vertical cross-section of the object as visible by the camera, the ...
0
votes
0answers
11 views

Unity - importing Blender materials

Could someone help me understand something? I'm a bit confused as to why Unity doesn't import simple coloured materials over from a .blend file. If I select my character model that I've brought into ...
3
votes
2answers
165 views

Is it possible to apply a texture to a 2D-sprite in unity 2-d?

I want to take an (animated) 2-d sprite and apply a texture to it. Basically, I want every non-transparent pixel to be covered by the texture (color is disregarded). I understand I can probably ...
1
vote
1answer
532 views

Unity procedural skybox shader texture stretching

I am using the procedural skybox shader that Unity provides, but have tweaked it so that I can have a cloud texture. The problem I have, is that the texture is not tiling correctly, even though it is ...
0
votes
1answer
304 views

LibGDX: Best Texture Sizes to use for highest resolution?

I have two texture atlases: 1 is 1024x1024 (mostly used for GUI elements), the other is 2048x2048 (for game objects like characters). I used Texture filter mip map linear on them. But when the ...
0
votes
1answer
36 views

How to rotate two textures at once in Libgdx, while keeping their relative positions the same?

I am trying to develop a game with cards, where the user can swipe left or right to tilt the cards like this. The red & white cross should stay in the same position on the yellow card as they tilt ...
1
vote
0answers
38 views

HLSL DXGI_FORMAT_A8_UNORM Texture - dark colors appear less opaque than white

I am trying to render a DXGI_FORMAT_A8_UNORM texture (precisely, a font bitmap) in multiple colors by specifying the color per vertex and then apply the alpha value ...
0
votes
1answer
574 views

LibGDX: How to use AssetManager with Texture Atlases?

A similar question was asked before, but I never saw an answer. How does one load individual texture regions that derive from a texture atlas using assetManager? I know that assetManager relies on a ...
0
votes
2answers
493 views

How can I have margins or padding around a texture in libgdx?

I am building a game using libgdx a 2048 like game and I draw the tiles of the board using textures (each texture represents a tile with the number 2 or 4 etc.) I would like tohave a small space ...
0
votes
0answers
33 views

How do i update opengl lightning equation in my fragment shader to make my texture less glossy and more like a fabric

I built a model in blender, and am currently trying to import it into my android app using assimp together with opengl, i dont have any issues with the importing but my goal is to make the object look ...
2
votes
1answer
2k views

Cocos2D - Fill a Sprite with a pattern

I have a CCSprite with a certain shape in Cocos2D and I would like to fill it with a pattern, as seen here: I've seen a lot of examples where they fill a rectangle with a pattern, or even a ...
0
votes
1answer
146 views

Issues to display a texture loaded with libPNG with opengles 3.0

I'm trying to load a texture loaded with libPNG on a XY coordinates. I know the width and the height of the texture (32x32). The texture is already loaded successfully and I have his Id. Here is my ...
0
votes
1answer
30 views

For creating a distant moon in a 3D game, is it better to use a model or texture?

I'm working on my indie game and I want to create a moon (it's a 3D game) however I am unsure if I should create a model and put it far away, or if I should use a texture on a plane and have it ...
1
vote
2answers
396 views

Proper way to update pixel array data

For a game that updates a board every frame I am calculating the next arrangement of board, updating pixel array data and render board as 2D texture to quad the size of the screen using OpenGL. I use:...
5
votes
2answers
3k views

Combinations for tiling two textures together

Hi I need to create seamless ground with grass and dirt. I can make two textures connect seamlessly one to another. My question is how to figure out all the combinations, like (left, top, bottom, left-...
0
votes
1answer
176 views

World space coords for 2d images

How can I make an 2d image using World space coords with a shape? Like a circle instead of a quad.In 3d you can modify the vertices but if I want a smooth circle there will be too much vertices. What ...
1
vote
1answer
152 views

Unity – How to keep sprites sharp and crisp, even while rotating

How can I maintain crisp, sharp edges on sprites, while avoiding the aliasing caused by rotation? None of the things I've tried produce a pixel-perfect non-rotated block, while allowing rotation ...
5
votes
1answer
178 views

How can I let players “scrape away” one texture to reveal another?

In this game I'm making, I want my players to be able to remove rust from an object based on collisions from another object such as a wire brush. Since it's a VR game, performance is key. I've ...
3
votes
1answer
47 views

Randomizing material across meshes - UE4

I have multiple instances of the same mesh which is using the same material. While looking for randomizing textures, I came across texture bombing and so the material in 1 wall looks fairly random. ...
0
votes
1answer
41 views

Direct3D & Assimp Texture is inverted weirdly!

I'm working on a rendering engine but even on the first mesh is something wrong. I use assimp for mesh importing! In the Assimp Viewer it looks correct: And in my software it looks like this: Look ...
0
votes
1answer
76 views

How to use 2D textures in OpenGL / WebGL for physics [closed]

Following along the answer here, it was mentioned about textures: They can also store things like velocities. For example, you can use a texture as a "flow field" for animating particles or other ...
0
votes
1answer
39 views

How to use textures in 2D games in WebGL

I have been trying to figure out how to structure the VBOs in WebGL, and think that keeping them all together in one if at all possible sounds like the best approach. Right now I'm thinking of having ...
0
votes
0answers
14 views

How to make texture visible in unity from blender file?

I've imported a tree to Unity that I've made in blender, but the texture of the tree is not visible. Could you please tell me how to make that texture visible? I am a beginer and I don't know how to ...
0
votes
0answers
61 views

Conversion from single-plane to multi-plane texture formats in Vulkan

How can we copy a texture in VK_FORMAT_R8G8B8A8_UNORM to VK_FORMAT_G8_B8R8_2PLANE_420_UNORM under the assumption that no color ...
1
vote
1answer
146 views

How can I create good looking football field lines?

I am trying to create a football field in a countryside with correct measurements of the lines. It's for my first person game. I have a terrain with mountains, trees, etc. and a flat surface for the ...
1
vote
1answer
567 views

Unity shaders - blend edges of tile textures stored in an atlas

I'm creating a tile based game. The tiles can have different textures. All the textures are loaded at startup and dynamically packed in a texture atlas (this is done to make modding easier). Each tile ...