In deferred rendering, we pack the position in the g buffer like this:
positionOut = vec4((position-eyePosition-posMin) / deltaMaxMin, 1.0); // TODO fix with actual system size
and unpack it in FinalQuadEntity:
vec3 position = eyePosition + posMin + texture(positionTexture, texCoord).xyz * deltaMaxMin;
I checked in the Qt3D deferred rendering example, and they simply use the object's position. I tried that in Atomify also and did not see any artifacets. Did we falsely assume that textures had to have values in the range [0, 1]?
In deferred rendering, we pack the position in the g buffer like this:
positionOut = vec4((position-eyePosition-posMin) / deltaMaxMin, 1.0); // TODO fix with actual system size
and unpack it in FinalQuadEntity:
vec3 position = eyePosition + posMin + texture(positionTexture, texCoord).xyz * deltaMaxMin;
I checked in the Qt3D deferred rendering example, and they simply use the object's position. I tried that in Atomify also and did not see any artifacets. Did we falsely assume that textures had to have values in the range [0, 1]?