Top "Vertex-shader" questions

Vertex shaders are executable programs that execute as part of the programmable geometry pipeline in modern graphics APIs such as e.g. Direct3D or OpenGL.

glGetAttribLocation returns -1 when retrieving existing shader attribute

I'm trying to pass in attributes to my vertex shader but for some reason it keeps giving me a -1 …

c++ opengl shader vertex-shader
DirectX 11 Pixel Shader What Is SV_POSITION?

I am learning HLSL for DirectX 11, and I was wondering what exactly is the SV_POSITION that is the output …

directx-11 hlsl vertex-shader pixel-shader
GLSL passing texture coordinates from vertex shader

What I'm trying to accomplish: Drawing the depth map of my scene on top of my scene (so that objects …

opengl glsl texture-mapping vertex-shader
Rotate Normals in Shader

I have a scene with several models with individual positions and rotations. Given normals, the shaders apply simple bidirectional lighting …

glsl shader lighting vertex-shader normals
Apply color gradient to material on mesh - three.js

I have an STL file loaded into my scene with a single colour applied to a phong material I'd like …

javascript three.js vertex-shader geometry-shader
How to get a value from vec3 in vertex shader? OpenGL 3.3

I have the following vertex shader: #version 330 layout (location = 0) in vec3 Position; uniform mat4 gWVP; out vec4 Color; void main() { …

c++ opengl glsl vertex-shader
HLSL float array packing in constant buffer?

people. I have a problem passing a float array to vertex shader (HLSL) through constant buffer. I know that each "…

directx hlsl directx-11 vertex-shader
GLSL vertex shader cancel render

Can the rendering for a pixel be terminated in a vertex shader. For example if a vertex does not meet …

opengl glsl terminate vertex-shader
How can I feed compute shader results into vertex shader w/o using a vertex buffer?

Before I go into details I want outline the problem: I use RWStructuredBuffers to store the output of my compute …

hlsl directx-11 vertex-shader compute-shader directcompute
GLSL 1.5 & OpenGL 3.3: Passing color to vertex shader seems to fail

I have a problem when passing vertex attributes to the running shader program. I'd like to pass two attributes, the …

opengl attributes colors glsl vertex-shader