vertex-shader Questions

2

Solved

I am using the ARB_debug_output extension. The driver gives me this warning: Program/shader state performance warning: Vertex shader in program 16 is being recompiled based on GL state. So, I tri...
Desegregate asked 12/8, 2019 at 2:1

2

Solved

I want to set each three vertex of a triangle from a mesh red, blue and green. As seen in the first part this tutorial which is for another language. This is the code they are using to set red, gr...
Culver asked 24/8, 2017 at 6:5

2

Solved

I am learning HLSL for DirectX 11, and I was wondering what exactly is the SV_POSITION that is the output for a Vertex Shader, and the input for a Pixel Shader. 1: Is this x,y,z of every pixel on ...
Bigler asked 2/10, 2017 at 14:25

4

Solved

I'm not entirely clear on the scope of enabling vertex attrib arrays. I've got several different shader programs with differing numbers of vertex attributes. Are glEnableVertexAttribArray calls loc...
Roesler asked 14/9, 2012 at 15:47

6

Solved

Can the rendering for a pixel be terminated in a vertex shader. For example if a vertex does not meet a certain requirement cancel the rendering of that vertex?
Linkboy asked 13/8, 2013 at 13:18

2

Solved

Code demonstrating issue (comment/uncomment out the gl_Position lines in the vertex shader) var scene; var book; var shaderMaterial; var renderer = new THREE.WebGLRenderer({ antiali...
Globate asked 29/6, 2015 at 15:27

1

Solved

I got this passthrough vertex shader I used from Apple's sample code: vertex VertexIO vertexPassThrough(device packed_float4 *pPosition [[ buffer(0) ]], device packed_float2 *pTexCoords [[ buffer...
Karee asked 28/8, 2019 at 12:35

0

I need to draw a line between two spritnodes while hand is pointing from one node to another with rendering or animation. The line drawing is working for me as I follow this link Bobjt's answer, An...
Sheffield asked 21/11, 2018 at 5:6

3

Solved

I have an STL file loaded into my scene with a single colour applied to a phong material I'd like a way of applying two colours to this mesh's material with a gradient effect applied on the Z axis...
Ugly asked 2/10, 2018 at 18:34

0

Apple documentation says the MTKView current drawable default size is derived from the current view’s size, in native pixels. Is there any way to make MTKView current drawable half of the device's ...
Hardset asked 20/6, 2018 at 10:57

2

Solved

I am trying to learn OpenGL and following this: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/ Up until the point where they started passing matrices to the vertex shader ...
Alexaalexander asked 16/8, 2014 at 18:22

2

Solved

What does setting gl_PointSize = 1.0 in vertex shader means or achieve? Does that mean the vertex itself is a pixel?
Haemolysin asked 1/2, 2018 at 14:7

1

Solved

I've been learning Metal for iOS / OSX, and I began by following a Ray Wenderlich tutorial. This tutorial works fine but it makes no mention of MTLVertexAttributeDescriptors. Now that I'm developi...
Eufemiaeugen asked 31/10, 2017 at 21:17

3

Solved

I've created a custom shader to be able to use a BlendMap with 4 different textures but I'm unable to get the shadows/lightning effects to work with it. What am I missing here? Or is there some ot...

1

Solved

I've been learning some basic metal rendering, and I am stuck with some basic concepts: I know we can send vertex data to a shader using: renderEncoder.setVertexBuffer(vertexBuffer, offset: 0, i...
Falconry asked 7/10, 2017 at 15:50

1

Solved

I'm trying to implement GLSL shader which would highlight the outer edges of rendered 3D mesh. The problem is that I do not have access to the OpenGL client side code so this must be done only in G...
Untraveled asked 6/10, 2017 at 10:39

2

Solved

Using Three.js, I have written a vertex shader that colors each point in a plane according to which quadrant of the screen a pixel is rendered. // vertex shader uniform float width; uniform float ...
Canzona asked 4/11, 2013 at 20:30

1

Solved

I'm using 'attribute' in a vertex shader to define a couple of variables like so: attribute mediump vec4 Position; attribute lowp vec4 SourceColor; Looking around, I found something called 'layout...
Toddle asked 1/3, 2017 at 7:21

1

I have two textures with different coordinates and sizes in my fragment shader: varying highp vec2 v_currentTextureCoords; varying highp vec2 v_backgroundTextureCoords; uniform sampler2D u_current...
Stonedeaf asked 9/12, 2016 at 9:50

1

I am trying to map texture to a 3D cube and trying to write shaders so that it has lighting and texture. I have tried writing texture shader only and it works. I have also tried lighting shader ...
Elkeelkhound asked 24/11, 2015 at 21:34

2

Solved

I am currently learning OpenGL with shaders (3.3). There is one thing i can't seem to work out though. I have read that using built-in variables like gl_Position and gl_FragCoords is deprecated in ...
Ruddy asked 25/6, 2014 at 19:5

1

Solved

Context I'm trying to draw Bezier curves in a canvas. I achieved to draw quadratic and cubic curves from within the shader, but I did have a uniform variable for each and every control point so fa...
Leavetaking asked 23/10, 2015 at 10:7

1

In both the OpenGL and Direct3D rendering pipelines, the geometry shader is processed after the vertex shader and before the fragment/pixel shader. Now obviously processing the geometry shader afte...
Armil asked 29/8, 2015 at 22:10

1

I have a displacement map on a plane 512px* 512px (100x100 segments) , as the image for the displacement map scrolls left the vertices snap to position of height not blend smoothly, I have been loo...
Live asked 20/4, 2015 at 13:30

3

I'm trying to learn how to program vertex shaders. In Apple's sample project they have a line to set a glUniform1f(uniforms[UNIFORM_TRANSLATE], (Glfloat)transY); Then this value is used in //...
Thunderstone asked 24/1, 2011 at 15:46

© 2022 - 2024 — McMap. All rights reserved.