voxelinc / voxellancer

A Game about Voxels in Space
http://voxellancer.chrdw.de
14 stars 2 forks source link

Shader question #613

Closed psieg closed 10 years ago

psieg commented 10 years ago

can somebody please check this out and explain it to me...

psieg commented 10 years ago

indeed. it should be though the condition is if (v_faces == uint(2)) {, the assignment is uint32_t faces = 2; Where does this go wrong? transfer cpu-gpu? reference: red

mrzzzrm commented 10 years ago

Sorry, haven't had time today. Will try to reproduce on my BP machine tomorrow.

mrzzzrm commented 10 years ago

Can't reproduce here....

psieg commented 10 years ago

saying everyting is red or isn't red? because it isn't but it should be!

mrzzzrm commented 10 years ago

everything is as in the first picture I posted. But it really should be reddish like in the picture you posted? Okay, got you wrong there. Will investigate.

mrzzzrm commented 10 years ago

I'm pretty confident, that the error is the usage of setFormat instead of setIFormat in VoxelRenderData::setupVertexAttribute. When calling setFormat and passing integers, OpenGL will scale them down to floats. Same as what happens when you pass an uint32 as color (0->255 ) and it gets converted into a vec4 (0->1)

psieg commented 10 years ago

confirmed, thanks