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

learn more… | top users | synonyms (1)

3
votes
5answers
820 views

XNA 2D Spritesheet drawing rendering problem

I'm making a tile-based game, using one spritesheet containing all tile graphics. Each tile has a size of 32x32 pixels. The main problem is: when I draw the tile to the screen, if the tile position x ...
6
votes
1answer
632 views

FBO rendering different result between Galaxy S2 and S3

I'm working on a pong game and have recently set up FBO rendering so that I can apply some post-processing shaders. This proceeds as so: Bind texture A to framebuffer Draw balls Bind texture B to ...
2
votes
1answer
445 views

Tutorial on OpenGL texture formats

Looking at the documentation glGetTexImage(), one can see that there are plenty of available texture formats. GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D_ARRAY, ...
1
vote
1answer
789 views

Unity3D and Texture2D. GetPixel returns wrong values

I'm trying to use Texture2D set and get colors, but I encountered a strange behavior. Here's the code to reproduce it: Texture2D tex = new Texture2D(2,2, TextureFormat.RGBA32 ,false); Color col = ...
1
vote
1answer
145 views

TexturePacker ignores extensions

I'm using TexturePacker in one of my games, though when packing a bunch of textures their extension is kept in the data file. So when I want to find a texture I need to search for "image.png" instead ...
1
vote
2answers
664 views

Making a 2D game with responsive resolution

I am making a 2D game, however I wish for it to be resolution agnostic. My target resolution i.e. where things look as intended is 1600 x 900. My ideas are: Make the HUD stay fixed to the sides no ...
2
votes
2answers
934 views

Splitting a texture atlas into seperate images [duplicate]

Possible Duplicate: How to decompose sprite sheet I'm doing a port of an existing game and the designer no longer has all of the original art; he only has the resulting texture atlases he ...
2
votes
2answers
278 views

Assigning a different texture based on picking

I'm making a game using XNA. I have some simple objects like cube and sphere, and I would like to change the texture of one face of these objects based on picking. That is, when the cursor is over ...
1
vote
1answer
794 views

Image loaded from TGA texture isn't displayed correctly

I have a TGA texture containing this image: The texture is 256x256. So I'm trying to load it and map it to a cube: #import <OpenGL/OpenGL.h> #import <GLUT/GLUT.h> #import ...
2
votes
1answer
263 views

XNA running slow when making a texture

I'm using XNA to test an image analysis algorithm for a robot. I made a simple 3D world that has a grass, a robot, and white lines (that are represent the course). The image analysis algorithm is a ...
1
vote
1answer
282 views

fragment shader with SNORM textures

I want to apply SNORM texture by using GL_TEXTURE_3D as a target, what will be the fragment shader for the same? Also, what should be the data type of texture data?
2
votes
2answers
1k views

OBJ model loaded in LWJGL has a black area with no texture

I have a problem with loading an .obj file in LWJGL and its textures. The object is a tree(it's a paid model from TurboSquid, so I can't post it here,but here's the link if you want to see how it ...
1
vote
2answers
195 views

How to shade a texture two different colors?

To give an example of what I'm asking about, I'll use Saints Row 3 since I've been playing that lately. In that game you can customize your looks and your car's appearance a lot. Your coat can have ...
4
votes
2answers
937 views

Blending textures together, texture fade over / fade in

What is the best way to render a texture overlapping effect? Like in this example: I want either the grass to fade in to the snow texture, or the other way around. No rough edges. Somehow make ...
2
votes
2answers
2k views

OpenGL : sluggish performance in extracting texture from GPU

I'm currently working on an algorithm which creates a texture within a render buffer. The operations are pretty complex, but for the GPU this is a simple task, done very quickly. The problem is that, ...
0
votes
1answer
157 views

OpenGL : Keeping alpha in a render buffer

In my current task, i need to render a texture into a render buffer, in order to work on it (apply special filters) there. The result is then considered a "new texture", which is later displayed. ...
1
vote
1answer
244 views

XNA shield effect with a Primative sphere problem

I'm having issue with a shield effect i'm trying to develop. I want to do a shield effect that surrounds part of a model like this: http://i.imgur.com/jPvrf.png I currently got this: ...
7
votes
1answer
563 views

Spritebatch drawing sprite with jagged borders

Alright, I've been on the making of a sprite class and a sprite sheet manager, but have come across this problem. Pretty much, the project is acting like so; for example: Let's take this .png ...
14
votes
1answer
588 views

Suitability of ground fog using layered alpha quads?

A layered approach would use a series of massive alpha-textured quads arranged parallel to the ground, intersecting all intervening terrain geometry, to provide the illusion of ground fog quite ...
1
vote
1answer
326 views

how to use a mask texture?

A texture pack for a sponza model contains mask textures (black and white). I guess that I should read only a red channel from that texture, right ? I use deferred rendering and for shading ...
1
vote
1answer
218 views

Confusion on HLSL Samplers. Can I Set Samplers Inside Functions?

I'm trying to create a system where I can instance a quad to the screen, however I've run into a problem. Like I said, I'm trying to instance the quad, so I'm trying to use the same geometry several ...
1
vote
2answers
260 views

Texturize a shape of multiple triangles in 2D

This is an example of a shape consisting of multiple points, triangles and eventually a shape: Red Dots = Vector3 (X, Y, Z) or Vector2 (X, Y) If I have a Texture of a certain size, how do I ...
2
votes
2answers
5k views

Unity Android: Truecolor texture performance hit and alternatives for truecolor

After integrating the graphics assets to my application, I noticed that when the textures are compressed they look very bad compared to truecolor. This happens to all the textures and it did not seem ...
1
vote
0answers
177 views

loading a heightmap as texture in shader

I have a height map of 256x256, containing, foreach cell, not only height as a normal float value ( not 0-1 ) and also 2 gradient values ( for X and Y ), also as normal float values ( not 0-1 ). I ...
12
votes
2answers
1k views

Speeding up procedural texture generation

Recently I've begun working on a game that takes place in a procedurally generated solar system. After a bit of a learning curve (having neither worked with Scala, OpenGL 2 ES or Libgdx before), I ...
5
votes
2answers
2k views

Unity: how to apply programmatical changes to the Terrain SplatPrototype?

I have a script to which I add a Terrain object (I drag and drop the terrain in the public Terrain field). The Terrain is already setup in Unity to have 2 PaintTextures: 1 is a Square (set up with a ...
3
votes
1answer
1k views

How do I generate mipmap .png and model .obj files for LibGDX?

I'm playing a bit with LibGDX (OpenGL ES 2.0 wrapper for Android). I found some sample code which used prepared files to load models and mipmap textures for them, e.g., at ...
1
vote
0answers
59 views

A tool to select points on texture, and obtain 0.0f .. 1.0f UV coordinates [closed]

If there is a need to create about 40 sets of UV coordinates for 40 different images. The sets can have 4 to ~16 UV points. Is there some way to make this easier? A tool similar to Inkscape would be ...
3
votes
1answer
801 views

GLSL custom interpolation filter

I'm currently building a fragment shader which is using several textures to render the final pixel color. The textures are not really textures, they are in fact "input data" to be used in the formula ...
6
votes
2answers
899 views

UV texture mapping with perspective correct interpolation

I am working on a software rasterizer for educational purposes and I am having issues with the texturing. The problem is, only one face of the cube gets correctly textured. The rest are stretched ...
4
votes
2answers
240 views

How do you clean up textures that are too photo-realistic to match the rest of your game assets?

I was browsing for textures online and notice most of it are too photo-realistic and many of them is just photo of real thing. I'm sure there some "cleanup" process for this type of texture using ...
2
votes
2answers
2k views

Dynamic Terrain Texture

I've been looking at a 2D physics game called 'Hill Climb Racing' (Android and iOS) and was wondering how they went about texturing the terrain? I've had a think about it and I've come up with ...
1
vote
0answers
104 views

Rendering text with stb_font results in glitches

I'm trying to render text with OpenGL and an "inline"-font taken from the stb_fonts The relevant code for initializing the font & rendering: LabelFactory::LabelFactory() { static unsigned ...
1
vote
1answer
302 views

Problem when texturing triangles using glVertexPointer()

I'm having a problem for displaying a single quad, here is how i do : //note: this code is only for 2 triangles, while on picture there is 4 triangles float tex_coord[] = { 0.0, 0.0, //3 0.0, ...
1
vote
1answer
426 views

Detecting pixels in a rotated Texture2D in XNA?

I know things similar to this have been posted, but I'm still trying to find a good solution... I'm drawing Texture2D objects on the ground in my game, and for Mouse-Over or targeting methods, I'm ...
0
votes
1answer
593 views

Why do my 512x512 bitmaps look jaggy on Android OpenGL?

This is sort of driving me nuts, I've googled and googled and tried everything I can think of, but my sprites still look super blurry and super jaggy. Example: Here: ...
23
votes
6answers
6k views

Creating a retro-style palette swapping effect in OpenGL

I'm working on a Megaman-like game where I need to change the color of certain pixels at runtime. For reference: in Megaman when you change your selected weapon then main character's palette changes ...
0
votes
1answer
102 views

How to Draw texture between 2 Vector3

My scenario: RTS combat style, 1 unit fires beam on another unit My problem is i want to draw a flat texture between 2 Vector3 points. I have looked at various Billboarding styles but that doesn't ...
0
votes
3answers
143 views

XNA Inheritence via Texture2D

As you know to draw a Texture2D mostly an Origin, scale-factor, rotation-value and color is necessary. To inherite a new class ATexture2D from Texture2D with adding this parameters, can cause ...
7
votes
2answers
253 views

2-components color model

RGB is the natural color model for OpenGL. But a lot of other color models exist. For example, CMY(K) for printers, YUV for JPEG, the little cousins YCbCr and YCoCg, HSL & HSV from the 70's, and ...
4
votes
3answers
184 views

How to read BC4 texture in GLSL?

I'm supposed to receive a texture in BC4 format. In OpenGL, i guess this format is called GL_COMPRESSED_RED_RGTC1. The texture is not really a "texture", more like a data to handle at fragment ...
0
votes
2answers
357 views

LWJGL - OpenGL - Texture shading

I want to use LWJGL to create a shader that all it does is change the color of the given texture. For example I tell it to draw the letter A using a sprite sheet then I can tell the shader to draw the ...
1
vote
3answers
584 views

SDL_image & OpenGL Problem

i've been following tutorials online to load textures using SDL and display them on a opengl quad. but ive been getting weird results that no one else on the internet seems to be getting... so when i ...
3
votes
2answers
637 views

Need to produce an animated texture of Water where each image tiles in all directions

I need to produce a 2D 'animated' texture of "water" for a game in which each image tiles in 'all' directions, much like those produced by the Caustics Generator, but with the power and flexibility of ...
3
votes
1answer
953 views

Z Order in 2D with orthographic projection and texture atlas

I am working with a 2D game in OpenGL ES and have a question about z-order together with a texture atlas. I am using an orthographic projection because I want pixel-perfect rendering of 2D sprites, ...
0
votes
1answer
727 views

Multiple textures on a mesh created in blender and imported in xna

I created a cube in blender which has multiple images applied to its faces. I am trying to import the model into xna and get the same results as shown when rendering the model in blender. I go through ...
3
votes
1answer
158 views

Algorithm for approximating sihlouette image as polygon [duplicate]

Possible Duplicate: Is there any heuristic to polygonize a closed 2D raster shape with n triangles? I want to be able to analyze a texture in real time and approximate a polygon to ...
0
votes
1answer
198 views

TGA loader: reverse y-axis

I've written a TGA image loader in Java which is working perfectly for files created with GIMP as long as they are saved with the option origin set to Top Left (actually TGA files are meant to be ...
6
votes
1answer
275 views

Text on a model

I am trying to put some text on a Model and I want it to be dynamic. Did some research and came up with drawing the text on the texture and then set it on the model. I use something like this: public ...
1
vote
1answer
213 views

How to draw textures on a model

The following code is a complete XNA 3.1 program almost unaltered to that code skeleton Visual Studio is creating when creating a new project. The only things I have changed are imported a .x model ...