Category "glsl"

Trying to implement shadow using OpenGL; depth texture seems correct but shadow is not displaying

trying to implement shadow. I checked my depth texture on a quad, and it seems correct, but the shadow is not displaying. I check my shadow vertex and fragment

How do multiple buffers for attributes work in openGL (ES) shaders and C++ api

I have the proverbial cube sample and have been writing some code to test it all and learn more about shaders. My question is about how multiple buffers are ass

How to include shaders as external files

Is there a way to include this shader code as an external vertexShader.js without quotes and include between "script" tags? var vertCode = 'attribute vec3 coor

Passing unsigned int input attribute to vertex shader

In a typical building of a vertex-array-buffer, I am trying to pass an unsigned int attribute along side other classical ones (vertex, normal, texture coordinat

translation in GLSL shader

I'm trying to move figure inside vertex GLSL shader: layout(location = 0) in vec3 Position; layout(location = 1) in vec3 offset; uniform mat4 ProjectionViewMa

What could be the source of this aliasing?

I am manually raytracing a 3D image. I have noticed that, the farther from the 3D image I am, the bigger the aliasing. This 3D image is basically a voxelized r

Creating a Gradient Color in Fragment Shader

I'm trying to achieve making a gradient color as the design apps (Photoshop for example) does, but can't get the exact result i want. My shader creates very ni

GLSL Shader does not compile, Java and LWJGL shader error

I've encountered this error a few times now when compiling my shaders. Here is the infoLog/Error Vertex shader failed to compile with the following errors: ERRO

How to Using the #include in glsl support ARB_shading_language_include

I wan't to use the #include macro to include shader files in glsl, and I heard there is a ARB_shading_language_include extension support the #include macro. Is

glsl arithmetic operator

Why does this line: float x = 1 - gl_Color.x; give: (26): error: Could not implicitly convert operands to arithmetic operator

OpenGL, diffuse shader

I'm trying to implement very simple diffuse shader in GLSL/openGL. Here's what I got: Vertex shader: #version 130 in vec3 vertPos3D; in vec3 vertNormal3D; un