glsl
Variable array index not possible in webgl shaders?
As the title says, I can\'t do vector_array[foo] (assuming foo is in-range and 开发者_Go百科integer) in webgl vertex shaders, correct?[详细]
2023-03-10 09:17 分类:问答sampler1D not supported in nVidia GLSL?
In the GLSL spec, and other sources about GLSL, sampler types are available in 3 dimensions: sampler1D, sampler2D, and sampler3D.[详细]
2023-03-10 07:15 分类:问答Retrieving data from GLSL vertex shader
I have lots of transparent primitives I want to sort before drawing, but to get the Z coordinate, the sorting key, I have perform in software all the transformations performed by the vertex shader in[详细]
2023-03-09 19:18 分类:问答How do I tell if the active texture is texture id 0 in GLSL?
I have model assets that are untextured and I am tired of rendering them as black without lighting. This is because if texture id 0 is bound and I ask the sampler it tells me its black. Later leading[详细]
2023-03-09 17:57 分类:问答How to design a simple GLSL wrapper for shader use
UPDATE: Because I needed something right away, I\'ve created a simple shader wrapper that does the sort of thing I need. You can find it here: ShaderManager on GitHub. Note that it\'s designed for Obj[详细]
2023-03-09 05:04 分类:问答Knowing which pixel or UV you are on with GLSL?
Right now I can obtain the color of the 开发者_Go百科neighbouring pixelby doing color = texture2D(backBuffer, vec2(gl_TexCoord[0].x + i,gl_TexCoord[0].y + j);[详细]
2023-03-08 21:30 分类:问答How does blending work with GLSL ES fragment shaders in WebGL?
I\'m trying to get a simple effect to display using WebGL. Naturally, this means I\'m using the fragment shader language defined in the GLSL ES 1.0 specification.[详细]
2023-03-08 18:36 分类:问答GLSL Phong Light, Camera Problem
I Just started write a phong shader vert: varying vec3 normal, eyeVec; #define MAX_LIGHTS 8 #define NUM_LIGHTS 3[详细]
2023-03-08 12:34 分类:问答glsl Vertex Lighting Shader
I am having a problem with some simple vertex point light in a glsl shader. I am still confused by what coordinate space to do the lighting in.[详细]
2023-03-08 00:38 分类:问答GLSL - computing normals of fragments
I\'m trying to create a program that displays a globe with terrain, and does all Lat/Long/Alt to XYZ (ECEF) on the GPU.[详细]
2023-03-07 13:52 分类:问答