textures

Is it possible to use 2 textures (one on top of the other) as a Material without using custom Shaders?

时光怂恿深爱的人放手 提交于 2019-12-12 03:42:52
问题 I'm learning three.js and I've done a few a examples on it and basic shaders (One being Codrop's "the aviator" tutorial), but right now I'm stumped trying to create a simple cube with 2 textures at once. I would like to use 2 transparent .png textures at the same time for each of the square's face. Is this possible without recurring to custom shaders? I already saw this answer, but I've had no success getting it to work correctly because of it's complexity and being rather new to shaders. For

Trying to load an OSG model with textures allocated in textureUnit1

半世苍凉 提交于 2019-12-12 03:34:33
问题 I want to render an Openscenegraph model with textures under two constraints: 1) Using shaders (opengles20) 2) Uploading the textures to the textureUnit1 on the GPU (NO the default textureUnit0) I thought I was doing right but still I am getting non textured models (only the mesh). Here are the shaders (notice that I use gl_MultiTexCoord1): static const char gVertexShader1[] = { "varying vec2 texCoords;\n" "void main()\n" "{\n" " texCoords = gl_MultiTexCoord1.st;\n" " gl_Position = ftransform

QOpenGLTexture::allocateStorage causes GL_INVALID_VALUE error

末鹿安然 提交于 2019-12-12 03:28:59
问题 I've distilled this to trivial Qt code in which the only interesting thing is several lines in synchronize() handling a texture. I get a GL_INVALID_VALUE from the allocateStorage line. Anyone knows why? I suspect it's probably due to the parameters I pass to this function. My code: main.cpp : #include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQuickFramebufferObject> #include <QOpenGLFramebufferObject> #include <QOpenGLFunctions> #include <QOpenGLTexture> class MyItem :

Texture for Superpixels?

一曲冷凌霜 提交于 2019-12-12 02:55:19
问题 Since superpixels have irregular shape, I am not sure how to extract the texture features for them. All the techniques that I have found online require a rectangular image for extracting texture information. 回答1: There are at least two methods I can think of. Either compute the filter response on the entire undivided image and group the responses in each superpixel, or compute color histogram of the superpixel as an approximation for a texture feature. 回答2: There is also another way. Find

Portably and Correctly Getting Maximum 1D/2D/3D/Cube Texture Resolution in OpenGL

a 夏天 提交于 2019-12-12 02:50:27
问题 I am interested in getting the maximum hardware-supported resolution for textures. There are, as far as I have found, two mechanisms for doing something related to this: glGetIntegerv(GL_MAX_TEXTURE_SIZE,&dim) for 2D (and cube?) textures has served me well. For 3D textures, I discovered (the hard way) that you need to use GL_MAX_3D_TEXTURE_SIZE instead. As far as I can tell, these return the maximum resolution along one side, with the other sides assumed to be the same. It is unclear what

the method of calculate the GLCM of a specific point in a image

て烟熏妆下的殇ゞ 提交于 2019-12-12 02:46:50
问题 As we know, GLCM (Grey Level Co-occurrence Matrix) describes the texture characteristics of images. But in usual, the calculation of GLCM in OpenCV, matlab often aim on a picture. But now I just want to get GLCM value of every single point inside the image, but how to get it? 回答1: If I understand your problem correctly, then perhaps you can just set the pixels outside your region of interest to NaN - these pixels are ignored by MATLAB when calculating the GLCM. For example: >> im = eye(7) im

Loading HDRi maps in Cocos3D

不问归期 提交于 2019-12-12 02:42:11
问题 I want to load an HDRi map (similar to Google Maps) in an iPhone application, and then I want to be able to load some 3D characters to play around in the scene. You can see here an example of what I would like to load: http://www.hdri-hub.com/hdrishop/freesamples/freehdri/item/117-hdr-041-path-free Currently I'm using Cocos3D for loading 3D models from Blender through POD export files, so maybe there is a way to load HDRi in Cocos3D. I found out this class CC3STBImage which can be used to

qt multiple QGLShaderProgram for one texture

眉间皱痕 提交于 2019-12-12 02:34:48
问题 I use two QGLShaderProgram for processing the texture. ShaderProgram1->bind(); // QGLShaderProgram ShaderProgram2->bind(); glBegin(GL_TRIANGLE_STRIP); ... glEnd(); ShaderProgram1->release(); ShaderProgram2->release(); The texture should be processed with Shaderprogram1 and then ShaderProgram2. But when I call ShaderProgram2->bind() automatically fires ShaderProgram1->release() and only one shader works. How do I bind both shaders? 回答1: You don't. Unless these are separate shaders (and even

directx11 - can't set Texture2D as ShaderResourceView?

六月ゝ 毕业季﹏ 提交于 2019-12-12 02:32:44
问题 I have written a little DirectX RenderEngine, to render and texture simple Polygons. The texturing worked with CreateDDSTextureFromFile(.dds) very well. Now, I try to set up a Texture and a corresponding ShaderResourceView from a Memory buffer. Creating the Texture2D works, but then, CreateShaderResourceView ALWAYS fails . Also tried to call it with 2nd param set to NULL, also fails. I was trying to figure out what's wrong here for the whole week. I hope somebody can help me here. [Code] :

Opengl-es Drawing to texture

余生颓废 提交于 2019-12-12 02:26:34
问题 In opengl-es 2.0 can a fbo rendering to a texture, use a texture target that is larger than the screen? If so, is it possible to draw a textured quad, filling up the fbo-texture corner to corner? If not possible is it possible to do this in another way in opengl-es? I have some layered procedurally generated graphics at load time that I would like to combine into single textures in order to save on performance at draw time. 回答1: Yes, absolutely. As long as the texture has a color-renderable