That's some interesting information, thank you!
this would only work if all my textures are of the same size and format, right? so as soon as I wanted to render to a texture which is only half...
Type: Posts; User: Vexator
That's some interesting information, thank you!
this would only work if all my textures are of the same size and format, right? so as soon as I wanted to render to a texture which is only half...
I've read here as well in other places that attaching/detaching textures and render buffers from a frame buffer object is much faster than switching between fbo's.
I generally only ever render to...
I'm switching from regular 2D textures to 2D texture arrays. Texture creation and look-up in shaders works fine but I can't seem to get them working with fbo's.
Before, I've used...
Well turns out I had a bug in my uniform buffer update code.. the 3x3 normal matrix was uploaded as if it was a 4x4 matrix, which caused the other matrices to be corrupted during the update.
Thank...
Yeah, I'm aware of that. But I might apply non-uniform scaling to my model matrices at a later point, so that's why I'm doing it like that. Either way, I would like to understand why the normal...
this does indeed result in different shading!
but isn't that how one is supposed to calculate the normal matrix? also, shouldn't this result in the same shading compared with when I'm using...
turns out the problem seems to be the normal matrix!
if i replace this:
vertex.normal = transform.normal * in_normal;
by this:
vertex.normal =...
Thank you for your quick answer!
I adopted your suggestions, however, the problem remains.
Model and camera are positioned at the origin here, and no rotation is applied to the model:...
I'm rather embarrassed to ask for help on this but I can't figure out what the problem is. I want to simulate basic phong shading in GLSL. However, the resulting shading is influenced by the camera's...
Thank you, that does the trick!
I'm writing my first geometry shader in glsl. I want to extrude points uploaded to the gpu to two triangles facing the camera (spherical billboards). The idea is to calculate the three axes of the...
I've got the following uniform block in my vertex shader:
uniform Transform
{
mat4 view;
mat4 model;
mat4 bones[64];
} transform;
I'm using the latest GLM in my little engine.
I've got the following bit of code to rotate a first person camera:
vec2 delta = 0.01f*(vec2)mouseDelta;
m_player->rotate( quat(vec3(0,...
I've got the following hierachy:
TRANSFORM (translation, rotation, scaling)
- CAMERA (view matrix)
- MESH (model matrix)
The transform object has functions such as translate() and...
d'oh! thanks!
I've got the following vertex shader to perform hardware skinning. I'd like to declare the vertex attribute in_boneIds as ivec4 so that I can use the id's directly for the bone matrix look-up. This...
ok that makes sense, thank you all! i'll try mapping the buffer.
I can't use glGetUniform as uniform blocks don't have locations, and glGetActiveUniformBlock cannot be used to query an element's value. So how do I do it?
Also, is someone else having problems...
Found the solution... posting it here, in case anyone faces the same problem:
On ATI hardware, you have to call
glGetUniformBlockIndex( program, blockName )
glUniformBlockBinding( program,...
I use the folowing code to query all active uniforms in a program:
int activeUniforms;
char uniformName[256];
// get number of active uniforms
glGetProgramiv( program->id,...
Update: The tried the same with a uniform buffer which contains only a single float value and got the same result - buffer's value is correctly shown in the buffer view window but 0.0 in the shader.
thank you for your reply! i checked again and you're right, according to the buffer viewer the matrices are uploaded correctly and in the correct order. still, their values are all zero when used in...
Geometry is being drawn properly now but only as long as I don't use uniforms contained in uniform buffers.
This is how I set up uniform buffers:
shared_ptr<UniformBuffer>...
You're right, that's it! Thank you! :-*
My renderer, which is working fine on my desktop with an NVIDIA card, won't display anything but the clear color on my laptop with an ATI Mobility Radeon.
I'm creating a 3.2 forward-compatible...