You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In section "Exploding Objects", the function "vec4 explode(vec4 positon, vec3 normal)" receives parameters "position" and "normal" and returns a new vertex by offseting the "position" to some magnitude of "normal", that makes sense in world space or view space.However, in code we passed gl_in[0].gl_Positiion as "position" parameter, and caculated "normal" using other vertex's gl_Position.This means we offset positons by its normals in clip space(I think gl_Positiion caculated by vertex shader (gl_Position = projection * view * model * vec4(aPos, 1.f)) lies in clip space).So does this operation make scense in clip space?I don't know.
I also experimented with the scene, the depth value seems to get messed up.
The text was updated successfully, but these errors were encountered:
In section "Exploding Objects", the function "vec4 explode(vec4 positon, vec3 normal)" receives parameters "position" and "normal" and returns a new vertex by offseting the "position" to some magnitude of "normal", that makes sense in world space or view space.However, in code we passed gl_in[0].gl_Positiion as "position" parameter, and caculated "normal" using other vertex's gl_Position.This means we offset positons by its normals in clip space(I think gl_Positiion caculated by vertex shader (gl_Position = projection * view * model * vec4(aPos, 1.f)) lies in clip space).So does this operation make scense in clip space?I don't know.
I also experimented with the scene, the depth value seems to get messed up.
The text was updated successfully, but these errors were encountered: