textures

How check the .spriteatlas sizes generated by Xcode?

限于喜欢 提交于 2020-01-02 16:52:10
问题 I'm using texture atlas for handling my images. I didn't created the atlas by myself however I let Xcode to do this for me: My question is: How can I see this file or know its properties (I mean, sizes and weight)? What if and how can I know if the sizes exceed the maximum size of 4098 x 4098 pixel? 来源: https://stackoverflow.com/questions/33561727/how-check-the-spriteatlas-sizes-generated-by-xcode

OpenGl 16 bit display via Tao/C#

倾然丶 夕夏残阳落幕 提交于 2020-01-02 14:10:14
问题 I have some scientific image data that's coming out of a detector device in a 16 bit range which then gets rendered in an image. In order to display this data, I'm using OpenGL, because it should support ushorts as part of the library. I've managed to get this data into textures rendering on an OpenGL 1.4 platform, a limitation that is a requirement of this project. Unfortunately, the resulting textures look like they're being reduced to 8 bits, rather than 16 bits. I test this by generating

Creating and loading .pngs in RGBA4444 RGBA5551 for openGL

蹲街弑〆低调 提交于 2020-01-02 09:11:00
问题 I'm creating an openGL game and so far I have been using .pngs in the RGBA8888 format as texture sheets, but those are too memory hungry, and my app crashes frequently. I read in Apple's site that such format such be used just when too much quality is needed, and recommends to use RGBA4444 and RGBA5551 instead ( I already converted my textures to PVR but the quality loss is too great in most of the sprite sheets). I only need to use GL_UNSIGNED_SHORT_5_5_5_1 or GL_UNSIGNED_SHORT_4_4_4_4 in my

Texture Image processing on the GPU?

巧了我就是萌 提交于 2020-01-02 03:37:12
问题 I'm rendering a certain scene into a texture and then I need to process that image in some simple way. How I'm doing this now is to read the texture using glReadPixels() and then process it on the CPU. This is however too slow so I was thinking about moving the processing to the GPU. The simplest setup to do this I could think of is to display a simple white quad that takes up the entire viewport in an orthogonal projection and then write the image processing bit as a fragment shader. This

Video as texture in OpenGLES2.0

笑着哭i 提交于 2020-01-01 19:20:32
问题 I want to place video as texture to object in OpenGLES 2.0 iOS. I create AVPlayer with AVPlayerItemVideoOutput , setting NSDictionary *videoOutputOptions = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:kCVPixelFormatType_32BGRA], kCVPixelBufferPixelFormatTypeKey, [NSDictionary dictionary], kCVPixelBufferIOSurfacePropertiesKey, nil]; self.videoOutput = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:videoOutputOptions]; Than I get CVPixelBufferRef for each

LibGDX texture blending with OpenGL blending function

扶醉桌前 提交于 2020-01-01 18:59:12
问题 In libGdx, i'm trying to create a shaped texture: Take a fully-visible rectangle texture and mask it to obtain a shaped textured, as shown here: Here I test it on rectangle, but i will want to use it on any shape. I have looked into this tutorial and came with an idea to first draw the texture, and then the mask with blanding function: batch.setBlendFunction(GL20.GL_ZERO, GL20.GL_SRC_ALPHA); GL20.GL_ZERO - because i really don't want to paint any pixels from the mask GL20.GL_SRC_ALPHA - from

Mapping a stereographic projection to the inside of a sphere in ThreeJS

三世轮回 提交于 2020-01-01 18:54:22
问题 When it comes to 3D animation, there are a lot of terms and concepts that I'm not familiar with (maybe a secondary question to append to this one: what are some good books to get familiar with the concepts?). I don't know what a "UV" is (in the context of 3D rendering) and I'm not familiar with what tools exist for mapping pixels on an image to points on a mesh. I have the following image being produced by a 360-degree camera (it's actually the output of an HTML video element): I want the

I thought *.DDS files were meant to be quick to load?

≡放荡痞女 提交于 2020-01-01 05:47:26
问题 Ok, so I'm trying to weigh up the pro's and con's of using various different texture compression techniques. I spend 99.999% of my time coding 2D sprite games for Windows machines using DirectX. So far I have looked at texture packing (SpriteSheets) with alpha-trimming and that seems like a decent way to get a bit more performance. Now I am starting to look at the texture format that they are stored in; currently everything is stored as *.PNGs. I have heard that *.DDS files are good,

Unity build project game 2d to apk with huge size because textures

我怕爱的太早我们不能终老 提交于 2020-01-01 05:35:08
问题 I have a project unity game 2d. when i build it with 70 MB in apk, i think it too large with my game. I try to delete some pictures (textures for backgrounds of game) about 6MB in my folder Assets\Resources (because my game load resource dynamically base on current level). Then rebuild it to apk. And it get 30MB. I wonder about it. this is editor log when i build apk with 70MB Textures 182.1 mb 95.7% Meshes 0.0 kb 0.0% Animations 0.0 kb 0.0% Sounds 1.1 kb 0.0% Shaders 42.5 kb 0.0% Other

Android Opengl-es loading a non-power of 2 texture

懵懂的女人 提交于 2020-01-01 04:38:06
问题 I have an app that I've been repeatedly playing with in android, it uses opengl-es. Currently I load textures from a bitmap like so: //Load up and flip the texture - then dispose the temp Bitmap temp = BitmapFactory.decodeResource(Deflecticon.getContext().getResources(), resourceID); Bitmap bmp = Bitmap.createBitmap(temp, 0, 0, temp.getWidth(), temp.getHeight(), flip, true); temp.recycle(); //Bind the texture in memory gl.glBindTexture(GL10.GL_TEXTURE_2D, id); //Set the parameters of the