Tagged Questions
2
votes
1answer
151 views
How do I use unpackHalf2x16?
I'm trying to use (un)packHalf2x16, without success so far. I'm drawing with:
glVertexAttribIPointer(0, 2, GL_UNSIGNED_INT, 0, 0);
glEnableVertexAttribArray(0);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
...
2
votes
1answer
341 views
Fog shader camera problem
I have some difficulties with my vertex-fragment fog shader in Unity. I have a good visual result but the problem is that the gradient is based on the camera's position, it moves as the camera moves. ...
1
vote
1answer
85 views
Render 2 images that uses different shaders
Based on the giawa/nehe tutorials, how can I render 2 images with different shaders. I'm pretty new to OpenGl and shaders so I'm not completely sure whats happening in my code, but I think the shaders ...
1
vote
1answer
128 views
OpenGL and atlas
I'm trying to draw element from a texture atlas with OpenGL ES 2.
Currently, I'm drawing my elements using something like that in the shader:
uniform mat4 uCamera;
uniform mat4 uModel;
attribute ...
0
votes
1answer
133 views
translate-scroll repeated 2d texture using opengl shader
I managed to implement an infinite 2d texture scrolling using the following shader. btw I'm using cocos2d-x 2.2.1.
The vertex shader:
attribute vec4 a_position;
attribute vec2 a_texCoord;
#ifdef ...
0
votes
1answer
313 views
Using Shader causes triangle to disappear
The following is my rendering code.
Private Sub GameRender()
GL.Clear(ClearBufferMask.ColorBufferBit + ClearBufferMask.DepthBufferBit)
GL.ClearColor(Color.SkyBlue)
...
0
votes
1answer
375 views
OpenGL Tessellation makes point
A little problem with my tessellation shader. I try to implement a simple tessellation shader but it only makes points.
Here's my vertex shader :
out vec4 ecPosition;
out vec3 ecNormal;
void ...
4
votes
0answers
68 views
Slow uniform array
I'm trying to use an uniform array of matrices in my compute shader. However, it's really slow. I've narrowed it down to this lines of code:
uniform mat4 someMatrixArray[64];
...
vec4 result = ...
1
vote
0answers
190 views
Normal mapping does not work correctly using GLSL and OpenGL
Hello I wrote a simple OpenGl program using GLSL to render a simple uv mapped plane using the normal mapping technics.
Here's the display with a simple phong shading (without normal mapping) :
Now ...
1
vote
0answers
184 views
Shadow mapping implementation not working?
I am trying to implement Shadow Mapping in my program using Java/LWJGL/OpenGL/GLSL, but I cannot get it to work properly. Let's start off with a screenshot first, then the relevant code and lastly ...
1
vote
0answers
153 views
GLSL, Internal error: assembly compile error for fragment shader at offset 513
My vertex and fragment shaders link correctly. When I try and link my shader program I get the error: "Internal error: assembly compile error for fragment shader at offset 513".
Pastebin of fragment ...
1
vote
0answers
125 views
Matrix array doesn't seem to get populated
I'm trying to stream an array of matrices to a vertex shader, but it seems that only the first matrix works. What could be the problem? I suspect that I upload the matrices in a wrong way.
C#
...
1
vote
0answers
876 views
Multiple Render Targets, Multiple Fragment Shaders
I render a normal and a depth image of a scene. Then I want to reuse these two images to do further texture/image processing in a second fragment shader. I use a framebuffer with 3 textures attached ...
1
vote
0answers
1k views
ssao implementation
I try to implement a ssao based on this tutorial: link I use a deferred rendering and world coordinates for shading calculations. When saving gbuffer a vertex shader output looks like this:
...
0
votes
0answers
40 views
Chroma Keying Shader
I want to apply chroma keying shader for my application. For this I used GPUImage plugin. In that I found GPUImageChromaKeyingBlendFilter class to satisfy my needs.
In plugin, ...
0
votes
0answers
24 views
opengl output to texture with 4 levels of depth
i'm building a game where transparency is important.
I can live with being restricted to four levels of depth and my current plan is to do two passes:
1. render everything to a texture using ...
0
votes
0answers
57 views
Diffuse Mapping in a Game
I want to figure out the diffuse maps of some rusted objects that I plan to render in my game arena. I have taken the images of some sample objects and have also scanned them for a model of the ...
0
votes
0answers
70 views
Finding the correct transformation in vertex shader for easy sprite drawing
Before we begin the question: Here are the necessary meta information:
I want to use JOGL / OpenGL to create a library that is only, and I repeat only, able to draw and manipulate 2D sprites on a 2D ...
0
votes
0answers
58 views
Minimum/maximum depth of tile in OpenGL
I'm trying to implement tiled deferred rendering, but I'm stuck on calculating the min/max depth for each tile. I'm using compute shader for this. This is my shader code:
#version 430
#define ...
0
votes
0answers
92 views
How to fix problem in serpentine case using Blinn/Loop algorithm
I'm trying to implement Blinn/Loop algorithm to render cubic bezier on shader. I calculate the curve type using code below (v0, v1, v2, v3 are cubic bezier segment):
CurveType ...
0
votes
0answers
268 views
Fragment shader not applying intended color to output
I started working with OpenGL recently, having previously worked on mods. I'm using GLFW3, GLEW, and whatever tutorials I can find. So far I've come up with this code:
//Headers
#include ...
0
votes
0answers
254 views
GLSL gl_ModelViewMatrix breaks my code?
So I have the following shaders which work (to the extent that they are completed anyway).
//Vertex Shader
uniform float offset;
void main()
{
gl_TexCoord[0].t = gl_MultiTexCoord0.t;
...
0
votes
0answers
110 views
Depth Test not working properly on Nvidia
So, I send a Development Test of my in-dev game to some friends, and they found out that the Depth Test in OpenGL does not work on Nvidia.
I use my own matrices and sent them to the shader, and at ...
0
votes
0answers
300 views
Making shaders work for both ATI and NVIDIA in Blender Game Engine
Unfortunately coding OpenGL shaders is more strict for ATI cards. I am trying to get this code from this thread http://blenderartists.org/forum/showthread.php?245954-preethams-sky-impementation-HDR to ...